backoffice: show a slashed eye next to user hidden statuses (#34919)
This commit is contained in:
parent
eeb8d79248
commit
54d278ac2f
|
@ -3713,6 +3713,7 @@ def test_formdata_generated_document_in_private_history(pub):
|
|||
resp = resp.form.submit('button_export_to')
|
||||
resp = resp.follow()
|
||||
assert 'Form exported in a model' in resp.body
|
||||
assert 'visibility-off' in resp.body
|
||||
|
||||
resp = resp.form.submit('button_jump2')
|
||||
resp = resp.follow()
|
||||
|
@ -3726,6 +3727,7 @@ def test_formdata_generated_document_in_private_history(pub):
|
|||
|
||||
resp = login(get_app(pub), username='foo', password='foo').get(resp.request.url)
|
||||
assert not 'Form exported in a model' in resp.body
|
||||
assert 'visibility-off' not in resp.body
|
||||
|
||||
def test_formdata_form_file_download(pub):
|
||||
create_user(pub)
|
||||
|
|
|
@ -2108,7 +2108,11 @@ class FormBackOfficeStatusPage(FormStatusPage):
|
|||
|
||||
r += htmltext('<p class="current-status"><span class="item" style="background: #%s; color: %s;"></span>' %
|
||||
(status_colour, fg_colour))
|
||||
r += htmltext('<span>%s %s</span></p>') % (_('Status:'), formdata.get_status_label())
|
||||
r += htmltext('<span>%s %s') % (_('Status:'), formdata.get_status_label())
|
||||
if formdata.get_status().get_visibility_restricted_roles():
|
||||
r += htmltext('<span class="visibility-off" title="%s"></span>') % _(
|
||||
'This status is not visible to users.')
|
||||
r += htmltext('</span></p>')
|
||||
if formdata.formdef.workflow.criticality_levels:
|
||||
try:
|
||||
level = formdata.get_criticality_level_object()
|
||||
|
|
|
@ -1451,6 +1451,20 @@ p.current-status span {
|
|||
line-height: 130%;
|
||||
}
|
||||
|
||||
p.current-status span.visibility-off {
|
||||
display: inline;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
span.visibility-off::after {
|
||||
cursor: help;
|
||||
margin-left: 1rem;
|
||||
content: "\f070"; /* fa-eye-slash */
|
||||
font-family: FontAwesome;
|
||||
font-weight: normal;
|
||||
color: #3c3c33;
|
||||
}
|
||||
|
||||
p.current-level .item,
|
||||
p.current-status .item {
|
||||
float: left;
|
||||
|
|
|
@ -7,12 +7,16 @@
|
|||
{% with status=evolution.get_status display_parts=evolution.display_parts %}
|
||||
<li class="{% if evolution.who == '_submitter' %}msg-in{% elif evolution.who %}msg-out{% else %}msg-system{% endif %}
|
||||
{% if status.is_endpoint %}endpoint{% endif %}
|
||||
{{ status.extra_css_class }}">
|
||||
{{ status.extra_css_class|default:"" }}">
|
||||
<span class="item {% if not evolution.status %}no-status-change{% endif %}" style="background: #{{ status.colour }}; color: {{ status.get_contrast_color}}"></span>
|
||||
<div>
|
||||
{% if evolution.status %}
|
||||
<div class="evolution-metadata">
|
||||
<span class="status">{{evolution.get_status_label}}</span>
|
||||
<span class="status">{{evolution.get_status_label}}
|
||||
{% if status.get_visibility_restricted_roles %}
|
||||
<span title="{% trans "This status is not visible to users" %}" class="visibility-off"></span>
|
||||
{% endif %}
|
||||
</span>
|
||||
<span class="time">{{evolution.datetime}}
|
||||
{% if evolution.last_jump_datetime and user.is_admin %}
|
||||
<span class="last-jump">({% trans "last check:" %} {{ evolution.last_jump_datetime }})</span>
|
||||
|
|
Loading…
Reference in New Issue