Browse Source

changed block tag to an assignment

Ryan Lerch 8 years ago
parent
commit
f4adb4f65c
43 changed files with 47 additions and 48 deletions
  1. 1 1
      pagure/templates/add_group.html
  2. 1 1
      pagure/templates/add_group_project.html
  3. 1 1
      pagure/templates/add_token.html
  4. 1 2
      pagure/templates/add_user.html
  5. 1 1
      pagure/templates/admin_index.html
  6. 1 1
      pagure/templates/api.html
  7. 1 1
      pagure/templates/commit.html
  8. 1 1
      pagure/templates/doc_ssh_keys.html
  9. 1 1
      pagure/templates/docs.html
  10. 1 1
      pagure/templates/edit_file.html
  11. 1 1
      pagure/templates/edit_tag.html
  12. 1 1
      pagure/templates/fatal_error.html
  13. 1 1
      pagure/templates/file.html
  14. 1 1
      pagure/templates/forks.html
  15. 1 1
      pagure/templates/group_info.html
  16. 1 1
      pagure/templates/group_list.html
  17. 1 1
      pagure/templates/index.html
  18. 1 1
      pagure/templates/issue.html
  19. 1 1
      pagure/templates/issues.html
  20. 1 1
      pagure/templates/login/login.html
  21. 1 1
      pagure/templates/login/password_change.html
  22. 1 1
      pagure/templates/login/password_reset.html
  23. 1 1
      pagure/templates/login/user_new.html
  24. 5 5
      pagure/templates/master.html
  25. 1 1
      pagure/templates/new_issue.html
  26. 1 1
      pagure/templates/new_project.html
  27. 1 1
      pagure/templates/new_release.html
  28. 1 1
      pagure/templates/not_found.html
  29. 1 1
      pagure/templates/plugin.html
  30. 1 1
      pagure/templates/pull_request.html
  31. 1 1
      pagure/templates/pull_request_title.html
  32. 1 1
      pagure/templates/releases.html
  33. 1 1
      pagure/templates/remote_pull_request.html
  34. 1 1
      pagure/templates/repo_info.html
  35. 1 1
      pagure/templates/repo_master.html
  36. 1 1
      pagure/templates/requests.html
  37. 1 1
      pagure/templates/settings.html
  38. 1 1
      pagure/templates/unauthorized.html
  39. 1 1
      pagure/templates/user_emails.html
  40. 1 1
      pagure/templates/user_info.html
  41. 1 1
      pagure/templates/user_list.html
  42. 1 1
      pagure/templates/user_requests.html
  43. 1 1
      pagure/templates/user_settings.html

+ 1 - 1
pagure/templates/add_group.html

@@ -1,8 +1,8 @@
 {% extends "master.html" %}
 {% from "_formhelper.html" import render_field_in_row %}
 
+{% set tag = "groups" %}
 {% block title %}Create group{% endblock %}
-{%block tag %}groups{% endblock %}
 
 
 {% block content %}

+ 1 - 1
pagure/templates/add_group_project.html

@@ -1,8 +1,8 @@
 {% extends "repo_master.html" %}
 {% from "_formhelper.html" import render_field_in_row %}
 
+{% set tag = "groups" %}
 {% block title %}Add user - {{ repo.name }}{% endblock %}
-{%block tag %}groups{% endblock %}
 
 
 {% block repo %}

+ 1 - 1
pagure/templates/add_token.html

@@ -1,8 +1,8 @@
 {% extends "master.html" %}
 {% from "_formhelper.html" import render_field_in_row %}
 
+{% set tag = "home" %}i
 {% block title %}Create token{% endblock %}
-{%block tag %}home{% endblock %}
 
 
 {% block content %}

+ 1 - 2
pagure/templates/add_user.html

@@ -1,9 +1,8 @@
 {% extends "repo_master.html" %}
 {% from "_formhelper.html" import render_field_in_row %}
 
+{% set tag = "home" %}
 {% block title %}Add user - {{ repo.name }}{% endblock %}
-{%block tag %}home{% endblock %}
-
 
 {% block repo %}
 

+ 1 - 1
pagure/templates/admin_index.html

@@ -1,7 +1,7 @@
 {% extends "master.html" %}
 
 {% block title %}Home{% endblock %}
-{%block tag %}admin{% endblock %}
+{% set tag = "admin" %}
 
 
 {% block content %}

+ 1 - 1
pagure/templates/api.html

@@ -2,7 +2,7 @@
 
 {% block title %} API | pagure {% endblock %}
 
-{%block tag %}index{% endblock %}
+{% set tag = "index" %}
 
 {% block content %}
 

+ 1 - 1
pagure/templates/commit.html

@@ -1,7 +1,7 @@
 {% extends "repo_master.html" %}
 
 {% block title %}Commit - {{ repo.name }} - {{ commitid }}{% endblock %}
