]>
Commit | Line | Data |
---|---|---|
f6e6ff79 MT |
1 | {% extends "base.html" %} |
2 | ||
5aa556bf | 3 | {% block title %}{{ _("Manage build %s") % build.name }}{% end block %} |
f6e6ff79 MT |
4 | |
5 | {% block body %} | |
6 | <div class="page-header"> | |
7 | <h1> | |
5aa556bf MT |
8 | {{ _("Manage build") }}: {{ build.name }} |
9 | <small>- {{ _("Distribution") }}: {{ distro.name }}</small> | |
f6e6ff79 MT |
10 | </h1> |
11 | </div> | |
12 | ||
13 | {% if build.critical_path and not current_user.has_perm("manage_critical_path") %} | |
14 | <div class="alert alert-block alert-error"> | |
15 | <h4 class="alert-heading">{{ _("Permission denied") }}</h4> | |
16 | {{ _("You do not have the permission to update packages that belong to the <em>critical path</em>.") }} | |
17 | </div> | |
18 | {% end %} | |
19 | ||
20 | {% if not build.all_jobs_finished %} | |
21 | <div class="alert alert-block alert-warning"> | |
22 | <h4 class="alert-heading">{{ _("Not all jobs are finished") }}</h4> | |
23 | <p> | |
24 | {{ _("Not all jobs of this build are finished, yet.") }} | |
25 | {{ _("It is <strong>strongly discouraged</strong> to push this build into the next repository.") }} | |
26 | </p> | |
27 | <p> | |
28 | {{ _("However, the build will be automatically unpushed if one or more build jobs fail.") }} | |
29 | </p> | |
30 | </div> | |
31 | {% end %} | |
32 | ||
33 | <div class="row"> | |
34 | <div class="span6 offset3"> | |
35 | <form class="form-horizontal" method="POST" action=""> | |
f55d0127 | 36 | {% raw xsrf_form_html() %} |
f6e6ff79 MT |
37 | <input type="hidden" name="action" value="push" /> |
38 | ||
39 | <fieldset> | |
40 | <legend> | |
41 | {% if mode == "admin" %} | |
42 | {{ _("Push to a repository") }} | |
43 | {% elif build.repo %} | |
44 | {{ _("Push to next repository") }} | |
45 | {% else %} | |
46 | {{ _("Push to first repository") }} | |
47 | {% end %} | |
48 | </legend> | |
49 | ||
50 | <div class="control-group"> | |
51 | <label class="control-label" for="repo_push">{{ _("New repository") }}</label> | |
52 | <div class="controls"> | |
53 | {% if mode == "admin" %} | |
54 | <select id="repo_push" name="repo"> | |
55 | {% for repo in distro.repositories %} | |
56 | {% if not build.repo == repo %} | |
57 | <option value="{{ repo.identifier }}" {% if repo == next_repo %}selected="selected"{% end %}> | |
5aa556bf | 58 | {{ repo.name }} - {{ repo.summary }} |
f6e6ff79 MT |
59 | </option> |
60 | {% end %} | |
61 | {% end %} | |
62 | </select> | |
63 | {% elif next_repo %} | |
64 | <input type="hidden" name="repo" value="{{ next_repo.identifier }}" /> | |
65 | ||
5aa556bf MT |
66 | <a href="/distro/{{ distro.identifier }}/repo/{{ next_repo.identifier }}">{{ next_repo.name }}</a> |
67 | - {{ next_repo.summary }} | |
f6e6ff79 MT |
68 | {% end %} |
69 | ||
70 | <p class="help-block"> | |
71 | {{ _("This is the target repository for the build.") }} | |
72 | </p> | |
73 | </div> | |
74 | </div> | |
75 | ||
76 | <div class="form-actions"> | |
77 | <button type="submit" class="btn btn-primary">{{ _("Push") }}</button> | |
78 | <a class="btn btn-danger" href="/build/{{ build.uuid }}/unpush">{{ _("Unpush") }}</a> | |
79 | <a class="btn" href="/build/{{ build.uuid }}">{{ _("Cancel") }}</a> | |
80 | </div> | |
81 | </fieldset> | |
82 | </form> | |
83 | </div> | |
84 | </div> | |
85 | ||
86 | {% if current_user and current_user.is_admin() %} | |
87 | <div class="row"> | |
88 | <div class="span6 offset3"> | |
89 | {% if mode == "admin" %} | |
90 | <a class="btn pull-right" href="?mode=user">{{ _("Switch to user mode") }}</a> | |
91 | {% else %} | |
92 | <a class="btn pull-right" href="?mode=admin">{{ _("Switch to admin mode") }}</a> | |
93 | {% end %} | |
94 | </div> | |
95 | </div> | |
96 | {% end %} | |
97 | {% end block %} |