Repository : http://git.fedorahosted.org/cgit/copr.git
On branch : master
commit 952ad7753afe494edeb4073ff4f3f3c12da8f85c Author: Bohuslav Kabrda bkabrda@redhat.com Date: Fri Jan 18 16:02:10 2013 +0100
Add the menu to copr detail and split the detail into simpler subpages
coprs_frontend/coprs/static/style-new.css | 79 ++++++++++++++++++++++ coprs_frontend/coprs/templates/coprs/detail.html | 56 ++++++---------- 2 files changed, 99 insertions(+), 36 deletions(-)
diff --git a/coprs_frontend/coprs/static/style-new.css b/coprs_frontend/coprs/static/style-new.css index 9ed1715..cf69fd6 100644 --- a/coprs_frontend/coprs/static/style-new.css +++ b/coprs_frontend/coprs/static/style-new.css @@ -2,6 +2,7 @@ html, body { font-family: Cantarell, "Droid Sans", Verdana, sans-serif; font-size: 1em;
+ color: #666666; margin: 0px; padding: 0px; } @@ -11,6 +12,15 @@ a { text-decoration: none; }
+h1 { + font-weight: normal; + color: #3d69a8; +} + +h2 { + font-size: 1.1em; +} + #logo { position: relative; top: 8px; @@ -130,9 +140,78 @@ div.add-copr a { color: #666666; }
+div.horizontal-menu { + background-color: #ededed; + padding: 0.5em; + height: 2em; + + border-radius: 10px; + -moz-border-radius: 10px; + -webkit-border-radius: 10px; +} + +div.horizontal-menu a { + font-size: 1.1em; + font-weight: bold; + color: #4d4d4d; +} + +div.horizontal-menu img { + display: block; + margin-left: auto; + margin-right: auto; +} + +div.horizontal-menu div.selected a { + color: #db3279; + margin-left: auto; + margin-right: auto; +} + +div.horizontal-menu div.selected, div.horizontal-menu div.unselected { + margin-right: 1em; + display: inline; + float: left; +} + +div.shift-right { + margin-left: 1em; +} + input.rounded { padding-left: 4px; border-radius: 10px; -moz-border-radius: 10px; -webkit-border-radius: 10px; } + +table.releases { + width: 100%; + border-collapse:collapse; +} + +table.releases th { + background-color: #f2f2f2; +} + +table.releases th.leftmost { + border-top-left-radius: 10px; + -moz-border-radius-topleft: 10px; + -webkit-border-top-left-radius: 10px; + border-bottom-left-radius: 10px; + -moz-border-radius-bottomleft: 10px; + -webkit-border-bottom-left-radius: 10px; +} + +table.releases th.rightmost { + border-top-right-radius: 10px; + -moz-border-radius-topright: 10px; + -webkit-border-top-right-radius: 10px; + border-bottom-right-radius: 10px; + -moz-border-radius-bottomright: 10px; + -webkit-border-bottom-right-radius: 10px; +} + +table.releases tr.release-end { + border-bottom: 3px solid #f2f2f2; +} diff --git a/coprs_frontend/coprs/templates/coprs/detail.html b/coprs_frontend/coprs/templates/coprs/detail.html index e895973..e12e5f1 100644 --- a/coprs_frontend/coprs/templates/coprs/detail.html +++ b/coprs_frontend/coprs/templates/coprs/detail.html @@ -1,43 +1,27 @@ {% extends "layout.html" %} {% block title %}{{ copr.owner.name }}/{{ copr.name }} Copr{% endblock %} {% block header %}Information for Copr {{ copr.owner.name }}/{{ copr.name }}{% endblock %} -{% from "coprs/_builds_table.html" import builds_table with context %} -{% from "coprs/_permissions_table.html" import permissions_table with context%} -{% from "coprs/_coprs_forms.html" import copr_build_form, +{% from "coprs/detail/_build_forms.html" import copr_build_form, copr_build_cancel_form with context %}
{% block body %} - <h3>chroots</h3> - <ul class=chroots-list> - {% for mock_chroot in copr.mock_chroots %} - <li>{{ mock_chroot.chroot_name }}</li> - {% endfor %} - </ul> - {% if copr.repos %} - <h3>repos</h3> - <ul class=repos-list> - {% for repo in copr.repos_list %} - <li><a href="{{ repo }}">{{ repo }}</a></li> - {% endfor %} - </ul> - {% endif %} - <h3>Permissions</h3> - {% if (g.user and g.user != copr.owner) or permissions %} - {# the table is displayed only if there are some permissions or a non-owner is viewing the page (then display at least his applier form #} - {{ permissions_table(permissions, current_user_permissions, copr, permissions_applier_form, permissions_form) }} - {% endif %} - {% if g.user and g.user.can_build_in(copr) %} - <h3>Build packages in this repo:</h3> - {{ copr_build_form(build_form, 'coprs_ns.copr_add_build', copr) }} - {% endif %} - {% if g.user and g.user.can_edit(copr) %} - <a href="{{ url_for('coprs_ns.copr_edit', username = copr.owner.name, coprname = copr.name) }}">Edit this Copr</a> - {% endif %} - {% if copr.builds %} - <h3>Latest 10 in this repo</h3> - {{ builds_table(copr.builds) }} - <a href="{{ url_for('coprs_ns.copr_show_builds', username = copr.owner.name, coprname = copr.name) }}">Show all builds</a> - {% else %} - <h3>No builds so far</h3> - {% endif %} + <h1>{{ copr.owner.name }} / <strong>{{ copr.name }}</strong></h1> + <div class="horizontal-menu"> + <div class="selected"> + <a href="{{ url_for('coprs_ns.copr_detail', username = copr.owner.name, coprname = copr.name) }}">Overview</a> + <img src="{{ url_for('static', filename='pink_arrow.png') }}"> + </div> + <div class="unselected"> + <a href="{{ url_for('coprs_ns.copr_permissions', username = copr.owner.name, coprname = copr.name) }}">Permissions</a> + </div> + <div class="unselected"> + <a href="{{ url_for('coprs_ns.copr_builds', username = copr.owner.name, coprname = copr.name) }}">Builds</a> + </div> + {% if g.user and g.user.can_edit(copr) %} + <div class="unselected"> + <a href="{{ url_for('coprs_ns.copr_edit', username = copr.owner.name, coprname = copr.name) }}">Edit</a> + </div> + {% endif %} + </div> + {% block detail_body %}{% endblock %} {% endblock %}
copr-devel@lists.fedorahosted.org