-{%block tag %}commit{% endblock %}
+{% set tag = "commit"%}
 
 {% block repo %}
 

+ 1 - 1
pagure/templates/doc_ssh_keys.html

@@ -1,7 +1,7 @@
 {% extends "master.html" %}
 
 {% block title %}Doc: SSH hostkeys/Fingerprints{% endblock %}
-{%block tag %}home{% endblock %}
+{% set tag = "home" %}
 
 
 {% block content %}

+ 1 - 1
pagure/templates/docs.html

@@ -1,7 +1,7 @@
 {% extends "repo_master.html" %}
 
 {% block title %}Docs - {{ repo.name }}{% endblock %}
-{%block tag %}home{% endblock %}
+{% set tag = "home" %}
 
 
 {% block repo %}

+ 1 - 1
pagure/templates/edit_file.html

@@ -2,7 +2,7 @@
 {% from "_formhelper.html" import render_field %}
 
 {% block title %}Edit - {{ repo.name }}{% endblock %}
-{%block tag %}home{% endblock %}
+{% set tag = "home" %}
 
 
 {% block repo %}

+ 1 - 1
pagure/templates/edit_tag.html

@@ -2,7 +2,7 @@
 {% from "_formhelper.html" import render_field_in_row %}
 
 {% block title %}Edit tag: {{ tag }} - {{ repo.name }}{% endblock %}
-{%block tag %}home{% endblock %}
+{% set tag = "home" %}
 
 
 {% block repo %}

+ 1 - 1
pagure/templates/fatal_error.html

@@ -1,7 +1,7 @@
 {% extends "master.html" %}
 
 {% block title %}A fatal error occured :'({% endblock %}
-{%block tag %}error{% endblock %}
+{% set tag = "error" %}
 
 
 {% block content %}

+ 1 - 1
pagure/templates/file.html

@@ -1,7 +1,7 @@
 {% extends "repo_master.html" %}
 
 {% block title %}Tree - {{ repo.name }}{% endblock %}
-{%block tag %}home{% endblock %}
+{% set tag = "home" %}
 
 
 {% block repo %}

+ 1 - 1
pagure/templates/forks.html

@@ -1,7 +1,7 @@
 {% extends "repo_master.html" %}
 
 {% block title %}Forks - {{ repo.name }}{% endblock %}
-{%block tag %}home{% endblock %}
+{% set tag = "home" %}
 
 
 {% block repo %}

+ 1 - 1
pagure/templates/group_info.html

@@ -2,7 +2,7 @@
 {% from "_render_repo.html" import render_repos %}
 
 {% block title %}Group {{ group.name }}{% endblock %}
-{%block tag %}groups{% endblock %}
+{% set tag = "groups" %}
 
 
 {% block header %}

+ 1 - 1
pagure/templates/group_list.html

@@ -1,7 +1,7 @@
 {% extends "master.html" %}
 
 {% block title %}Groups{% endblock %}
-{%block tag %}groups{% endblock %}
+{% set tag = "groups" %}
 
 
 {% block content %}

+ 1 - 1
pagure/templates/index.html

@@ -1,7 +1,7 @@
 {% extends "master.html" %}
 
 {% block title %}Home{% endblock %}
-{%block tag %}home{% endblock %}
+{% set tag = "home" %}i
 
 
 {% block header %}

+ 1 - 1
pagure/templates/issue.html

@@ -2,7 +2,7 @@
 {% from "_formhelper.html" import render_field, show_comment %}
 
 {% block title %}Issue #{{ issueid }} - {{ repo.name }}{% endblock %}
-{%block tag %}home{% endblock %}
+{% set tag = "home"%}
 
 {% block header %}
 <link href="{{ url_for('static', filename='fontawesome/font-awesome.min.css') }}"

+ 1 - 1
pagure/templates/issues.html

@@ -1,7 +1,7 @@
 {% extends "repo_master.html" %}
 
 {% block title %}Issues - {{ repo.name }}{% endblock %}
-{%block tag %}home{% endblock %}
+{% set tag = "home"%}
 
 
 {% block repo %}

+ 1 - 1
pagure/templates/login/login.html

@@ -2,7 +2,7 @@
 {% from "_formhelper.html" import render_field_in_row %}
 
 {% block title %}Login{% endblock %}
-{%block tag %}home{% endblock %}
+{% set tag = "home" %}
 
 {% block content %}
 <h2>Login</h2>

+ 1 - 1
pagure/templates/login/password_change.html

@@ -2,7 +2,7 @@
 {% from "_formhelper.html" import render_field_in_row %}
 
 {% block title %}Lost password{% endblock %}
-{%block tag %}home{% endblock %}
+{% set tag = "home" %}
 
 {% block content %}
 <h2>Lost password?</h2>

