make templates compatible for jinja 2.10
This commit is contained in:
parent
6b87cd8ac6
commit
3810c573a9
3 changed files with 19 additions and 16 deletions
|
|
@ -10,9 +10,9 @@ Latest
|
|||
#elif state != None
|
||||
{{ util.stateName(state)|capitalize }}
|
||||
#endif
|
||||
#if draft is false
|
||||
#if draft and draft is not sameas none
|
||||
Nondraft
|
||||
#elif draft is true
|
||||
#elif draft
|
||||
Draft
|
||||
#endif
|
||||
#if type
|
||||
|
|
@ -80,16 +80,16 @@ in tag <a href="taginfo?tagID={{ tag.id }}">{{ tag.name }}</a>
|
|||
</td>
|
||||
<td>
|
||||
<select name="type" class="filterlist" onchange="javascript: window.location='builds?draft=' + this.value + '{{ util.passthrough_except('draft') }}';">
|
||||
<option value="all" {{ 'selected' if draft is none else '' }}>all</option>
|
||||
<option value="1" {{ 'selected' if draft is true else '' }}>yes</option>
|
||||
<option value="0" {{ 'selected' if draft is false else '' }}>no</option>
|
||||
<option value="all" {{ 'selected' if draft is sameas none else '' }}>all</option>
|
||||
<option value="1" {{ 'selected' if draft is sameas true else '' }}>yes</option>
|
||||
<option value="0" {{ 'selected' if draft is sameas false else '' }}>no</option>
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<strong>Content Generator</strong>:
|
||||
</td><td>
|
||||
<select name="inherited" class="filterlist" onchange="javascript: window.location = 'builds?cg=' + this.value + '{{ util.passthrough_except('cg') }}';">
|
||||
<option value="" {{ 'selected' if cg is none else '' }}>all</option>
|
||||
<option value="" {{ 'selected' if cg is sameas none else '' }}>all</option>
|
||||
#for cgname in cgs
|
||||
<option value="{{ cgname }}" {{ 'selected' if cg == cgname else '' }}>{{ cgname }}</option>
|
||||
#endfor
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
#if (reqPages |length) > 1
|
||||
<form class="pageJump" action="">
|
||||
Page:
|
||||
<select onchange="javascript: window.location = 'reporequests?start=' + this.value * {{ reqRange }} + '{{ P(*Pvars) }}';">
|
||||
<select onchange="javascript: window.location = 'reporequests?start=' + this.value * {{ reqRange }} + '{{ P(names=Pvars) }}';">
|
||||
#for pageNum in reqPages
|
||||
<option value="{{ pageNum }}"{{ ' selected' if pageNum == reqCurrentPage else '' }}>{{ pageNum + 1 }}</option>
|
||||
#endfor
|
||||
|
|
@ -43,20 +43,20 @@
|
|||
</form>
|
||||
#endif
|
||||
#if reqStart > 0
|
||||
<a href="reporequests?start={{ reqStart - reqRange }}{{ P(*Pvars) }}"><<<</a>
|
||||
<a href="reporequests?start={{ reqStart - reqRange }}{{ P(names=Pvars) }}"><<<</a>
|
||||
#endif
|
||||
#if totalReqs != 0
|
||||
<strong>Requests {{ reqStart + 1 }} through {{ reqStart + reqCount }} of {{ totalReqs }}</strong>
|
||||
#endif
|
||||
#if reqStart + reqCount < totalReqs
|
||||
<a href="reporequests?start={{ reqStart + reqRange }}{{ P(*Pvars) }}">>>></a>
|
||||
<a href="reporequests?start={{ reqStart + reqRange }}{{ P(names=Pvars) }}">>>></a>
|
||||
#endif
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="list-header">
|
||||
<th><a href="reporequests?{{ P(*Pvars, toggleOrder='id', prefix='') }}">ID</a> {{ util.sortImage('id') }}</th>
|
||||
<th><a href="reporequests?{{ P(*Pvars, toggleOrder='priority', prefix='') }}">Priority</a> {{ util.sortImage('priority') }}</th>
|
||||
<th><a href="reporequests?{{ P(*Pvars, toggleOrder='tag_name', prefix='') }}">Tag</a> {{ util.sortImage('tag_name') }}</th>
|
||||
<th><a href="reporequests?{{ P(names=Pvars, toggleOrder='id', prefix='') }}">ID</a> {{ util.sortImage('id') }}</th>
|
||||
<th><a href="reporequests?{{ P(names=Pvars, toggleOrder='priority', prefix='') }}">Priority</a> {{ util.sortImage('priority') }}</th>
|
||||
<th><a href="reporequests?{{ P(names=Pvars, toggleOrder='tag_name', prefix='') }}">Tag</a> {{ util.sortImage('tag_name') }}</th>
|
||||
<th>Task</th>
|
||||
<th>Repo</th>
|
||||
<th>Status</th>
|
||||
|
|
@ -104,7 +104,7 @@
|
|||
#if (reqPages |length) > 1
|
||||
<form class="pageJump" action="">
|
||||
Page:
|
||||
<select onchange="javascript: window.location = 'reporequests?start=' + this.value * {{ reqRange }} + '{{ P(*Pvars) }}';">
|
||||
<select onchange="javascript: window.location = 'reporequests?start=' + this.value * {{ reqRange }} + '{{ P(names=Pvars) }}';">
|
||||
#for pageNum in reqPages
|
||||
<option value="{{ pageNum }}"{{ ' selected' if pageNum == reqCurrentPage else '' }}>{{ pageNum + 1 }}</option>
|
||||
#endfor
|
||||
|
|
@ -112,13 +112,13 @@
|
|||
</form>
|
||||
#endif
|
||||
#if reqStart > 0
|
||||
<a href="reporequests?start={{ reqStart - reqRange }}{{ P(*Pvars) }}"><<<</a>
|
||||
<a href="reporequests?start={{ reqStart - reqRange }}{{ P(names=Pvars) }}"><<<</a>
|
||||
#endif
|
||||
#if totalReqs != 0
|
||||
<strong>Reqs {{ reqStart + 1 }} through {{ reqStart + reqCount }} of {{ totalReqs }}</strong>
|
||||
#endif
|
||||
#if reqStart + reqCount < totalReqs
|
||||
<a href="reporequests?start={{ reqStart + reqRange }}{{ P(*Pvars) }}">>>></a>
|
||||
<a href="reporequests?start={{ reqStart + reqRange }}{{ P(names=Pvars) }}">>>></a>
|
||||
#endif
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
|||
|
|
@ -353,7 +353,10 @@ def _sortImage(orderVal, sortKey, orderVar):
|
|||
|
||||
@safe_return
|
||||
@pass_context
|
||||
def passthrough(context, *varnames, prefix='&', invert=False, toggleOrder=None):
|
||||
def passthrough(context, *varnames, prefix='&', invert=False, toggleOrder=None, names=None):
|
||||
if names is not None:
|
||||
# alternate way to pass list of names
|
||||
varnames += names
|
||||
if invert:
|
||||
_PASSTHROUGH = context.get('_PASSTHROUGH', None)
|
||||
if _PASSTHROUGH is None:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue