Development
This commit is contained in:
parent
f479e07a90
commit
2140ea0e0a
2 changed files with 12 additions and 2 deletions
|
|
@ -108,11 +108,19 @@
|
|||
"type": "button_row",
|
||||
"justify": "space-between",
|
||||
"items": [
|
||||
{
|
||||
"type": "raw_html",
|
||||
"html": "<label style='display:flex;align-items:center;gap:0.5rem;margin:0;font-size:0.875rem'>Revert behavior:<select name='revert_behavior' class='form-select' style='width:auto'><option value='revert_subsequent'>Revert selected and subsequent tree changes</option><option value='restore_state'>Restore to tree selected state</option></select></label>"
|
||||
},
|
||||
{
|
||||
"type": "button_secondary",
|
||||
"text": "Revert Selected",
|
||||
"text": "Revert",
|
||||
"disabled": "%NO_HISTORY%"
|
||||
},
|
||||
{
|
||||
"type": "raw_html",
|
||||
"html": "<span style='flex:1'></span>"
|
||||
},
|
||||
{
|
||||
"type": "button_danger",
|
||||
"text": "Clear Selected History",
|
||||
|
|
|
|||
|
|
@ -65,6 +65,8 @@ def collect_tokens(cfg):
|
|||
|
||||
done_ts_map = get_done_timestamps()
|
||||
if all_groups:
|
||||
level = client_level()
|
||||
is_manager = LEVEL_RANK.get(level, 0) >= LEVEL_RANK.get('manager', 0)
|
||||
no_revert = set()
|
||||
for g, _ in all_groups:
|
||||
if g['reverts_group']:
|
||||
|
|
@ -99,7 +101,7 @@ def collect_tokens(cfg):
|
|||
'</span></div>'
|
||||
)
|
||||
snap_user = e(g.get('user', ''))
|
||||
cb_attrs = 'disabled title="Cannot revert"' if uuid in no_revert else ''
|
||||
cb_attrs = '' if is_manager else ('disabled title="Cannot revert"' if uuid in no_revert else '')
|
||||
hist_rows += (
|
||||
f'<tr class="row-expandable" data-uuid="{e(uuid)}" {hist_onclick}>'
|
||||
f'<td class="table-cell"><input type="checkbox" name="selected_uuids" value="{e(uuid)}" {cb_attrs}/></td>'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue