[copr] master: Style adding new coprs (still needs more work though) (6fbfd01)

bkabrda at fedoraproject.org bkabrda at fedoraproject.org
Mon Jan 21 11:12:47 UTC 2013


Repository : http://git.fedorahosted.org/cgit/copr.git

On branch  : master

>---------------------------------------------------------------

commit 6fbfd014d59a8cd925a6eb2c8aeaba0d295056f0
Author: Bohuslav Kabrda <bkabrda at redhat.com>
Date:   Mon Jan 21 08:21:39 2013 +0100

    Style adding new coprs (still needs more work though)


>---------------------------------------------------------------

 .../coprs/templates/coprs/_coprs_forms.html        |   16 +++++++---------
 coprs_frontend/coprs/templates/coprs/add.html      |    1 +
 2 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/coprs_frontend/coprs/templates/coprs/_coprs_forms.html b/coprs_frontend/coprs/templates/coprs/_coprs_forms.html
index 4d6341a..a7b11ec 100644
--- a/coprs_frontend/coprs/templates/coprs/_coprs_forms.html
+++ b/coprs_frontend/coprs/templates/coprs/_coprs_forms.html
@@ -4,17 +4,15 @@
   {# if using for updating, we need to pass name to url_for, but otherwise we need to pass nothing #}
   <form action="{% if copr %}{{ url_for(view, username = copr.owner.name, coprname = copr.name) }}{% else %}{{ url_for(view) }}{% endif %}" method=post class=add-entry>
     <dl>
-      {% if form._mock_chroots_error %}
-        <p style="color:red;">{{ form._mock_chroots_error }}</p>
-      {% endif %}
       {{ form.csrf_token }}
       {{ render_field(form.id, hidden = True) }}
-      {{ render_field(form.name) }}
+      {{ render_field(form.name, label='Copr Name') }}
+      <dt class="field-label">Chroots</dt>
+      {% if form._mock_chroots_error %}
+        <p class="form-error">{{ form._mock_chroots_error }}</p>
+      {% endif %}
       {% for group_set, chs in form.chroots_sets.items() %}
-        <table style="display:inline;">
-          <tr>
-            <th colspan=2>Chroots to use</th>
-          </tr>
+        <table>
           {% for ch in chs %}
             <tr>
               <td>{{ form|attr(ch)|attr('label') }}</td><td>{{ form|attr(ch) }}</td>
@@ -26,7 +24,7 @@
       {% if copr is none %}{# we're creating the copr, so display initial builds area #}
         {{ render_field(form.initial_pkgs, rows = 10, cols = 50) }}
       {% endif %}
-      <dd><input type=submit value=Submit></dd>
+      <dt><input type="submit" value="{% if copr %}Update{% else %}Create{% endif %}"></dt>
     </dl>
   </form>
 {% endmacro %}
diff --git a/coprs_frontend/coprs/templates/coprs/add.html b/coprs_frontend/coprs/templates/coprs/add.html
index b4492e2..d8a351b 100644
--- a/coprs_frontend/coprs/templates/coprs/add.html
+++ b/coprs_frontend/coprs/templates/coprs/add.html
@@ -5,6 +5,7 @@
 
 {% block body %}
 
+  <h1>Add a new Copr</h1>
   {{ copr_form(form, view = 'coprs_ns.copr_new') }}
 
 {% endblock %}



More information about the copr-devel mailing list