diff options
author | 2015-07-23 16:56:39 +0200 | |
---|---|---|
committer | 2015-07-23 16:56:39 +0200 | |
commit | 84e661c69c15decbcc40d56939361169100d9b1d (patch) | |
tree | a590fc9880c718cdf1ea0843cf22c026621296f3 | |
parent | fix more rows for packages (diff) | |
download | tinderbox-cluster-www-84e661c69c15decbcc40d56939361169100d9b1d.tar.gz tinderbox-cluster-www-84e661c69c15decbcc40d56939361169100d9b1d.tar.bz2 tinderbox-cluster-www-84e661c69c15decbcc40d56939361169100d9b1d.zip |
add the main new page
-rw-r--r-- | python/tbc_www/urls.py | 1 | ||||
-rw-r--r-- | python/tbc_www/views.py | 5 | ||||
-rw-r--r-- | python/templates/includes/frontpage/new_build_req | 9 | ||||
-rw-r--r-- | python/templates/includes/frontpage/new_packages | 2 |
4 files changed, 13 insertions, 4 deletions
diff --git a/python/tbc_www/urls.py b/python/tbc_www/urls.py index 82e9336..193443f 100644 --- a/python/tbc_www/urls.py +++ b/python/tbc_www/urls.py @@ -5,4 +5,5 @@ urlpatterns = patterns('tbc_www.views', url(r'^packages/$', 'categories'), url(r'^categories/(?P<category_id>\d+)/$', 'packages'), url(r'^package/(?P<package_id>\d+)/$', 'ebuilds'), + url(r'^new/$', 'new_main'), ) diff --git a/python/tbc_www/views.py b/python/tbc_www/views.py index 84ff9e6..2559f8d 100644 --- a/python/tbc_www/views.py +++ b/python/tbc_www/views.py @@ -112,9 +112,9 @@ def ebuilds(request, package_id): TmpDict['EK_tmp'] = EbuildsKeywords.objects.filter(EbuildId__Active = True).filter(EbuildId__PackageId__Package = P.PackageId.Package) return render(request, 'pages/' + pagerequest + '/ebuilds/index.html', TmpDict) -def new(request): +def new_main(request): pagerequest = 'new' - Lines = 20 + Lines = 30 adict = {} TmpDict = default_TmpDict(pagerequest) TmpDict['EM'] = EbuildsMetadata.objects.filter(Revision = '1.1').order_by('-Id')[:Lines] @@ -127,6 +127,7 @@ def new(request): adict2['P'] = BJ.EbuildId.PackageId.Package adict2['V'] = BJ.EbuildId.Version adict2['R'] = BJ.EbuildId.PackageId.RepoId.Repo + adict2['Status'] = BJ.Status adict2['title'] = "Setup: " + BJ.SetupId.Setup + "\n" + "Profile: " + BJ.SetupId.Profile + "\n" BJU = BuildJobsUse.objects.filter(BuildJobId = BJ.BuildJobId) if not BJU == []: diff --git a/python/templates/includes/frontpage/new_build_req b/python/templates/includes/frontpage/new_build_req index 53a3fcb..3a47530 100644 --- a/python/templates/includes/frontpage/new_build_req +++ b/python/templates/includes/frontpage/new_build_req @@ -2,7 +2,14 @@ {% for k, v in BJ.items %} <tr> <td class="frontpage-table-package-atom"><a href="/new_build_req/{{ k }}" title="{{ v.C }}/{{ v.P }}-{{ v.V }}::{{ v.R }}">{{ v.C }}/{{ v.P }}-{{ v.V }}::{{ v.R }}</a></td> - <td><p title="{{ v.title }}">{{ v.title|truncatewords:2}}</p></td> + <td><p title="{{ v.title }}">{{ v.title|truncatewords:2}}</p> + <td class="text-right"> + {% if v.Status == 'Building' %} + <span class="label label-primary">{{ v.Status }}</span> + {% else %} + <span class="label label-default">{{ v.Status }}</span> + {% endif %} + </td></td> </tr> {% endfor %} </table>
\ No newline at end of file diff --git a/python/templates/includes/frontpage/new_packages b/python/templates/includes/frontpage/new_packages index 7de11c0..6c845b7 100644 --- a/python/templates/includes/frontpage/new_packages +++ b/python/templates/includes/frontpage/new_packages @@ -4,7 +4,7 @@ <td class="frontpage-table-package-atom"> <a href="/packages/{{ E.EbuildId.PackageId.PackageId }}/" title="{{ E.EbuildId.PackageId.CategoryId.Category }}/{{ E.EbuildId.PackageId.Package }}-{{ E.EbuildId.Version }}::{{ E.EbuildId.PackageId.RepoId.Repo }}"> {{ E.EbuildId.PackageId.CategoryId.Category }}/{{ E.EbuildId.PackageId.Package }}-{{ E.EbuildId.Version }}::{{ E.EbuildId.PackageId.RepoId.Repo }}</a></td> - <td><p>{{ E.Descriptions }}</p></td> + <td><p title="{{ E.Descriptions }}">{{ E.Descriptions }}</p></td> </tr> {% endfor %} </table>
\ No newline at end of file |