mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 18:03:17 +00:00
PHRAS-3084
This commit is contained in:
@@ -61,24 +61,6 @@
|
||||
div.no_switch{
|
||||
background-image:url(/assets/common/images/icons/ccoch5.gif);
|
||||
}
|
||||
div.switch_quota.mixed,
|
||||
div.switch_masks.mixed,
|
||||
div.switch_time.mixed,
|
||||
div.switch_right.mixed{
|
||||
background-image:url(/assets/common/images/icons/ccoch2.gif);
|
||||
}
|
||||
div.switch_quota.checked,
|
||||
div.switch_masks.checked,
|
||||
div.switch_time.checked,
|
||||
div.switch_right.checked{
|
||||
background-image:url(/assets/common/images/icons/ccoch1.gif);
|
||||
}
|
||||
div.switch_quota.unchecked,
|
||||
div.switch_masks.unchecked,
|
||||
div.switch_time.unchecked,
|
||||
div.switch_right.unchecked{
|
||||
background-image:url(/assets/common/images/icons/ccoch0.gif);
|
||||
}
|
||||
td.users_col{
|
||||
vertical-align:middle;
|
||||
text-align:center;
|
||||
@@ -188,49 +170,49 @@
|
||||
</td>
|
||||
<td class="users_col options">
|
||||
<div>
|
||||
▼
|
||||
<i class="fa fa-caret-down fa-right"></i>
|
||||
<input type="hidden" name="right" value="right_access"/>
|
||||
<input type="hidden" name="sbas_id" value="{{rights['sbas_id']}}"/>
|
||||
</div>
|
||||
</td>
|
||||
<td class="users_col options">
|
||||
<div>
|
||||
▼
|
||||
<i class="fa fa-caret-down fa-right"></i>
|
||||
<input type="hidden" name="right" value="right_actif"/>
|
||||
<input type="hidden" name="sbas_id" value="{{rights['sbas_id']}}"/>
|
||||
</div>
|
||||
</td>
|
||||
<td class="users_col options">
|
||||
<div>
|
||||
▼
|
||||
<i class="fa fa-caret-down fa-right"></i>
|
||||
<input type="hidden" name="right" value="right_canputinalbum"/>
|
||||
<input type="hidden" name="sbas_id" value="{{rights['sbas_id']}}"/>
|
||||
</div>
|
||||
</td>
|
||||
<td class="users_col options">
|
||||
<div>
|
||||
▼
|
||||
<i class="fa fa-caret-down fa-right"></i>
|
||||
<input type="hidden" name="right" value="right_candwnldpreview"/>
|
||||
<input type="hidden" name="sbas_id" value="{{rights['sbas_id']}}"/>
|
||||
</div>
|
||||
</td>
|
||||
<td class="users_col options">
|
||||
<div>
|
||||
▼
|
||||
<i class="fa fa-caret-down fa-right"></i>
|
||||
<input type="hidden" name="right" value="right_nowatermark"/>
|
||||
<input type="hidden" name="sbas_id" value="{{rights['sbas_id']}}"/>
|
||||
</div>
|
||||
</td>
|
||||
<td class="users_col options">
|
||||
<div>
|
||||
▼
|
||||
<i class="fa fa-caret-down fa-right"></i>
|
||||
<input type="hidden" name="right" value="right_candwnldhd"/>
|
||||
<input type="hidden" name="sbas_id" value="{{rights['sbas_id']}}"/>
|
||||
</div>
|
||||
</td>
|
||||
<td class="users_col options">
|
||||
<div>
|
||||
▼
|
||||
<i class="fa fa-caret-down fa-right"></i>
|
||||
<input type="hidden" name="right" value="right_cancmd"/>
|
||||
<input type="hidden" name="sbas_id" value="{{rights['sbas_id']}}"/>
|
||||
</div>
|
||||
@@ -252,70 +234,70 @@
|
||||
</td>
|
||||
<td class="users_col options">
|
||||
<div>
|
||||
▼
|
||||
<i class="fa fa-caret-down fa-right"></i>
|
||||
<input type="hidden" name="right" value="right_canaddrecord"/>
|
||||
<input type="hidden" name="sbas_id" value="{{rights['sbas_id']}}"/>
|
||||
</div>
|
||||
</td>
|
||||
<td class="users_col options">
|
||||
<div>
|
||||
▼
|
||||
<i class="fa fa-caret-down fa-right"></i>
|
||||
<input type="hidden" name="right" value="right_canmodifrecord"/>
|
||||
<input type="hidden" name="sbas_id" value="{{rights['sbas_id']}}"/>
|
||||
</div>
|
||||
</td>
|
||||
<td class="users_col options">
|
||||
<div>
|
||||
▼
|
||||
<i class="fa fa-caret-down fa-right"></i>
|
||||
<input type="hidden" name="right" value="right_chgstatus"/>
|
||||
<input type="hidden" name="sbas_id" value="{{rights['sbas_id']}}"/>
|
||||
</div>
|
||||
</td>
|
||||
<td class="users_col options">
|
||||
<div>
|
||||
▼
|
||||
<i class="fa fa-caret-down fa-right"></i>
|
||||
<input type="hidden" name="right" value="right_candeleterecord"/>
|
||||
<input type="hidden" name="sbas_id" value="{{rights['sbas_id']}}"/>
|
||||
</div>
|
||||
</td>
|
||||
<td class="users_col options">
|
||||
<div>
|
||||
▼
|
||||
<i class="fa fa-caret-down fa-right"></i>
|
||||
<input type="hidden" name="right" value="right_imgtools"/>
|
||||
<input type="hidden" name="sbas_id" value="{{rights['sbas_id']}}"/>
|
||||
</div>
|
||||
</td>
|
||||
<td class="users_col options">
|
||||
<div>
|
||||
▼
|
||||
<i class="fa fa-caret-down fa-right"></i>
|
||||
<input type="hidden" name="right" value="right_canadmin"/>
|
||||
<input type="hidden" name="sbas_id" value="{{rights['sbas_id']}}"/>
|
||||
</div>
|
||||
</td>
|
||||
<td class="users_col options">
|
||||
<div>
|
||||
▼
|
||||
<i class="fa fa-caret-down fa-right"></i>
|
||||
<input type="hidden" name="right" value="right_canreport"/>
|
||||
<input type="hidden" name="sbas_id" value="{{rights['sbas_id']}}"/>
|
||||
</div>
|
||||
</td>
|
||||
<td class="users_col options">
|
||||
<div>
|
||||
▼
|
||||
<i class="fa fa-caret-down fa-right"></i>
|
||||
<input type="hidden" name="right" value="right_canpush"/>
|
||||
<input type="hidden" name="sbas_id" value="{{rights['sbas_id']}}"/>
|
||||
</div>
|
||||
</td>
|
||||
<td class="users_col options">
|
||||
<div>
|
||||
▼
|
||||
<i class="fa fa-caret-down fa-right"></i>
|
||||
<input type="hidden" name="right" value="right_manage"/>
|
||||
<input type="hidden" name="sbas_id" value="{{rights['sbas_id']}}"/>
|
||||
</div>
|
||||
</td>
|
||||
<td class="users_col options">
|
||||
<div>
|
||||
▼
|
||||
<i class="fa fa-caret-down fa-right"></i>
|
||||
<input type="hidden" name="right" value="right_modify_struct"/>
|
||||
<input type="hidden" name="sbas_id" value="{{rights['sbas_id']}}"/>
|
||||
</div>
|
||||
@@ -333,35 +315,32 @@
|
||||
{{_self.format_checkbox(app.getAuthenticatedUser(), rights, constant('\\ACL::BAS_MODIFY_STRUCT'), users, 'sbas')}}
|
||||
</td>
|
||||
<td style="text-align:center;width:48px;">
|
||||
<span class="select-all-bdd-right btn btn-primary btn-small">
|
||||
{{ 'admin::users:edit:select all having rights' | trans }}
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
<tr class="right-items" style="line-height: 40px;">
|
||||
<td style="overflow:hidden;white-space:nowrap;">
|
||||
<td style="overflow:hidden;white-space:nowrap;" title="{{rights['base_id']|bas_labels(app)}}">
|
||||
{{rights['base_id']|bas_labels(app)}}
|
||||
</td>
|
||||
<td class="users_col case_right_access" title="{{ 'Access' | trans }}">
|
||||
<td class="users_col case_right_access left-right" title="{{ 'Access' | trans }}">
|
||||
{{_self.format_checkbox(app.getAuthenticatedUser(), rights, constant('\\ACL::ACCESS'), users, 'base')}}
|
||||
</td>
|
||||
<td class="users_col case_right_actif" title="{{ 'Active' | trans }}">
|
||||
<td class="users_col case_right_actif left-right" title="{{ 'Active' | trans }}">
|
||||
{{_self.format_checkbox(app.getAuthenticatedUser(), rights, constant('\\ACL::ACTIF'), users, 'base')}}
|
||||
</td>
|
||||
<td class="users_col case_right_canputinalbum" title="{{ 'Allowed to add in basket' | trans }}">
|
||||
<td class="users_col case_right_canputinalbum left-right" title="{{ 'Allowed to add in basket' | trans }}">
|
||||
{{_self.format_checkbox(app.getAuthenticatedUser(), rights, constant('\\ACL::CANPUTINALBUM'), users, 'base')}}
|
||||
</td>
|
||||
<td class="users_col case_right_candwnldpreview" title="{{ 'Access to preview' | trans }}">
|
||||
<td class="users_col case_right_candwnldpreview left-right" title="{{ 'Access to preview' | trans }}">
|
||||
{{_self.format_checkbox(app.getAuthenticatedUser(), rights, constant('\\ACL::CANDWNLDPREVIEW'), users, 'base')}}
|
||||
</td>
|
||||
<td class="users_col case_right_nowatermark" title="{{ 'Remove watermark' | trans }}">
|
||||
<td class="users_col case_right_nowatermark left-right" title="{{ 'Remove watermark' | trans }}">
|
||||
{{_self.format_checkbox(app.getAuthenticatedUser(), rights, constant('\\ACL::NOWATERMARK'), users, 'base')}}
|
||||
</td>
|
||||
<td class="users_col case_right_candwnldhd" title="{{ 'Access to HD' | trans }}">
|
||||
<td class="users_col case_right_candwnldhd left-right" title="{{ 'Access to HD' | trans }}">
|
||||
{{_self.format_checkbox(app.getAuthenticatedUser(), rights, constant('\\ACL::CANDWNLDHD'), users, 'base')}}
|
||||
</td>
|
||||
<td class="users_col case_right_cancmd" title="{{ 'Allowed to order' | trans }}">
|
||||
<td class="users_col case_right_cancmd left-right" title="{{ 'Allowed to order' | trans }}">
|
||||
{{_self.format_checkbox(app.getAuthenticatedUser(), rights, constant('\\ACL::CANCMD'), users, 'base')}}
|
||||
</td>
|
||||
<td class="users_col case_right_quota" title="{{ 'Set download quotas' | trans }}">
|
||||
@@ -427,13 +406,15 @@
|
||||
<td class="users_col case_right_modify" title="{{ 'Manage values lists' | trans }}">
|
||||
{{_self.format_checkbox(app.getAuthenticatedUser(), rights, constant('\\ACL::COLL_MODIFY_STRUCT'), users, 'base')}}
|
||||
</td>
|
||||
<td colspan="5">
|
||||
<span class="select-all-bdd btn btn-success btn-small">
|
||||
{{ 'admin::users:edit:select all ' | trans }}
|
||||
</span>
|
||||
<span class=" btn btn-danger btn-small unselect-all-bdd hide">
|
||||
{{ 'admin::users:edit:unselect all ' | trans }}
|
||||
</span>
|
||||
|
||||
<td class="select-all-line" colspan="5" title="{{'admin::users:edit: Manage inline selection' | trans }}">
|
||||
<div class="select-all-line-btn">
|
||||
<i class="fa fa-caret-down fa-right"></i>
|
||||
</div>
|
||||
<div class="users_check_line_wrap hide">
|
||||
<div class="checker check_left_right">{{'admin::users:edit: check read right' | trans }}</div>
|
||||
<div class="unchecker check-all_right">{{'admin::users:edit: check all right' | trans }}</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
@@ -1109,35 +1090,30 @@
|
||||
}
|
||||
});
|
||||
|
||||
$('.select-all-bdd-right').click(function () {
|
||||
$('.main-right-item > div').removeClass('unchecked').addClass('checked');
|
||||
$('.main-right-item > div > input').val(1);
|
||||
|
||||
$('body').click(function() {
|
||||
$('.users_check_line_wrap').addClass('hide');
|
||||
});
|
||||
$('.select-all-line-btn').click(function (event) {
|
||||
event.stopPropagation();
|
||||
var top = $(this).offset().top - 50;
|
||||
var left = $(this).offset().left + 60;
|
||||
$('.users_check_line_wrap').addClass('hide');
|
||||
$(this).closest('.select-all-line').find('.users_check_line_wrap').removeClass('hide').css('top', +top+'px');
|
||||
|
||||
});
|
||||
$('.check_left_right').click(function () {
|
||||
$(this).closest('.right-items').find('.left-right div').show().removeClass('unchecked').addClass('checked');
|
||||
$(this).closest('.right-items').find('.left-right input').val(1);
|
||||
$('.users_check_line_wrap').addClass('hide');
|
||||
});
|
||||
|
||||
$('.select-all-bdd').click(function () {
|
||||
$('.check-all_right').click(function () {
|
||||
$(this).closest('.right-items').find('div').show().removeClass('unchecked').addClass('checked');
|
||||
$(this).closest('.right-items').find('input').val(1);
|
||||
$(this).closest('.right-items').find('.unselect-all-bdd').removeClass('hide');
|
||||
$(this).addClass('hide');
|
||||
});
|
||||
$('.unselect-all-bdd').click(function () {
|
||||
$(this).closest('.right-items').find('div').hide().addClass('unchecked').remove('checked');
|
||||
$(this).closest('.right-items').find('.case_right_access div').show();
|
||||
$(this).closest('.right-items').find('input').val(0);
|
||||
$(this).closest('.right-items').find('.select-all-bdd').removeClass('hide');
|
||||
$(this).addClass('hide');
|
||||
$('.users_check_line_wrap').addClass('hide');
|
||||
});
|
||||
|
||||
function countCheckedRight() {
|
||||
$(".right-items" ).each(function() {
|
||||
let count_checked = $( this ).find('input.checked').length;
|
||||
if ( count_checked == 17) {
|
||||
$(this).find('.select-all-bdd').addClass('hide');
|
||||
$(this).find('.unselect-all-bdd').removeClass('hide');
|
||||
}
|
||||
});
|
||||
};
|
||||
countCheckedRight();
|
||||
});
|
||||
|
||||
require([
|
||||
|
@@ -42,6 +42,8 @@
|
||||
serverDisconnected: '{{ 'phraseanet::erreur: Votre session est fermee, veuillez vous re-authentifier' | trans | e('js') }}',
|
||||
check_all : '{{ 'Cocher toute la colonne' | trans | e('js') }}',
|
||||
uncheck_all : '{{ 'Decocher toute la colonne' | trans | e('js') }}',
|
||||
check_left_right : '{{ 'admin::users:edit: check left right' | trans | e('js') }}',
|
||||
check_all_right : '{{ 'admin::users:edit: check all right' | trans | e('js') }}',
|
||||
create_template : '{{ 'Creer un model' | trans | e('js') }}',
|
||||
create_user : '{{ 'Creer un utilisateur' | trans | e('js') }}',
|
||||
annuler : '{{ 'boutton::annuler' | trans | e('js') }}',
|
||||
|
Reference in New Issue
Block a user