mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 09:53:15 +00:00
191 lines
9.7 KiB
Twig
191 lines
9.7 KiB
Twig
<script src="https://rawgithub.com/trentrichardson/jQuery-Timepicker-Addon/master/jquery-ui-timepicker-addon.js"></script>
|
|
<div>
|
|
<button class="tools-accordion">Actions</button>
|
|
<div class="tools-panel">
|
|
<button class="ui-corner-all TOOL_disktt_btn basket_window" data-selection-source="basket">
|
|
<img src="/assets/common/images/icons/disktt_history.png"/>
|
|
<span>{{ 'action : exporter' | trans }}</span>
|
|
</button>
|
|
<button class="ui-corner-all TOOL_print_btn basket_window" data-selection-source="basket">
|
|
<img src="/assets/common/images/icons/print_history.png"/>
|
|
<span>{{ 'action : print' | trans }}</span>
|
|
</button>
|
|
<div class="divider"></div>
|
|
<button class="ui-corner-all TOOL_delete_selection_btn basket_window" data-selection-source="basket">
|
|
<img src="/assets/common/images/icons/delete-selection.png"/>
|
|
<span>{{ 'basket:action:delete record form basket' | trans }}</span>
|
|
</button>
|
|
<div class="divider"></div>
|
|
{% if app.getAclForUser(app.getAuthenticatedUser()).has_right(constant('\\ACL::CANMODIFRECORD')) %}
|
|
<button class="ui-corner-all TOOL_ppen_btn basket_window" data-selection-source="basket">
|
|
<img src="/assets/common/images/icons/ppen_history.png"/>
|
|
<span>{{ 'action : editer' | trans }}</span>
|
|
</button>
|
|
{% endif %}
|
|
|
|
{% if app.getAclForUser(app.getAuthenticatedUser()).has_right(constant('\\ACL::CHGSTATUS')) %}
|
|
<button class="ui-corner-all TOOL_chgstatus_btn basket_window" data-selection-source="basket">
|
|
<img src="/assets/common/images/icons/chgstatus_history.png"/>
|
|
<span>{{ 'action : status' | trans }}</span>
|
|
</button>
|
|
{% endif %}
|
|
|
|
{% if app.getAclForUser(app.getAuthenticatedUser()).has_right(constant('\\ACL::CANDELETERECORD')) and app.getAclForUser(app.getAuthenticatedUser()).has_right(constant('\\ACL::CANADDRECORD')) %}
|
|
<button class="ui-corner-all TOOL_chgcoll_btn basket_window" data-selection-source="basket">
|
|
<img src="/assets/common/images/icons/chgcoll_history.png"/>
|
|
<span>{{ 'action : collection' | trans }}</span>
|
|
</button>
|
|
{% endif %}
|
|
|
|
<div class="divider"></div>
|
|
|
|
{% if app.getAclForUser(app.getAuthenticatedUser()).has_right(constant('\\ACL::CANPUSH')) %}
|
|
<button class="ui-corner-all TOOL_pushdoc_btn basket_window" data-selection-source="basket">
|
|
<img src="/assets/common/images/icons/push16.png"/>
|
|
<span>{{ 'action : push' | trans }}</span>
|
|
</button>
|
|
{% endif %}
|
|
|
|
{% if app.getAclForUser(app.getAuthenticatedUser()).has_right(constant('\\ACL::CANPUSH')) %}
|
|
<button class="ui-corner-all TOOL_feedback_btn basket_window" data-selection-source="basket">
|
|
<img src="/assets/common/images/icons/feedback16.png"/>
|
|
<span>{{ 'Feedback' | trans }}</span>
|
|
</button>
|
|
{% endif %}
|
|
{% if app.getAclForUser(app.getAuthenticatedUser()).has_right(constant('\\ACL::BAS_CHUPUB')) %}
|
|
{#<button class="ui-corner-all TOOL_bridge_btn basket_window" title="{{ 'action : bridge' | trans }}" data-href="{{ path("prod_bridge_manager") }}">#}
|
|
{#<img src="/assets/common/images/icons/door.png"/>#}
|
|
{#</button>#}
|
|
<button class="ui-corner-all TOOL_publish_btn basket_window" data-selection-source="basket">
|
|
<img src="/assets/common/images/icons/rss16.png"/>
|
|
<span>{{ 'action : publier' | trans }}</span>
|
|
</button>
|
|
{% endif %}
|
|
|
|
{% if app.getAclForUser(app.getAuthenticatedUser()).has_right(constant('\\ACL::IMGTOOLS')) %}
|
|
<button class="ui-corner-all TOOL_imgtools_btn basket_window" data-selection-source="basket">
|
|
<img src="/assets/common/images/icons/imgtools_history.png"/>
|
|
<span>{{ 'action : outils' | trans }}</span>
|
|
</button>
|
|
{% endif %}
|
|
|
|
<div class="divider"></div>
|
|
|
|
<button class="ui-corner-all TOOL_trash_btn basket_window" data-selection-source="basket">
|
|
<img src="/assets/common/images/icons/delete.png"/>
|
|
<span>{{ 'basket:action:delete record form database' | trans }}</span>
|
|
</button>
|
|
|
|
{% if plugins['actionbar'] is not empty %}
|
|
{% for plugin in plugins['actionbar'] %}
|
|
{% for key, action in plugin.getBasketActionBar() %}
|
|
{% set label = action.label %}
|
|
<button class="ui-corner-all basket_window {{ action.classes|default('') }}"
|
|
data-selection-source="basket">
|
|
<img src="{{ plugin_asset(plugin.PluginName, action.icon) }}"/>
|
|
<span>{{ label|trans([], plugin.PluginLocale) }}</span>
|
|
</button>
|
|
{% endfor %}
|
|
{% endfor %}
|
|
{% endif %}
|
|
</div>
|
|
{% if basket.getValidation() %}
|
|
<div class="feedback-info">
|
|
{% set nb_records = basket.getElements()|length %}
|
|
{% set date = app['date-formatter'].getPrettyString(basket.getUpdated()) %}
|
|
|
|
<p class="create-date">
|
|
{{ 'prod:workzone:basket:creation-date' | trans }} : {{ date }}
|
|
</p>
|
|
<div class="record-number"> {% trans with {'%nb_records%' : nb_records} %}%nb_records% records{% endtrans %}</div>
|
|
|
|
{% set dateExpired = app['date-formatter'].getTranslatedDate(basket.getValidation().getExpires()) %}
|
|
<div class="expiredDate">
|
|
{% if date(dateExpired) < date() %}
|
|
<span>{{ 'workzone:feedback:expiration-closed' | trans }} :</span>
|
|
{% else %}
|
|
<span>{{ 'workzone:feedback:expiration-open' | trans }} :</span>
|
|
{% endif %}
|
|
|
|
<form class="update-feed-validation">
|
|
<input type="hidden" name="feedbackId" value={{ basket.getId}} />
|
|
<input type="hidden" name="feedbackDate" class="alternate" />
|
|
<input type="text" class="btn feed-datepicker" name="feedback-deadline" value="{{ dateExpired }}">
|
|
<button type="submit" class="submit hidden submit-validation" title="{{ 'workzone:feedback:update' | trans }}"><i class="fa fa-save"></i></button>
|
|
</form>
|
|
<p class="message text-right" style="opacity: 0;transition: all 0.2s; color: green; display: block; ">{{ 'prod:workzone:basket:updated-message' | trans }}</p>
|
|
</div>
|
|
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
{% set basket_length = basket.getElements()|length %}
|
|
<div class="alert_datas_changed ui-corner-all">{{ 'Certaines donnees du panier ont change' | trans }} <a class="basket_refresher" href="#">{{ 'rafraichir' | trans }}</a></div>
|
|
{% if basket_length == 0 %}
|
|
<div style="height:120px;"></div>
|
|
{% endif %}
|
|
|
|
{% set basket_scope = 'objects' %}
|
|
|
|
{% import 'prod/WorkZone/Macros.html.twig' as Macros %}
|
|
|
|
{% if basket.getValidation() %}
|
|
{{ Macros.display_validation(app, basket, ordre) }}
|
|
|
|
{% else %}
|
|
{{ Macros.display_basket(app, basket) }}
|
|
{% endif %}
|
|
</div>
|
|
|
|
|
|
<script type="text/javascript">
|
|
$( ".update-feed-validation" ).on( "submit", function( event ) {
|
|
event.preventDefault();
|
|
var formData = $(this).serializeArray();
|
|
|
|
$.ajax({
|
|
type: 'POST',
|
|
url: '/prod/push/update-expiration/',
|
|
data: {
|
|
basket_id: formData[0].value,
|
|
date: formData[1].value
|
|
},
|
|
beforeSend: function() {
|
|
console.log(formData[0].value);
|
|
console.log(formData[1].value);
|
|
},
|
|
success: function (data) {
|
|
$('.message').css('opacity',1);
|
|
$('.submit-validation').addClass('hidden');
|
|
setTimeout(function(){ $('.message').css('opacity',0); }, 2000);
|
|
},
|
|
});
|
|
});
|
|
$( function() {
|
|
$.datepicker.regional['default'] = {
|
|
closeText: "{{ 'workzone:datepicker:closeText' | trans }}",
|
|
prevText: "{{ 'workzone:datepicker:prevText' | trans }}",
|
|
nextText: "{{ 'workzone:datepicker:nextText' | trans }}",
|
|
currentText: "{{ 'workzone:datepicker:currentText' | trans }}",
|
|
monthNames: [ "{{ 'workzone:datepicker:january' | trans }}", "{{ 'workzone:datepicker:february' | trans }}", "{{ 'workzone:datepicker:march' | trans }}", "{{ 'workzone:datepicker:april' | trans }}", "{{ 'workzone:datepicker:may' | trans }}", "{{ 'workzone:datepicker:june' | trans }}",
|
|
"{{ 'workzone:datepicker:july' | trans }}", "{{ 'workzone:datepicker:august' | trans }}", "{{ 'workzone:datepicker:september' | trans }}", "{{ 'workzone:datepicker:october' | trans }}", "{{ 'workzone:datepicker:november' | trans }}", "{{ 'workzone:datepicker:december' | trans }}" ],
|
|
dayNames: [ "{{ 'workzone:datepicker:sunday' | trans }}", "{{ 'workzone:datepicker:monday' | trans }}", "{{ 'workzone:datepicker:tuesday' | trans }}", "{{ 'workzone:datepicker:wednesday' | trans }}", "{{ 'workzone:datepicker:thursday' | trans }}", "{{ 'workzone:datepicker:friday' | trans }}", "{{ 'workzone:datepicker:saturday' | trans }}" ],
|
|
dayNamesMin: [ "D","L","M","M","J","V","S" ],
|
|
dateFormat: "d MM yy",
|
|
altField: ".alternate",
|
|
altFormat: "yy-mm-dd",
|
|
minDate: 0
|
|
|
|
};
|
|
|
|
$(".feed-datepicker" ).datepicker( $.datepicker.regional[ 'default' ]);
|
|
$(".feed-datepicker" ).change(function() {
|
|
$('.submit-validation').removeClass('hidden');
|
|
})
|
|
})
|
|
|
|
</script>
|
|
|
|
|
|
|