[copr] master: Make the arrow in copr detail views display under the right menu item Also fix some titles while at it (8f509fe)

bkabrda at fedoraproject.org bkabrda at fedoraproject.org
Mon Jan 21 11:13:10 UTC 2013


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

On branch  : master

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

commit 8f509fe6cf94789f7e6267f3357121a642504d30
Author: Bohuslav Kabrda <bkabrda at redhat.com>
Date:   Mon Jan 21 10:18:43 2013 +0100

    Make the arrow in copr detail views display under the right menu item
    Also fix some titles while at it


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

 coprs_frontend/coprs/static/style-new.css          |    3 +++
 coprs_frontend/coprs/templates/coprs/detail.html   |   12 +++++-------
 .../coprs/templates/coprs/detail/builds.html       |    2 ++
 .../coprs/templates/coprs/detail/edit.html         |    4 ++--
 .../coprs/templates/coprs/detail/overview.html     |    2 ++
 .../coprs/templates/coprs/detail/permissions.html  |    2 ++
 6 files changed, 16 insertions(+), 9 deletions(-)

diff --git a/coprs_frontend/coprs/static/style-new.css b/coprs_frontend/coprs/static/style-new.css
index 46c44c9..f2713c6 100644
--- a/coprs_frontend/coprs/static/style-new.css
+++ b/coprs_frontend/coprs/static/style-new.css
@@ -166,6 +166,9 @@ div.horizontal-menu div.selected a {
   color: #db3279;
   margin-left: auto;
   margin-right: auto;
+  padding-bottom: 11px;
+  background: url("pink_arrow.png") no-repeat;
+  background-position: center bottom;
 }
 
 div.horizontal-menu div.selected, div.horizontal-menu div.unselected {
diff --git a/coprs_frontend/coprs/templates/coprs/detail.html b/coprs_frontend/coprs/templates/coprs/detail.html
index b851500..acf45aa 100644
--- a/coprs_frontend/coprs/templates/coprs/detail.html
+++ b/coprs_frontend/coprs/templates/coprs/detail.html
@@ -1,29 +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/detail/_build_forms.html" import copr_build_form,
                                          copr_build_cancel_form with context %}
 
 {% block body %}
   <h1>{{ copr.owner.name }} / <strong>{{ copr.name }}</strong></h1>
   <div class="horizontal-menu">
-    <div class="selected">
+    <div class="{% block overview_selected %}unselected{% endblock %}">
       <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">
+    <div class="{% block permissions_selected %}unselected{% endblock %}">
       <a href="{{ url_for('coprs_ns.copr_permissions', username = copr.owner.name, coprname = copr.name) }}">Permissions</a>
     </div>
-    <div class="unselected">
+    <div class="{% block builds_selected %}unselected{% endblock %}">
       <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_build_in(copr) %}
-      <div class="unselected">
+      <div class="{% block new_build_selected %}unselected{% endblock %}">
         <a href="{{ url_for('coprs_ns.copr_add_build', username = copr.owner.name, coprname = copr.name) }}">New Build</a>
       </div>
     {% endif %}
     {% if g.user and g.user.can_edit(copr) %}
-      <div class="unselected">
+      <div class="{% block edit_selected %}unselected{% endblock %}">
         <a href="{{ url_for('coprs_ns.copr_edit', username = copr.owner.name, coprname = copr.name) }}">Edit</a>
       </div>
     {% endif %}
diff --git a/coprs_frontend/coprs/templates/coprs/detail/builds.html b/coprs_frontend/coprs/templates/coprs/detail/builds.html
index 7ce3ec7..25544f0 100644
--- a/coprs_frontend/coprs/templates/coprs/detail/builds.html
+++ b/coprs_frontend/coprs/templates/coprs/detail/builds.html
@@ -1,4 +1,6 @@
 {% extends "coprs/detail.html" %}
+{% block title %}Builds for {{ copr.owner.name }}/{{ copr.name }}{% endblock %}
+{% block builds_selected %}selected{% endblock %}
 {% from "_helpers.html" import render_pagination %}
 {% from "coprs/detail/_builds_table.html" import builds_table with context %}
 
diff --git a/coprs_frontend/coprs/templates/coprs/detail/edit.html b/coprs_frontend/coprs/templates/coprs/detail/edit.html
index 8068435..9b82fe6 100644
--- a/coprs_frontend/coprs/templates/coprs/detail/edit.html
+++ b/coprs_frontend/coprs/templates/coprs/detail/edit.html
@@ -1,6 +1,6 @@
 {% extends "coprs/detail.html" %}
-{% block title %}Editing {{ copr.name }}{% endblock %}
-{% block header %}Editing {{ copr.name }} Copr{% endblock %}
+{% block title %}Editing {{ copr.owner.name }}/{{ copr.name }}{% endblock %}
+{% block edit_selected %}selected{% endblock %}
 {% from "coprs/_coprs_forms.html" import copr_form, copr_permissions_form with context %}
 
 {% block detail_body %}
diff --git a/coprs_frontend/coprs/templates/coprs/detail/overview.html b/coprs_frontend/coprs/templates/coprs/detail/overview.html
index 455d314..a07d1ff 100644
--- a/coprs_frontend/coprs/templates/coprs/detail/overview.html
+++ b/coprs_frontend/coprs/templates/coprs/detail/overview.html
@@ -1,4 +1,6 @@
 {% extends "coprs/detail.html" %}
+{% block overview_selected %}selected{% endblock %}
+
 {% block detail_body %}
   <h2>Description</h2>
   <div class="shift-right">This is a description...</div>
diff --git a/coprs_frontend/coprs/templates/coprs/detail/permissions.html b/coprs_frontend/coprs/templates/coprs/detail/permissions.html
index 2b2ad6d..12e9d2c 100644
--- a/coprs_frontend/coprs/templates/coprs/detail/permissions.html
+++ b/coprs_frontend/coprs/templates/coprs/detail/permissions.html
@@ -1,4 +1,6 @@
 {% extends "coprs/detail.html" %}
+{% block title %}Permissions for {{ copr.owner.name }}/{{ copr.name }}{% endblock %}
+{% block permissions_selected %}selected{% endblock %}
 {% from "coprs/detail/_permissions_table.html" import permissions_table with context%}
 
 {% block detail_body %}



More information about the copr-devel mailing list