backoffice: move multi action checkbox after criticality/lock (#36342)

This commit is contained in:
Frédéric Péters 2019-09-23 10:58:39 +02:00
parent c00234973f
commit 4728912d10
2 changed files with 16 additions and 10 deletions

View File

@ -81,14 +81,14 @@ class FormDefUI(object):
using_postgresql = get_publisher().is_using_postgresql()
r += htmltext('<thead><tr>')
if self.formdef.workflow.criticality_levels and using_postgresql:
r += htmltext('<th class="criticality-level-cell" data-field-sort-key="criticality_level"><span></span></th>')
else:
r += htmltext('<th></th>') # lock
if include_checkboxes:
r += htmltext('<th class="select"><input type="checkbox" name="select[]" value="_all"/>')
r += htmltext(' <span id="info-all-rows">%s</span></th>') % _(
'Do note the selected action will run on all pages when this is checked.')
if self.formdef.workflow.criticality_levels and using_postgresql:
r += htmltext('<th style="width: 4ex;" data-field-sort-key="criticality_level"><span></span></th>')
else:
r += htmltext('<th></th>') # lock
for f in fields:
field_sort_key = None
if getattr(f, 'fake', False):
@ -245,6 +245,10 @@ class FormDefUI(object):
if filled.anonymised:
data += ' data-anonymised="true"'
r += htmltext('<tr class="%s"%s>' % (' '.join(classes), data))
if include_criticality_level:
r += htmltext('<td class="criticality-level-cell" %s></td>' % style) # criticality_level
else:
r += htmltext('<td class="lock-cell"></td>') # lock
if include_checkboxes:
r += htmltext('<td class="select"><input type="checkbox" name="select[]" ')
r += htmltext('value="%s"') % filled.id
@ -257,10 +261,6 @@ class FormDefUI(object):
if function_value in user.get_roles():
r += htmltext(' data-is-%s="true" ' % function_key)
r += htmltext('/></td>')
if include_criticality_level:
r += htmltext('<td %s></td>' % style) # criticality_level
else:
r += htmltext('<td></td>') # lock
for i, f in enumerate(fields):
field_value = filled.get_field_view_value(f, max_length=30)
if f.type == 'id':

View File

@ -427,8 +427,8 @@ table#listing.activity {
background: #dde;
}
#listing.main th,
#listing.main td {
table.main th,
table.main td {
text-align: left;
}
@ -507,6 +507,12 @@ table.main tr.advisory-lock {
opacity: 0.5;
}
table.main .lock-cell,
table.main .criticality-level-cell {
text-align: center;
width: 1rem;
}
tr.advisory-lock td:first-child::before {
font-family: FontAwesome;
content: "\f023"; /* lock */