+ 1 - 1
pagure/templates/login/password_reset.html

@@ -2,7 +2,7 @@
 {% from "_formhelper.html" import render_field_in_row %}
 
 {% block title %}Change password{% endblock %}
-{%block tag %}home{% endblock %}
+{% set tag = "home" %}
 
 {% block content %}
 <h2>Change password</h2>

+ 1 - 1
pagure/templates/login/user_new.html

@@ -2,7 +2,7 @@
 {% from "_formhelper.html" import render_field_in_row %}
 
 {% block title %}New user{% endblock %}
-{%block tag %}home{% endblock %}
+{% set tag = "home" %}
 
 {% block content %}
 <h2>New user</h2>

+ 5 - 5
pagure/templates/master.html

@@ -8,7 +8,7 @@
     <link type="text/css" rel="stylesheet" href="https://ryanlerch.fedorapeople.org/fedora-bootstrap/fedora-bootstrap.min.css" />
     {% block header %}{% endblock %}
   </head>
-  <body id="{% block tag %}{% endblock %}">
+  <body id="{{ tag }}">
 	<div class="masthead">
 	        <div class="container"><img src="{{ url_for('static', filename='pagure-logo.png') }}"
             alt="pagure Logo" id="kojiLogo"/></div>
@@ -16,11 +16,11 @@
         <nav class="navbar navbar-light navbar-underline p-t-0 p-b-0 m-b-lg">
           <div class="container-narrow">
             <ul class="nav navbar-nav nav-justified nav-underline">
-              <li class="nav-item active"><a class="nav-link" href="{{url_for('index')}}">Home</a></li>
-              <li class="nav-item"><a class="nav-link" href="{{ url_for('view_users') }}">Users</a></li>
-              <li class="nav-item"><a class="nav-link" href="{{ url_for('group_lists') }}">Groups</a></li>
+              <li class="nav-item {% if tag == 'home'%}active{% endif %}"><a class="nav-link" href="{{url_for('index')}}">Home</a></li>
+              <li class="nav-item {% if tag == 'users'%}active{% endif %}"><a class="nav-link" href="{{ url_for('view_users') }}">Users</a></li>
+              <li class="nav-item {% if tag == 'groups'%}active{% endif %}"><a class="nav-link" href="{{ url_for('group_lists') }}">Groups</a></li>
               {% if admin %}
-              <li class="nav-item"><a class="nav-link" href="{{ url_for('admin_index') }}">Admin</a></li>
+              <li class="nav-item {% if tag == 'admin'%}active{% endif %}"><a class="nav-link" href="{{ url_for('admin_index') }}">Admin</a></li>
               {% endif %}
               {% if config.get('ENABLE_NEW_PROJECTS', True) %}
               <li class="nav-item"><a class="nav-link" href="{{ url_for('new_project') }}">New Project</a></li>

+ 1 - 1
pagure/templates/new_issue.html

@@ -4,7 +4,7 @@
 {% block title %}{% if not type or type == 'new'
     %}New issue{% elif type and type == 'edit'
     %}Edit issue #{{ issueid }} {% endif %} - {{ repo.name }}{% endblock %}
-{%block tag %}home{% endblock %}
+{% set tag = "home" %}
 
 
 {% block repo %}

+ 1 - 1
pagure/templates/new_project.html

@@ -2,7 +2,7 @@
 {% from "_formhelper.html" import render_field_in_row %}
 
 {% block title %}New project{% endblock %}
-{%block tag %}new_project{% endblock %}
+{% set tag = "new_project" %}
 
 
 {% block content %}

+ 1 - 1
pagure/templates/new_release.html

@@ -1,7 +1,7 @@
 {% extends "repo_master.html" %}
 
 {% block title %}New release - {{ repo.name }}{% endblock %}
-{%block tag %}home{% endblock %}
+{% set tag = "home" %}
 
 
 {% block repo %}

+ 1 - 1
pagure/templates/not_found.html

@@ -1,7 +1,7 @@
 {% extends "master.html" %}
 
 {% block title %}Page not found :'({% endblock %}
-{%block tag %}error{% endblock %}
+{% set tag = "error" %}
 
 
 {% block content %}

+ 1 - 1
pagure/templates/plugin.html

@@ -4,7 +4,7 @@
 {% extends "repo_master.html" %}
 
 {% block title %}{{ select.capitalize() }} {{ plugin.name }} - {{ repo.name }}{% endblock %}
-{%block tag %}home{% endblock %}
+{% set tag = "home" %}
 {% endif %}
 
 

+ 1 - 1
pagure/templates/pull_request.html

@@ -9,7 +9,7 @@
   {%- endif -%}
 {% endblock %}
 
