commit:     2b49668f127b3be24be722ffdd00dd819b1f1acf
Author:     Magnus Granberg <zorry <AT> gentoo <DOT> org>
AuthorDate: Mon Jul 27 00:41:09 2015 +0000
Commit:     Magnus Granberg <zorry <AT> gentoo <DOT> org>
CommitDate: Mon Jul 27 00:41:09 2015 +0000
URL:        
https://gitweb.gentoo.org/proj/tinderbox-cluster-www.git/commit/?id=2b49668f

add repoman and qa page on new

 python/tbc_www/urls.py                          |  1 +
 python/tbc_www/views.py                         |  7 +++++++
 python/templates/pages/home/index.html          |  2 +-
 python/templates/pages/new/index.html           |  2 +-
 python/templates/pages/new/repomanqa/index.html | 26 +++++++++++++++++++++++++
 5 files changed, 36 insertions(+), 2 deletions(-)

diff --git a/python/tbc_www/urls.py b/python/tbc_www/urls.py
index 4d50f40..55fbca9 100644
--- a/python/tbc_www/urls.py
+++ b/python/tbc_www/urls.py
@@ -6,5 +6,6 @@ urlpatterns = patterns('tbc_www.views',
        url(r'^categories/(?P<category_id>\d+)/$', 'packages'),
        url(r'^package/(?P<package_id>\d+)/$', 'ebuilds'),
        url(r'^ebuild/(?P<ebuild_id>\d+)/$', 'ebuild'),
+       url(r'^new/repomanqa/$', 'new_repomanqa'),
        url(r'^new/$', 'new_main'),
 )

diff --git a/python/tbc_www/views.py b/python/tbc_www/views.py
index 5b719aa..7e99671 100644
--- a/python/tbc_www/views.py
+++ b/python/tbc_www/views.py
@@ -190,3 +190,10 @@ def new_main(request):
        TmpDict['BJ'] = adict
        TmpDict['RM'] = BuildLogsRepomanQa.objects.order_by('-Id')[:Lines]
        return render(request, 'pages/' + pagerequest + '/index.html', TmpDict)
+
+def new_repomanqa(request):
+       pagerequest = 'new'
+       Lines = 30
+       TmpDict = default_TmpDict(pagerequest)
+       TmpDict['RM_tmp'] = BuildLogsRepomanQa.objects.order_by('-Id')[:Lines]
+       return render(request, 'pages/' + pagerequest + 
'/repomanqa/index.html', TmpDict)

diff --git a/python/templates/pages/home/index.html 
b/python/templates/pages/home/index.html
index d2b0ff7..9a75c4e 100644
--- a/python/templates/pages/home/index.html
+++ b/python/templates/pages/home/index.html
@@ -18,7 +18,7 @@
     {% include "includes/frontpage/new_build_req" %}
   </div>
   <div class="col-xs-12 col-md-6">
-    <h2>New Repoman or QA's <small>on the <a href="/new_repoman_qa/">New 
Repoman or QA's</a></small></h2>
+    <h2>New Repoman or QA's <small>on the <a href="/new/repomanqa/">New 
Repoman or QA's</a></small></h2>
     {% include "includes/frontpage/new_repoman_qa" %}
   </div>
 </div>

diff --git a/python/templates/pages/new/index.html 
b/python/templates/pages/new/index.html
index 5195584..93cf42f 100644
--- a/python/templates/pages/new/index.html
+++ b/python/templates/pages/new/index.html
@@ -17,7 +17,7 @@
     {% include "includes/frontpage/new_build_req" %}
   </div>
   <div class="col-xs-12 col-md-6">
-    <h2>New Repoman or QA's <small>on the <a href="/new_repoman_qa/">New 
Repoman or QA's</a></small></h2>
+    <h2>New Repoman or QA's <small>on the <a href="/new/repomanqa/">New 
Repoman or QA's</a></small></h2>
     {% include "includes/frontpage/new_repoman_qa" %}
   </div>
 </div>

diff --git a/python/templates/pages/new/repomanqa/index.html 
b/python/templates/pages/new/repomanqa/index.html
new file mode 100644
index 0000000..d634b67
--- /dev/null
+++ b/python/templates/pages/new/repomanqa/index.html
@@ -0,0 +1,26 @@
+{% extends "layout/base.html" %}
+{% block content %}
+<div class="row">
+  <h2>New Repoman and QA's</h2>
+  <div class="panel-group" id="accordion" role="tablist" 
aria-multiselectable="true">
+  {% for RM in RM_tmp %}
+  <div class="panel panel-default">
+    <div class="panel-heading" role="tab" id="heading{{ RM.Id }}">
+      <h4 class="panel-title">
+        <a role="button" data-toggle="collapse" data-parent="#accordion" 
href="#collapse{{ RM.Id }}" aria-expanded="false" aria-controls="collapse{{ 
RM.Id }}">
+          {{ RM.BuildLogId.EbuildId.PackageId.CategoryId.Category }}/{{ 
RM.BuildLogId.EbuildId.PackageId.Package }}-{{ RM.BuildLogId.EbuildId.Version 
}}::{{ RM.BuildLogId.EbuildId.PackageId.RepoId.Repo }}
+          {{ RM.SummeryText|truncatewords:6 }}
+        </a>
+      </h4>
+    </div>
+    <div id="collapse{{ RM.Id }}" class="panel-collapse collapse in" 
role="tabpanel" aria-labelledby="heading{{ RM.Id }}">
+      <div class="panel-body">
+        {{ RM.SummeryText|linebreaksbr }}
+      </div>
+    </div>
+  </div>
+  {% endfor %}
+  </div>
+</div>
+
+{% endblock %}
\ No newline at end of file

Reply via email to