Fix #16: choose correct proxy on removing delegee

This commit is contained in:
tchapi 2020-12-14 22:43:05 +01:00
parent 5345c4a1ae
commit 545e98716c
2 changed files with 15 additions and 3 deletions

View File

@ -1,13 +1,21 @@
<div class="list-group-item list-group-item-action p-3">
<div class="d-flex w-100 justify-content-between">
<h5 class="mr-auto">{{ delegate.displayName }} <a href="mailto:{{ delegate.email }}">&lsaquo;{{ delegate.email }}&rsaquo;</a>{%if has_write %} <span class="badge badge-success">{{ "delegates.write"|trans }}</span>{% endif %}</h5>
<h5 class="mr-auto">
{{ delegate.displayName }}
<a href="mailto:{{ delegate.email }}">&lsaquo;{{ delegate.email }}&rsaquo;</a>
{% if has_write %}
<span class="badge badge-success">{{ "delegates.write"|trans }}</span>
{% else %}
<span class="badge badge-info">{{ "delegates.readonly"|trans }}</span>
{% endif %}
</h5>
<div class="mr-0 text-right d-lg-block d-none">
<a href="#" data-href="{{ path('calendar_delegate_remove',{id: calendar.id, principalProxyId: principalProxyWrite.id, delegateId: delegate.id})}}" class="btn btn-sm btn-outline-danger ml-1 mb-1 delete-modal">⚠&nbsp;{{ "remove"|trans }}</a>
<a href="#" data-href="{{ path('calendar_delegate_remove',{id: calendar.id, principalProxyId: has_write ? principalProxyWrite.id : principalProxyRead.id, delegateId: delegate.id})}}" class="btn btn-sm btn-outline-danger ml-1 mb-1 delete-modal">⚠&nbsp;{{ "remove"|trans }}</a>
</div>
</div>
<p class="mb-1">{{ "users.username"|trans }} : <code>{{ delegate.username }}</code></p>
<small>{{ "users.uri"|trans }} : <code>{{ delegate.uri }}</code></small>
<div class="btn-group btn-group-sm mt-3 d-flex d-lg-none" role="group">
<a href="#" data-href="{{ path('calendar_delegate_remove',{id: calendar.id, principalProxyId: principalProxyWrite.id, delegateId: delegate.id})}}" class="btn btn-outline-danger flex-fill flex-shrink-1 delete-modal"><span class="d-none d-sm-inline">⚠&nbsp;</span>{{ "remove"|trans }}</a>
<a href="#" data-href="{{ path('calendar_delegate_remove',{id: calendar.id, principalProxyId: has_write ? principalProxyWrite.id : principalProxyRead.id, delegateId: delegate.id})}}" class="btn btn-outline-danger flex-fill flex-shrink-1 delete-modal"><span class="d-none d-sm-inline">⚠&nbsp;</span>{{ "remove"|trans }}</a>
</div>
</div>

View File

@ -469,6 +469,10 @@
<source>delegates.write</source>
<target>has write access</target>
</trans-unit>
<trans-unit id="zAE1QhB" resname="delegates.readonly">
<source>delegates.readonly</source>
<target>has readonly access</target>
</trans-unit>
</body>
</file>
</xliff>