-{%block tag %}home{% endblock %}
+{% set tag = "home" %}
 
 {% block header %}
 <link href="{{ url_for('static', filename='fontawesome/font-awesome.min.css') }}"

+ 1 - 1
pagure/templates/pull_request_title.html

@@ -2,7 +2,7 @@
 {% from "_formhelper.html" import render_field_in_row %}
 
 {% block title %}Edit PR#{{ request.id }}: {{ request.title }} - {{ repo.name }}{% endblock %}
-{%block tag %}home{% endblock %}
+{% set tag = "home" %}
 
 
 {% block repo %}

+ 1 - 1
pagure/templates/releases.html

@@ -1,7 +1,7 @@
 {% extends "repo_master.html" %}
 
 {% block title %}Releases - {{ repo.name }}{% endblock %}
-{%block tag %}home{% endblock %}
+{% set tag = "home" %}
 
 {% block header %}
 <link href="{{ url_for('static', filename='fontawesome/font-awesome.min.css') }}"

+ 1 - 1
pagure/templates/remote_pull_request.html

@@ -2,7 +2,7 @@
 {% from "_formhelper.html" import render_field_in_row %}
 
 {% block title %}Remote Pull request {{ repo.name }}{% endblock %}
-{%block tag %}home{% endblock %}
+{% set tag = "home" %}
 
 {% block repo %}
 

+ 1 - 1
pagure/templates/repo_info.html

@@ -1,7 +1,7 @@
 {% extends "repo_master.html" %}
 
 {% block title %}{{ select.capitalize() }} - {{ repo.name }}{% endblock %}
-{%block tag %}home{% endblock %}
+{% set tag = "home" %}
 
 {% block header %}
 <link href="{{ url_for('static', filename='fontawesome/font-awesome.min.css') }}"

+ 1 - 1
pagure/templates/repo_master.html

@@ -1,7 +1,7 @@
 {% extends "master.html" %}
 
 {% block title %}{{ repo.name }}{% endblock %}
-{%block tag %}home{% endblock %}
+{% set tag = "home" %}
 
 
 {% block content %}

+ 1 - 1
pagure/templates/requests.html

@@ -1,7 +1,7 @@
 {% extends "repo_master.html" %}
 
 {% block title %}Pull requests - {{ repo.name }}{% endblock %}
-{%block tag %}home{% endblock %}
+{% set tag = "home" %}
 
 
 {% block repo %}

+ 1 - 1
pagure/templates/settings.html

@@ -2,7 +2,7 @@
 {% from "_formhelper.html" import render_field_in_row %}
 
 {% block title %}{{ select.capitalize() }} - {{ repo.name }}{% endblock %}
-{%block tag %}home{% endblock %}
+{% set tag = "home" %}
 
 {% block header %}
 <link href="{{ url_for('static', filename='fontawesome/font-awesome.min.css') }}"

+ 1 - 1
pagure/templates/unauthorized.html

@@ -1,7 +1,7 @@
 {% extends "master.html" %}
 
 {% block title %}Unauthorized :'({% endblock %}
-{%block tag %}error{% endblock %}
+{% set tag = "error" %}
 
 
 {% block content %}

+ 1 - 1
pagure/templates/user_emails.html

@@ -2,7 +2,7 @@
 {% from "_formhelper.html" import render_field_in_row %}
 
 {% block title %}Add email{% endblock %}
-{%block tag %}home{% endblock %}
+{% set tag = "home" %}
 
 
 {% block content %}

+ 1 - 1
pagure/templates/user_info.html

@@ -1,7 +1,7 @@
 {% extends "master.html" %}
 
 {% block title %}User {{username}}{% endblock %}
-{%block tag %}users{% endblock %}
+{% set tag = "users" %}
 
 
 {% block header %}

+ 1 - 1
pagure/templates/user_list.html

@@ -1,6 +1,6 @@
 {% extends "master.html" %}
 {% block title %}Users{% endblock %}
-{%block tag %}users{% endblock %}
+{% set tag = "users" %}
 
 
 {% block content %}

+ 1 - 1
pagure/templates/user_requests.html

@@ -2,7 +2,7 @@
 {% from "_formhelper.html" import render_field_in_row %}
 
 {% block title %}Pull-requests of {{ username }}{% endblock %}
-{%block tag %}home{% endblock %}
+{% set tag = "home"%}
 
 
 {% block content %}

+ 1 - 1
pagure/templates/user_settings.html

@@ -2,7 +2,7 @@
 {% from "_formhelper.html" import render_field_in_cell %}
 
 {% block title %}{{ user.user }}'s settings{% endblock %}
-{%block tag %}users{% endblock %}
+{% set tag = "users"%}
 
 {% block header %}
 <link href="{{ url_for('static', filename='fontawesome/font-awesome.min.css') }}"