mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-16 14:33:14 +00:00
fix #500 Ne voir que les user deja dans la liste dans Edit du LIst Manager
This commit is contained in:
@@ -764,17 +764,6 @@ class Push implements ControllerProviderInterface
|
|||||||
$query->havePositions($request->get('Position'));
|
$query->havePositions($request->get('Position'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if($request->get('ListUser'))
|
|
||||||
{
|
|
||||||
$entries = $list->getEntries();
|
|
||||||
$ids = array();
|
|
||||||
foreach($entries as $usrEntries)
|
|
||||||
{
|
|
||||||
$ids[] = $usrEntries->getUsrId();
|
|
||||||
}
|
|
||||||
$query->in($ids);
|
|
||||||
}
|
|
||||||
|
|
||||||
$sort = $request->get('srt', 'usr_creationdate');
|
$sort = $request->get('srt', 'usr_creationdate');
|
||||||
$ord = $request->get('ord', 'desc');
|
$ord = $request->get('ord', 'desc');
|
||||||
|
|
||||||
|
@@ -176,14 +176,20 @@
|
|||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
|
|
||||||
{% macro badgeReadonly(entry) %}
|
{% macro badgeReadonly(entry, role) %}
|
||||||
<div class="badge">
|
<div class="badge">
|
||||||
|
<input type="hidden" value="{{ entry.getUser().get_id() }}" name="id">
|
||||||
|
{% if role >= constant('\\Entities\\UsrListOwner::ROLE_EDITOR') %}
|
||||||
|
<a class="deleter" href="#">
|
||||||
|
<img src="/skins/prod/Push/close_badge.png">
|
||||||
|
</a>
|
||||||
|
{% endif %}
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="icon">
|
<td>
|
||||||
<img src="/skins/icons/user.png"/>
|
<img src="/skins/icons/user.png"/>
|
||||||
</td>
|
</td>
|
||||||
<td class="infos">
|
<td class="infos" >
|
||||||
<span class="name">{{ entry.getUser().get_display_name() }}</span>
|
<span class="name">{{ entry.getUser().get_display_name() }}</span>
|
||||||
<span class="subtite"></span>
|
<span class="subtite"></span>
|
||||||
</td>
|
</td>
|
||||||
|
@@ -50,8 +50,9 @@
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="PNB" style="top:35px;overflow:auto;">
|
<div class="PNB" style="top:35px;overflow:auto;">
|
||||||
|
{% set role = list.getOwner(user).getRole() %}
|
||||||
{% for entry in list.getEntries() %}
|
{% for entry in list.getEntries() %}
|
||||||
{{ ListsMacros.badgeReadonly(entry) }}
|
{{ ListsMacros.badgeReadonly(entry, role) }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -89,13 +90,7 @@
|
|||||||
{% trans 'boutton::chercher' %}
|
{% trans 'boutton::chercher' %}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="PNB" style="top:40px;height:20px;bottom:auto;">
|
<div class="PNB" style="top:40px;height:120px;bottom:auto;">
|
||||||
<ul>
|
|
||||||
<li style="display:inline-block;"><span>{%trans%}all users{%endtrans%}</span><input type="radio" name="ListUser" value="0" checked="checked"/></li>
|
|
||||||
<li style="display:inline-block;"><span>{%trans%}users from list{%endtrans%}</span><input type="radio" name="ListUser" value="1" /></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div class="PNB" style="top:60px;height:120px;bottom:auto;">
|
|
||||||
<table style="table-layout:fixed;width:100%;">
|
<table style="table-layout:fixed;width:100%;">
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
@@ -178,5 +173,12 @@
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
p4.ListManager.workOn({{ list.getId() }});
|
p4.ListManager.workOn({{ list.getId() }});
|
||||||
|
$("#ListManager .readonly .badge .deleter").click(function(){
|
||||||
|
var badge = $(this).closest(".badge");
|
||||||
|
var usr_id = badge.find('input[name="id"]').val();
|
||||||
|
p4.ListManager.getList().removeUser(usr_id, function(list, data){
|
||||||
|
badge.remove();
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
@@ -213,7 +213,24 @@
|
|||||||
width:250px;
|
width:250px;
|
||||||
display:inline-block;
|
display:inline-block;
|
||||||
margin:5px;
|
margin:5px;
|
||||||
|
background-color: #515150;
|
||||||
|
padding:5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ListManager .content.readonly .badge .deleter{
|
||||||
|
float:right;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#ListManager .content.readonly .badge table{
|
||||||
|
width:auto;
|
||||||
|
table-layout: fixed;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ListManager .content.readonly .badge .infos{
|
||||||
|
padding:2px;
|
||||||
|
}
|
||||||
|
|
||||||
#ListManager h1 span.title{
|
#ListManager h1 span.title{
|
||||||
font-size:24px;
|
font-size:24px;
|
||||||
line-height:24px;
|
line-height:24px;
|
||||||
|
Reference in New Issue
Block a user