mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 09:53:15 +00:00
Merge branch 'master' into PHRAS-2184-list-manager-email-domain-filter
This commit is contained in:
@@ -8,14 +8,27 @@
|
||||
|
||||
{% block content %}
|
||||
<div class="noToolTipResize" style="margin:5px;width:{{ width - 40 }}px;height:auto !important;height:380px;max-height:380px;min-height:220px;position:relative;">
|
||||
<span class="expiredDate">
|
||||
{% if basket.getValidation() %}
|
||||
{% set dateExpired = app['date-formatter'].getPrettyString(basket.getValidation().getExpires()) %}
|
||||
{% if basket.getValidation().getExpires() < date() %}
|
||||
<span>{{ 'workzone:feedback:expiration-closed' | trans }} :</span>
|
||||
{% else %}
|
||||
<span>{{ 'workzone:feedback:expiration-open' | trans }} :</span>
|
||||
{% endif %} {{ dateExpired }}
|
||||
{% endif %}
|
||||
</span>
|
||||
<div style="margin:5px 0;max-height:160px;overflow:hidden;text-overflow:ellipsis;">
|
||||
{{ basket.getDescription()|nl2br }}
|
||||
</div>
|
||||
<div style="margin:5px 0;text-align:right;font-style:italic;position:relative;">
|
||||
<div style="margin:5px 0;font-style:italic;position:relative;width: 100%">
|
||||
{% set nb_records = basket.getElements()|length %}
|
||||
{% set date = app['date-formatter'].getPrettyString(basket.getUpdated()) %}
|
||||
{% trans with {'%nb_records%' : nb_records} %}%nb_records% records{% endtrans %}
|
||||
- {{ date }}
|
||||
|
||||
<div style="text-align:right">
|
||||
{% trans with {'%nb_records%' : nb_records} %}%nb_records% records{% endtrans %}
|
||||
- {{ 'prod:workzone:basket:creation-date' | trans }} : {{ date }}
|
||||
</div>
|
||||
<hr/>
|
||||
<div style="position:relative;float:left;width:470px;">
|
||||
{% for element in basket.getElements() %}
|
||||
|
@@ -1,6 +1,11 @@
|
||||
{% extends 'prod/Tooltip/Tooltip.html.twig' %}
|
||||
|
||||
{% set title %}{{ 'Caption' | trans }}{% endset %}
|
||||
{% set title %}{{ 'Caption' | trans }} <span class="collection-block" style="float: right"> {% set collectionLogo = collection_logo(record.baseId) %}
|
||||
{% if collectionLogo is empty %}
|
||||
{{ record.collectionName }}
|
||||
{% else %}
|
||||
{{ collectionLogo|raw }}
|
||||
{% endif %}</span> {% endset %}
|
||||
{% set width = 400 %}
|
||||
{% set maxwidth = 700 %}
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{# designed to be printed in a small box #}
|
||||
<div class="PNB10" callback="{{ callback }}">
|
||||
<form id="quickAddUser" method="POST" action="{{ path('prod_push_do_add_user') }}">
|
||||
<form id="quickAddUser" method="POST" action="{{ path('prod_push_do_add_user') }}" style="padding-top: 20px">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
@@ -23,16 +23,6 @@
|
||||
<input name="job" placeholder="{{ 'Job' | trans }}" type="text" value=""/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input name="city" placeholder="{{ 'City' | trans }}" type="text" value="" class="geoname_field"
|
||||
autocomplete="false"/>
|
||||
</td>
|
||||
<td>
|
||||
<input name="pays" placeholder="{{ 'Pays' | trans }}" type="text" value="" class="geoname_field"
|
||||
autocomplete="false"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" style="text-align: center;padding: 10px 0px;">
|
||||
<button class="cancel" type="button">{{ 'Cancel' | trans }}</button>
|
||||
|
@@ -1,3 +1,4 @@
|
||||
<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">
|
||||
@@ -88,8 +89,37 @@
|
||||
{% 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 basket.getValidation().getExpires() < 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 submit-validation btn-not-shown" title="{{ 'workzone:feedback:update' | trans }}"><svg width="22" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" data-prefix="fas" data-icon="calendar-check" class="svg-inline--fa fa-calendar-check fa-w-14" role="img" viewBox="0 0 448 512"><path fill="currentColor" d="M436 160H12c-6.627 0-12-5.373-12-12v-36c0-26.51 21.49-48 48-48h48V12c0-6.627 5.373-12 12-12h40c6.627 0 12 5.373 12 12v52h128V12c0-6.627 5.373-12 12-12h40c6.627 0 12 5.373 12 12v52h48c26.51 0 48 21.49 48 48v36c0 6.627-5.373 12-12 12zM12 192h424c6.627 0 12 5.373 12 12v260c0 26.51-21.49 48-48 48H48c-26.51 0-48-21.49-48-48V204c0-6.627 5.373-12 12-12zm333.296 95.947l-28.169-28.398c-4.667-4.705-12.265-4.736-16.97-.068L194.12 364.665l-45.98-46.352c-4.667-4.705-12.266-4.736-16.971-.068l-28.397 28.17c-4.705 4.667-4.736 12.265-.068 16.97l82.601 83.269c4.667 4.705 12.265 4.736 16.97.068l142.953-141.805c4.705-4.667 4.736-12.265.068-16.97z"/></svg></button>
|
||||
<span class="cancel-date btn-not-shown"><i class="fa fa-times"></i></span>
|
||||
</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>
|
||||
<div style="margin:0 7px;overflow:hidden;position:relative">
|
||||
{% 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 %}
|
||||
@@ -102,10 +132,63 @@
|
||||
|
||||
{% 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
|
||||
},
|
||||
success: function (data) {
|
||||
$('.message').css('opacity',1);
|
||||
$('.submit-validation').addClass ('btn-not-shown');
|
||||
$('.cancel-date').addClass ('btn-not-shown');
|
||||
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('btn-not-shown');
|
||||
$('.cancel-date').removeClass('btn-not-shown');
|
||||
});
|
||||
$(".cancel-date" ).click(function() {
|
||||
$('.cancel-date').removeClass('btn-not-shown');
|
||||
$('.feed-datepicker').val('{{ dateExpired }}');
|
||||
setTimeout(function(){ $('.cancel-date').addClass('btn-not-shown');$('.submit-validation').addClass('btn-not-shown'); }, 1000);
|
||||
})
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
@@ -5,35 +5,68 @@
|
||||
</a>
|
||||
</div>
|
||||
<div class="bloc">
|
||||
<div id="basket-filter" class="basket-filter">
|
||||
<span class="filter-title">{{ 'See' | trans }} : </span>
|
||||
<span class="filter-item">
|
||||
<label id="basket-list" class="checkbox inline" for="basketFilter">
|
||||
<input type="checkbox" class="checkbox " name="basketFilter" value="basket" checked>
|
||||
{{ 'Basket' | trans }}
|
||||
</label>
|
||||
</span>
|
||||
<span class="filter-item">
|
||||
<label id="feedback-list" class="checkbox inline" for="basketFilter">
|
||||
<input type="checkbox" class="checkbox " name="basketFilter" value="feedback" checked>
|
||||
{{ 'Feedback' | trans }}
|
||||
</label>
|
||||
</span>
|
||||
<span class="filter-item">
|
||||
<label id="push-list" class="checkbox inline" for="basketFilter">
|
||||
<input type="checkbox" class="checkbox " name="basketFilter" value="push" checked >
|
||||
{{ 'Push' | trans }}
|
||||
</label>
|
||||
</span>
|
||||
<span class="filter-item">
|
||||
<label id="story-list" class="checkbox inline" for="basketFilter">
|
||||
<input type="checkbox" class="checkbox " name="basketFilter" value="story" checked>
|
||||
{{ 'Stories' | trans }}
|
||||
</label>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="insidebloc">
|
||||
{% set content = WorkZone.getContent(srt) %}
|
||||
<div id="validations-block" class="validations-block">
|
||||
{% for basket in content.get(constant('\\Alchemy\\Phrasea\\Helper\\WorkZone::VALIDATIONS')) %}
|
||||
|
||||
<div tooltipsrc="{{ path('prod_tooltip_basket', { 'basket' : basket.getId() }) }}"
|
||||
id="SSTT_{{basket.getId()}}"
|
||||
class="basketTips ui-accordion-header ui-state-default
|
||||
ui-corner-all header SSTT basket {% if not basket.isRead() %}unread{% endif %}
|
||||
ui-corner-all header SSTT basket {% if not basket.getId() %}unread{% endif %}
|
||||
{% if basket.getId() == selected_id and selected_type == 'basket' %}active{% endif %}">
|
||||
<a class="workzone-menu-title" href="{{ path('prod_baskets_basket', { 'basket' : basket.getId() }) }}">
|
||||
<span>
|
||||
{% if not basket.isRead() %}
|
||||
<img src='/assets/common/images/icons/basket_push_unread.png' title=''/>
|
||||
<img src='/assets/common/images/icons/basket_feedback_unread.png' title=''/>
|
||||
{% else %}
|
||||
<img src='/assets/common/images/icons/basket_feedback_read.png' title=''/>
|
||||
{% endif %}
|
||||
<img src='/assets/common/images/icons/basket.png' title=''/>
|
||||
{{basket.getName()|e}}
|
||||
</span>
|
||||
</a>
|
||||
|
||||
<div class="menu">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<img
|
||||
title="{{ basket.getDescription() }}"
|
||||
class="basketTips basket_title"
|
||||
src="/assets/common/images/icons/valid.png"
|
||||
/>
|
||||
<img title="{{ basket.getDescription()|e }}"
|
||||
class="basket_title"
|
||||
src="/assets/common/images/icons/valid.png" />
|
||||
</td>
|
||||
<td>
|
||||
<a class="contextMenuTrigger icon-display-grid" href="#"></a>
|
||||
<td class="contextMenuWrapper">
|
||||
<a class="contextMenuTrigger" href="#">
|
||||
<i class="icomoon icon-circle fa-stack-2x fa-inverse-bg" aria-hidden="true"></i>
|
||||
<i class="icomoon icon-round-more_horiz-24px white fa-stack-1x fa-inverse" aria-hidden="true"></i>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -79,13 +112,15 @@
|
||||
</div>
|
||||
<div id="SSTT_content_{{basket.getId()}}" class="content basket" style="overflow:hidden;"></div>
|
||||
{% endfor %}
|
||||
|
||||
</div>
|
||||
<div id="all_baskets-block" class="all_baskets-block">
|
||||
{% for basket in content.get(constant('\\Alchemy\\Phrasea\\Helper\\WorkZone::BASKETS')) %}
|
||||
|
||||
<div tooltipsrc="{{ path('prod_tooltip_basket', { 'basket' : basket.getId() }) }}"
|
||||
id="SSTT_{{basket.getId()}}"
|
||||
class="basketTips ui-accordion-header ui-state-default
|
||||
ui-corner-all header SSTT basket {% if not basket.isRead() %}unread{% endif %}
|
||||
{% if basket.getId() == selected_id and selected_type == 'basket' %}active{% endif %}">
|
||||
{% if basket.getId() == selected_id and selected_type == 'basket' %}active{% endif %}{% if basket.getValidation() %}feedbacks-block{% elseif basket.getPusher() %}pushes-block{% else %}baskets-block{% endif %} ">
|
||||
<a class="workzone-menu-title" href="{{ path('prod_baskets_basket', { 'basket' : basket.getId() }) }}" style="">
|
||||
<span>
|
||||
{% if basket.getValidation() %}
|
||||
@@ -126,8 +161,10 @@
|
||||
</td>
|
||||
{% endif %}
|
||||
-->
|
||||
<td>
|
||||
<a class="contextMenuTrigger icon-display-grid" href="#"></a>
|
||||
<td class="contextMenuWrapper">
|
||||
<a class="contextMenuTrigger" href="#">
|
||||
<i class="icomoon icon-circle fa-stack-2x fa-inverse-bg" aria-hidden="true"></i>
|
||||
<i class="icomoon icon-round-more_horiz-24px white fa-stack-1x fa-inverse" aria-hidden="true"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -210,9 +247,8 @@
|
||||
</div>
|
||||
<div id="SSTT_content_{{basket.getId()}}" class="content basket" style="overflow:hidden;"> </div>
|
||||
{% endfor %}
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div id="stories-block" class="stories-block">
|
||||
{% for story in content.get(constant('\\Alchemy\\Phrasea\\Helper\\WorkZone::STORIES')) %}
|
||||
<div tooltipsrc="{{ path('prod_tooltip_story', { 'sbas_id' : story.getRecord(app).get_sbas_id(), 'record_id' : story.getRecord(app).get_record_id() }) }}"
|
||||
id="SSWZ_{{story.getId()}}" sbas="{{story.getSbasId()}}"
|
||||
@@ -229,8 +265,11 @@
|
||||
<div class="menu">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<a class="contextMenuTrigger icon-display-grid" href="#"></a>
|
||||
<td class="contextMenuWrapper">
|
||||
<a class="contextMenuTrigger " href="#">
|
||||
<i class="icomoon icon-circle fa-stack-2x fa-inverse-bg" aria-hidden="true"></i>
|
||||
<i class="icomoon icon-round-more_horiz-24px white fa-stack-1x fa-inverse" aria-hidden="true"></i>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -292,6 +331,7 @@
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
|
||||
@@ -305,49 +345,57 @@
|
||||
{% endif %}
|
||||
|
||||
{% import 'common/thumbnail.html.twig' as thumbnail %}
|
||||
<div class="chim-content">
|
||||
<div class="CHIM diapo CHIM_{{record.get_serialize_key()}} open-preview-action"
|
||||
data-kind="{% if wz_scope == 'groupings' %}REG{% else %}BASK{% endif %}"
|
||||
data-position="{{ ord }}"
|
||||
data-id="{% if wz_scope == 'groupings' %}{{container.get_sbas_id()}}_{{container.get_record_id()}}{% else %}{{container.getId()}}{% endif %}"
|
||||
style="height:{{box_height}}px;"
|
||||
id="CHIM_{% if wz_scope == 'groupings' %}{{record.get_serialize_key()}}{% else %}{{ contained.getId() }}{% endif %}">
|
||||
<input type="hidden" name="id" value="{{ record.get_serialize_key() }}"/>
|
||||
<div class="diapo_top">
|
||||
{% if app['settings'].getUserSetting(app.getAuthenticatedUser(), 'basket_title_display') == '1' %}
|
||||
<div class="title">
|
||||
{{ record.get_title()|truncate(20, "...") }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if app['settings'].getUserSetting(app.getAuthenticatedUser(), 'basket_status_display') == '1' %}
|
||||
<div class="status" style="position:relative;height:20px;overflow-y:visible;z-index:15;">
|
||||
{% for flag in record_flags(record) %}
|
||||
<img src="{{ flag.path }}" title="{{ attribute(flag.labels, app.locale) }}" />
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="record-number">
|
||||
{{record.getNumber()}}
|
||||
</div>
|
||||
{{thumbnail.format(record.get_thumbnail,140,140, '', true, false)}}
|
||||
<div class="bottom">
|
||||
{% if app['settings'].getUserSetting(app.getAuthenticatedUser(), 'basket_caption_display') == '1' %}
|
||||
<span class="icon-stack captionRolloverTips captionTips"
|
||||
tooltipsrc="{{ path('prod_tooltip_caption', { 'sbas_id' : record.get_sbas_id(), 'record_id' : record.get_record_id(), 'context' : 'basket', 'number' : record.getNumber() }) }}">
|
||||
<i class="icomoon icon-round-list-24px white" ></i>
|
||||
</span>
|
||||
{% endif %}
|
||||
<a
|
||||
{% if wz_scope == 'groupings' %}
|
||||
id="WZEL{{ container.get_sbas_id() }}_{{ container.get_record_id() }}_{{ record.get_sbas_id() }}_{{ record.get_record_id() }}"
|
||||
href="{{ path('prod_stories_story_remove_element', { 'sbas_id' : container.get_sbas_id(), 'record_id' : container.get_record_id(), 'child_sbas_id' : record.get_sbas_id(), 'child_record_id' : record.get_record_id() }) }}"
|
||||
{% elseif wz_scope == 'basket' %}
|
||||
id="WZEL_{{ container.getId() }}_{{ record.get_sbas_id() }}_{{ record.get_record_id() }}"
|
||||
href="{{ path('prod_baskets_basket_element_remove', { 'basket' : container.getId(), 'basket_element_id' : contained.getId()}) }}"
|
||||
{% elseif wz_scope == 'basket' %}
|
||||
href="#"
|
||||
{% endif %}
|
||||
class="WorkZoneElementRemover {{ wz_scope }}" title="{{ 'delete' | trans }}" >
|
||||
<i class="icomoon icon-circle fa-stack-2x" aria-hidden="true"></i>
|
||||
<i class="icomoon icon-round-close-24px fa-stack-1x " aria-hidden="true"></i>
|
||||
</a>
|
||||
|
||||
<div class="CHIM diapo CHIM_{{record.get_serialize_key()}} open-preview-action"
|
||||
data-kind="{% if wz_scope == 'groupings' %}REG{% else %}BASK{% endif %}"
|
||||
data-position="{{ ord }}"
|
||||
data-id="{% if wz_scope == 'groupings' %}{{container.get_sbas_id()}}_{{container.get_record_id()}}{% else %}{{container.getId()}}{% endif %}"
|
||||
style="height:{{box_height}}px;"
|
||||
id="CHIM_{% if wz_scope == 'groupings' %}{{record.get_serialize_key()}}{% else %}{{ contained.getId() }}{% endif %}">
|
||||
<input type="hidden" name="id" value="{{ record.get_serialize_key() }}"/>
|
||||
{% if app['settings'].getUserSetting(app.getAuthenticatedUser(), 'basket_title_display') == '1' %}
|
||||
<div class="title">
|
||||
{{record.get_title()}}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if app['settings'].getUserSetting(app.getAuthenticatedUser(), 'basket_status_display') == '1' %}
|
||||
<div class="status" style="position:relative;height:20px;overflow-y:visible;z-index:15;">
|
||||
{% for flag in record_flags(record) %}
|
||||
<img src="{{ flag.path }}" title="{{ attribute(flag.labels, app.locale) }}" />
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div style="position:absolute;background-color:#959595;color:black;font-weight:bold;padding:3px;z-index:90;">
|
||||
{{record.getNumber()}}
|
||||
</div>
|
||||
{{thumbnail.format(record.get_thumbnail,82,82, '', true, false)}}
|
||||
<div class="bottom">
|
||||
<a
|
||||
{% if wz_scope == 'groupings' %}
|
||||
id="WZEL{{ container.get_sbas_id() }}_{{ container.get_record_id() }}_{{ record.get_sbas_id() }}_{{ record.get_record_id() }}"
|
||||
href="{{ path('prod_stories_story_remove_element', { 'sbas_id' : container.get_sbas_id(), 'record_id' : container.get_record_id(), 'child_sbas_id' : record.get_sbas_id(), 'child_record_id' : record.get_record_id() }) }}"
|
||||
{% elseif wz_scope == 'basket' %}
|
||||
id="WZEL_{{ container.getId() }}_{{ record.get_sbas_id() }}_{{ record.get_record_id() }}"
|
||||
href="{{ path('prod_baskets_basket_element_remove', { 'basket' : container.getId(), 'basket_element_id' : contained.getId()}) }}"
|
||||
{% elseif wz_scope == 'basket' %}
|
||||
href="#"
|
||||
{% endif %}
|
||||
class="WorkZoneElementRemover {{ wz_scope }}" title="{{ 'delete' | trans }}" >
|
||||
<i class="fa fa-times" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% if app['settings'].getUserSetting(app.getAuthenticatedUser(), 'basket_caption_display') == '1' %}
|
||||
<div class="captionRolloverTips" tooltipsrc="{{ path('prod_tooltip_caption', { 'sbas_id' : record.get_sbas_id(), 'record_id' : record.get_record_id(), 'context' : 'basket', 'number' : record.getNumber() }) }}"></div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro display_basket(app, basket) %}
|
||||
@@ -370,8 +418,8 @@
|
||||
</div>
|
||||
|
||||
{% for basket_element in basket.getElementsByOrder(ordre) %}
|
||||
<span class="chim-wrapper wrapCHIM_{{ basket_element.getRecord(app).get_serialize_key() }} valid">
|
||||
<table style="width: 100%; min-width: 330px; display: inline-block;">
|
||||
<span class="chim-wrapper chim-feedback-item wrapCHIM_{{ basket_element.getRecord(app).get_serialize_key() }} valid">
|
||||
<table style="width: 100%; min-width: 330px; display: inline-block;" >
|
||||
<tr>
|
||||
<td style="width:80px;">
|
||||
{{ _self.element('basket', basket, basket_element, basket_element.getRecord(app), basket_element.getOrd()) }}
|
||||
@@ -412,5 +460,4 @@
|
||||
</table>
|
||||
</span>
|
||||
{% endfor %}
|
||||
|
||||
{% endmacro %}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<div>
|
||||
<button class="tools-accordion"><span>Actions<i class="fa fa-chevron-right rotate"></i></span></button>
|
||||
<button class="tools-accordion"><span>Actions</span></button>
|
||||
<div class="tools-panel">
|
||||
|
||||
<button class="ui-corner-all TOOL_disktt_btn story_window" data-selection-source="story">
|
||||
@@ -81,7 +81,6 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div style="margin:0 7px;overflow:hidden;position: relative">
|
||||
{% set story_length = Story.get_children().get_elements()|length %}
|
||||
<div class="alert_datas_changed ui-corner-all">
|
||||
{{ 'Certaines donnees du reportage ont change' | trans }}
|
||||
@@ -97,8 +96,8 @@
|
||||
{% import 'prod/WorkZone/Macros.html.twig' as Macros %}
|
||||
|
||||
{% for record in Story.get_children().get_elements() %}
|
||||
<span class="wrapCHIM_{{ record.get_serialize_key() }}">
|
||||
<div class="chim-wrapper wrapCHIM_{{ record.get_serialize_key() }}">
|
||||
{{ Macros.element('groupings', Story, record, record, record.getNumber()) }}
|
||||
</span>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
|
@@ -218,8 +218,8 @@
|
||||
</span>
|
||||
</td>
|
||||
<td class="options">
|
||||
<button class="select-all round-blue-border-btn" style="width: 128px; margin-right: 10px;">{{ 'Select all' | trans }}</button>
|
||||
<button class="unselect-all round-blue-border-btn" style="width: 128px;">{{ 'Deselect all' | trans }}</button>
|
||||
<button class="select-all round-blue-border-btn" style="margin-right: 10px;">{{ 'Select all' | trans }}</button>
|
||||
<button class="unselect-all round-blue-border-btn">{{ 'Deselect all' | trans }}</button>
|
||||
<button class="delete-selection btn btn-inverse">{{ 'prod:push: delete selection' | trans }}</button>
|
||||
</td>
|
||||
</tr>
|
||||
|
@@ -115,7 +115,9 @@
|
||||
<div class="frame_canva">
|
||||
<div id="thumb_delete_button"/>
|
||||
<div id="thumb_download_button"/>
|
||||
<canvas id="thumb_canvas"></canvas>
|
||||
<div class="canvas-wrap">
|
||||
<canvas id="thumb_canvas"></canvas>
|
||||
</div>
|
||||
<div id="alt_canvas_container"
|
||||
style="position:absolute;overflow:hidden;top:-1200px;visibility: hidden; width:0!important;height:0!important">
|
||||
{% for subdef in outputFormats %}
|
||||
|
@@ -1,67 +1,14 @@
|
||||
{% set nbReceived = records.received().count() %}
|
||||
{% set nbEligibleDocuments = records.count() %}
|
||||
{% if with_children.records.stories().count() > 0 %}
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" id="del_children" name="del_children"
|
||||
value="1"> {{ "Also delete records that rely on groupings." | trans }}
|
||||
</label>
|
||||
{% endif %}
|
||||
|
||||
{% set nbTrash = filteredRecord.trash|length %}
|
||||
{% set nbDelete = filteredRecord.delete|length %}
|
||||
<div id="delete_records_parent_only">
|
||||
{{ include('prod/actions/delete_records_confirm_form.html.twig', parents_only) }}
|
||||
</div>
|
||||
|
||||
{% if nbEligibleDocuments > 0 %}
|
||||
{% if nbReceived != records.count() %}
|
||||
<div class="well-small" style="text-align:center;">
|
||||
<span class="label label-info">{{ "You do not have rights to remove all selected documents. Are you sure ?" | trans }}</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<form id="delete-record-form" style="margin: 0;" method="POST" action="{{ path('record_delete') }}">
|
||||
<input type="hidden" value="{{ records.serializedList() }}" name="lst" />
|
||||
{% if nbTrash > 0 %}
|
||||
<div class="well-small label-important"
|
||||
style="background-color: #ffef22;">
|
||||
<div class="dialog-left-section">
|
||||
<img src="/assets/common/images/icons/icon_collection_bin.png"/>
|
||||
</div>
|
||||
<div class="dialog-right-section" style="margin-top: 8px;">
|
||||
<span>{{ nbTrash }} {{ "prod:app trash: record-move-to-trash" | trans }}</span>
|
||||
</div>
|
||||
{% if records.stories().count() %}
|
||||
<label class="checkbox story">
|
||||
<input type="checkbox" id="del_children" name="del_children"
|
||||
value="1"> {{ "prod:app trash: also-move-record" | trans }}
|
||||
</label>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if nbDelete > 0 %}
|
||||
<div class="well-small label-important"
|
||||
style="background-color: #ed1c24;">
|
||||
<div class="dialog-left-section">
|
||||
<img src="/assets/common/images/icons/icon_empty_bin.png"/>
|
||||
</div>
|
||||
<div class="dialog-right-section">
|
||||
<span>{{ nbDelete }} {{ "prod:app trash: record-delete" | trans }}</span>
|
||||
</div>
|
||||
{% if records.stories().count() %}
|
||||
<label class="checkbox story">
|
||||
<input type="checkbox" id="del_children" name="del_children"
|
||||
value="1"> {{ "Also delete records that rely on groupings." | trans }}
|
||||
</label>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="form-actions" style="background-color:transparent;">
|
||||
<button type="button" class="btn btn-danger submiter">{{ "Ok" | trans }}</button>
|
||||
<button type="button" class="btn cancel">{{ "Cancel" | trans }}</button>
|
||||
<span class="form-action-loader" style="display:none;">
|
||||
<img src="/assets/common/images/icons/loader000.gif"/>
|
||||
</span>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
{% elseif nbReceived == 0 %}
|
||||
<div class="well-small" style="text-align:center;">
|
||||
<span class="label label-important">{{ "No document selected" | trans }}</span>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="well-small" style="text-align:center;">
|
||||
<span class="label label-info">{{ "You do not have rights to remove selected documents" | trans }}</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div id="delete_records_with_children">
|
||||
{{ include('prod/actions/delete_records_confirm_form.html.twig', with_children) }}
|
||||
</div>
|
@@ -0,0 +1,48 @@
|
||||
{% if records.count() > 0 %}
|
||||
{% if records.rejected().count() > 0 %}
|
||||
<div class="well-small" style="text-align:center;">
|
||||
{{ "You do not have rights to remove all selected documents. Are you sure ?" | trans }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<form id="delete-record-form" style="margin: 0;" method="POST" action="{{ path('record_delete') }}">
|
||||
<input type="hidden" value="{{ records.serializedList() }}" name="lst"/>
|
||||
{% if trashableCount > 0 %}
|
||||
<div class="well-small label-important"
|
||||
style="background-color: #ffef22;">
|
||||
<div class="dialog-left-section">
|
||||
<img src="/assets/common/images/icons/icon_collection_bin.png"/>
|
||||
</div>
|
||||
<div class="dialog-right-section" style="margin-top: 8px;">
|
||||
<span class="to_trash_count">{{ trashableCount }}</span> {{ "prod:app trash: record-move-to-trash" | trans }}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if deletableCount > 0 %}
|
||||
<div class="well-small label-important"
|
||||
style="background-color: #ed1c24;">
|
||||
<div class="dialog-left-section">
|
||||
<img src="/assets/common/images/icons/icon_empty_bin.png"/>
|
||||
</div>
|
||||
<div class="dialog-right-section">
|
||||
<span class="to_delete_count">{{ deletableCount }}</span> {{ "prod:app trash: record-to-delete" | trans }}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="form-actions" style="background-color:transparent;">
|
||||
<button type="button" class="btn btn-danger submiter">{{ "Ok" | trans }}</button>
|
||||
<button type="button" class="btn cancel">{{ "Cancel" | trans }}</button>
|
||||
<span class="form-action-loader" style="display:none;">
|
||||
<img src="/assets/common/images/icons/loader000.gif"/>
|
||||
</span>
|
||||
</div>
|
||||
</form>
|
||||
{% elseif records.received().count() == 0 %}
|
||||
<div class="well-small" style="text-align:center;">
|
||||
<span class="label label-important">{{ "No document selected" | trans }}</span>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="well-small" style="text-align:center;">
|
||||
<span class="label label-info">{{ "You do not have rights to remove selected documents" | trans }}</span>
|
||||
</div>
|
||||
{% endif %}
|
@@ -41,7 +41,7 @@
|
||||
<div style='position:absolute; top:0px; left:0px; height:20px'>
|
||||
<img class="require_alert" src="/assets/common/images/icons/alert.png" style="display:none;cursor:help;" title="{{ 'edit::Certains champs doivent etre remplis pour valider cet editing' | trans }}">
|
||||
</div>
|
||||
<div style='position:absolute; bottom:0px; left:0px; height:20px' class="bottom actions">
|
||||
<div style='position:absolute; bottom:7px; left:8px; height:20px' class="bottom actions">
|
||||
|
||||
<span class="fa-stack previewTips"
|
||||
tooltipsrc="{{ path('prod_tooltip_preview', { 'sbas_id' : record.get_sbas_id(), 'record_id' : record.get_record_id() }) }}">
|
||||
@@ -73,9 +73,9 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="editDiaButtons" style="position:absolute; bottom:0px; right:0px; width:30px; height:12px; display:none">
|
||||
<img id="idEditDiaButtonsP_{{i}}" style="cursor:pointer" src="/assets/common/images/icons/plus11.png"/>
|
||||
<img id="idEditDiaButtonsM_{{i}}" style="cursor:pointer" src="/assets/common/images/icons/minus11.png"/>
|
||||
<div class="editDiaButtons" style="position:absolute; bottom:8px; right:3px; width:30px; display:none">
|
||||
<span id="idEditDiaButtonsP_{{i}}" style="cursor:pointer"><i class="fa fa-plus editIcon"> </i></span>
|
||||
<span id="idEditDiaButtonsM_{{i}}" style="cursor:pointer"><i class="fa fa-minus editIcon"> </i></span>
|
||||
</div>
|
||||
</div>
|
||||
{% endmacro %}
|
||||
@@ -90,14 +90,14 @@
|
||||
{% endif %}
|
||||
{% for field in fields %}
|
||||
{% set i = field.get_id() %}
|
||||
{% if field.is_readonly() is empty %}
|
||||
{% if field.is_readonly() is empty and field.get_gui_editable()== 1 %}
|
||||
<div class="edit_field edit-field-action" id="EditFieldBox_{{i}}"
|
||||
data-id="{{i}}"
|
||||
data-name="{{field.get_name()}}">
|
||||
{#<i id="editSGtri_{{ i }}" style="visibility:hidden;" class="fa fa-caret-right" aria-hidden="true"></i>#}
|
||||
<span class="fa-stack fieldTips"
|
||||
tooltipsrc="{{ path('prod_tooltip_metadata', { 'sbas_id' : field.get_databox().get_sbas_id(), 'field_id' : field.get_id() }) }}">
|
||||
<i class="fa fa-circle fa-stack-2x" aria-hidden="true"></i>
|
||||
<i class="fa fa-circle fa-stack-2x fa-inverse-bg" aria-hidden="true"></i>
|
||||
<i class="fa fa-info fa-stack-1x fa-inverse" aria-hidden="true"></i>
|
||||
</span>
|
||||
{% if field.get_dces_element %}
|
||||
@@ -126,6 +126,7 @@
|
||||
|
||||
{% set actionable = recordsRequest|length %}
|
||||
{% set not_actionable = recordsRequest.received|length - actionable %}
|
||||
{% set editing_top_box_height = app['settings'].getUserSetting(app.getAuthenticatedUser(), 'editing_top_box') %}
|
||||
|
||||
<div id="EDIT_ALL">
|
||||
|
||||
@@ -135,16 +136,21 @@
|
||||
<input style="font-size:2px; width:5px;" type="text" id="editFakefocus" />
|
||||
</form>
|
||||
</div>
|
||||
<div id="EDIT_TOP" style="height:{{app['settings'].getUserSetting(app.getAuthenticatedUser(), 'editing_top_box')
|
||||
}}%;">
|
||||
<div id="EDIT_TOP" style="height:{{editing_top_box_height}}%; min-height: {{ editing_top_box_height }}">
|
||||
<div id="EDIT_MENU">
|
||||
<i class="fa fa-image fa-stack-1x zoom-menu-icon zoom-menu-left" aria-hidden="true"></i>
|
||||
<div id="EDIT_ZOOMSLIDER" >
|
||||
</div>
|
||||
<i class="fa fa-image fa-stack-1x zoom-menu-icon zoom-menu-right" aria-hidden="true"></i>
|
||||
</div>
|
||||
{% if recordsRequest.isSingleStory() %}
|
||||
<div class="GRP_IMAGE_REP">
|
||||
<div id="EDIT_GRPDIAPO">
|
||||
{{_self.format_diapo(recordsRequest.singleStory(), false)}}
|
||||
<div class="story-select-all-block">
|
||||
<input class="styled-checkbox" id="select-all-diapo" type="checkbox" value="" checked="" >
|
||||
<label for="select-all-diapo">{{ 'prod::edit:story select all' | trans }}</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="EDIT_FILM2" style="left:170px;">
|
||||
@@ -198,7 +204,7 @@
|
||||
</div>
|
||||
<div style="position:absolute; top:4px; width:60px; right:6px; height:24px;">
|
||||
<button type="submit" class="submit-multivalued">
|
||||
<img id="EditButAddMultiValued" style="cursor:pointer" src="/assets/common/images/icons/plus16.png" />
|
||||
<i id="EditButAddMultiValued" class="icon-round-add_box-24px icomoon" style="font-size: 24px;color: grey;"> </i>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
@@ -410,13 +416,39 @@
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="dialog-edit_lat_lon" title=" {{ 'prod::edit:confirm: Edition latitude longitude' | trans }}" style="display: none">
|
||||
<p><span class="ui-icon ui-icon-alert" style="float:left; margin:12px 12px 20px 0;"></span>{{ 'prod::edit: Confirmation Edition latitude longitude' | trans }}</p>
|
||||
</div>
|
||||
<input type="hidden" id="dialog-edit-yes" value="{{ 'prod::edit:confirm: Yes' | trans }}" />
|
||||
<input type="hidden" id="dialog-edit-no" value="{{ 'prod::edit:confirm: No' | trans }}" />
|
||||
|
||||
<script type="text/javascript">
|
||||
{% if multipleDataboxes == 1 %}
|
||||
$(function() {
|
||||
$('#EDITWINDOW').hide();
|
||||
// a workaround for a flaw in the demo system (http://dev.jqueryui.com/ticket/4375), ignore!
|
||||
$( "#dialog-edit-many-sbas:ui-dialog" ).dialog( "destroy" );
|
||||
$( "#dialog-edit-many-sbas" ).dialog({
|
||||
modal: true,
|
||||
resizable:false,
|
||||
buttons: {
|
||||
Ok: function() {
|
||||
$( this ).dialog( "close" );
|
||||
}
|
||||
}
|
||||
});
|
||||
$('#dialog-edit-many-sbas').on('dialogclose', function(event) {
|
||||
location.reload();
|
||||
});
|
||||
});
|
||||
{% else %}
|
||||
{% set notActionableMsg = '' %}
|
||||
{% if not_actionable > 1 %}
|
||||
{% set notActionableMsg = 'prod::editing: %not_actionable% documents ne peuvent etre edites car vos droits sont induffisants' | trans({'%not_actionable%' : not_actionable}) %}
|
||||
{% elseif not_actionable == 1 %}
|
||||
{% set notActionableMsg = 'prod::editing: 1 document ne peut etre edite car vos droits sont induffisants' | trans | e('js')%}
|
||||
{% endif %}
|
||||
|
||||
var recordEditorConfig = {
|
||||
hasMultipleDatabases: {% if multipleDataboxes or recordsRequest|length == 0 %}true{% else %}false{% endif %},
|
||||
databoxId: {{ databox.get_sbas_id }},
|
||||
@@ -477,4 +509,6 @@
|
||||
{% endfor %}
|
||||
]
|
||||
};
|
||||
{% endif %}
|
||||
|
||||
</script>
|
||||
|
@@ -2,6 +2,21 @@
|
||||
<form target="_blank" name="formprintpage" method="POST" action="{{ path('prod_printer_print') }}">
|
||||
<div id="printBox">
|
||||
<div style="padding:10px;">
|
||||
{% if basketFeedbackId %}
|
||||
<h4>{{ 'phraseanet:: basket feedback' | trans }}</h4>
|
||||
<input type="hidden" name="ssel" value="{{ basketFeedbackId }}" />
|
||||
<div style="margin: 10px 0 20px 0; padding: 0 10px;">
|
||||
<label for="RADI_PRE_FBO" class="radio">
|
||||
<input type="radio" name="lay" checked value="feedbackOnly" id="RADI_PRE_FBO" />
|
||||
{{ 'print:: basket feedback only' | trans }}
|
||||
</label>
|
||||
<label for="RADI_PRE_BF" class="radio">
|
||||
<input type="radio" name="lay" value="feedback" id="RADI_PRE_BF" />
|
||||
{{ 'print:: basket feedback' | trans }}
|
||||
</label>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if printer.get_count_actionable() > 0 %}
|
||||
{% if printer.get_count_preview() > 0 %}
|
||||
<h4>{{ 'phraseanet:: preview' | trans }}</h4>
|
||||
@@ -32,7 +47,7 @@
|
||||
{{ 'print:: liste d\'imagettes' | trans }}
|
||||
</label>
|
||||
<label for="RADI_PRE_THUMGRI" class="radio">
|
||||
<input type="radio" name="lay" checked value="thumbnailGrid" id="RADI_PRE_THUMGRI" />
|
||||
<input type="radio" name="lay" {% if not basketFeedbackId %} checked {% endif %} value="thumbnailGrid" id="RADI_PRE_THUMGRI" />
|
||||
{{ 'print:: planche contact (mosaique)' | trans }}
|
||||
</label>
|
||||
</div>
|
||||
@@ -52,3 +67,12 @@
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
var $form = $("form[name=formprintpage]");
|
||||
$form.bind('submit', function(){
|
||||
$("#DIALOG").dialog('destroy');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
@@ -71,8 +71,13 @@
|
||||
<style title="color_selection" type="text/css">
|
||||
.diapo.selected,#reorder_box .diapo.selected, #EDIT_ALL .diapo.selected, .list.selected, .list.selected .diapo {
|
||||
color: {{"#" ~ app['settings'].getUserSetting(app.getAuthenticatedUser(), 'fontcolor-selection', 'FFFFFF')}};
|
||||
background-color: {{"#" ~ app['settings'].getUserSetting(app.getAuthenticatedUser(), 'background-selection', '404040')}};
|
||||
background-color: {{"#" ~ app['settings'].getUserSetting(app.getAuthenticatedUser(), 'background-selection', 'ab47bc')}};
|
||||
}
|
||||
#idFrameC .diapo.selected {
|
||||
border: 3px solid {{"#" ~ app['settings'].getUserSetting(app.getAuthenticatedUser(), 'background-selection', 'ab47bc')}} !important;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
||||
@@ -169,7 +174,7 @@
|
||||
{% if ratio == 0 %}
|
||||
{% set ratio = '0.333' %}
|
||||
{% endif %}
|
||||
{% set w1 = (100 * ratio)|round %}
|
||||
{% set w1 = (100 * ratio) %}
|
||||
{% set w2 = (100 - w1) %}
|
||||
<div id="idFrameC" class="PNB" style="right:auto;width:{{ w1 ~ '%' }}">
|
||||
<div class="PNB wrapper">
|
||||
@@ -183,6 +188,58 @@
|
||||
</div>
|
||||
{% if GV_thesaurus %}
|
||||
<div id="proposals" class="PNB thesaurus-from-facets-action">
|
||||
<input type="hidden" id="facet_except" value="{{ 'prod:workzone:facetstab:tooltips:facet_except_filter' | trans }}" />
|
||||
<input type="hidden" id="facet_and" value="{{ 'prod:workzone:facetstab:tooltips:facet_and_filter' | trans }}" />
|
||||
<input type="hidden" id="facet_remove" value="{{ 'prod:workzone:facetstab:tooltips:remove_facet_filter' | trans }}" />
|
||||
<div class="filter-facet-setting look_box_settings">
|
||||
<div id="accordion">
|
||||
<div class="card">
|
||||
<div class="card-header" id="headingOne">
|
||||
<h5 class="mb-0" style="margin-left: 10px">
|
||||
<button class="btn btn-facet-option collapsed" data-toggle="collapse" data-target="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
|
||||
{{ 'prod:workzone:facetstab:search_and_facets_sort_options' | trans }} <span class="icomoon"></span>
|
||||
</button>
|
||||
</h5>
|
||||
</div>
|
||||
<div id="collapseOne" class="collapse show" aria-labelledby="headingOne" data-parent="#accordion">
|
||||
<div class="card-body">
|
||||
<div class="left-facet-filter facet-filter">
|
||||
<h4>{{ 'index::advance_search: facet-order' | trans }}</h4>
|
||||
<form class="form-inline">
|
||||
{% set order_facet = app['settings'].getUserSetting(app.getAuthenticatedUser(), 'order_facet') %}
|
||||
<label class="select" for="orderFacet">
|
||||
<select class="preferences-facet-order" name="orderFacet" style="margin-left: 5px">
|
||||
<option {% if order_facet == constant('Alchemy\\Phrasea\\Core\\Configuration\\DisplaySettingService::ORDER_BY_BCT') %} selected="selected" {% endif %}
|
||||
value="{{ constant('Alchemy\\Phrasea\\Core\\Configuration\\DisplaySettingService::ORDER_BY_BCT') }}">{{ 'index::advance_search: facet-tech-order' | trans }}</option>
|
||||
<option {% if order_facet == constant('Alchemy\\Phrasea\\Core\\Configuration\\DisplaySettingService::ORDER_ALPHA_ASC') %} selected="selected" {% endif %}
|
||||
value="{{ constant('Alchemy\\Phrasea\\Core\\Configuration\\DisplaySettingService::ORDER_ALPHA_ASC') }}">{{ 'Alphabetic asc' | trans }}</option>
|
||||
<option {% if order_facet == constant('Alchemy\\Phrasea\\Core\\Configuration\\DisplaySettingService::ORDER_ALPHA_DESC') %} selected="selected" {% endif %}
|
||||
value="{{ constant('Alchemy\\Phrasea\\Core\\Configuration\\DisplaySettingService::ORDER_ALPHA_DESC') }}">{{ 'Alphabetic desc' | trans }}</option>
|
||||
</select>
|
||||
</label>
|
||||
</form>
|
||||
</div>
|
||||
<div class="right-facet-filter facet-filter">
|
||||
<h4>{{ 'index::advance_search: facet-values-order' | trans }}</h4>
|
||||
<form class="form-inline">
|
||||
{% set facet_values_order = app['settings'].getUserSetting(app.getAuthenticatedUser(), 'facet_values_order') %}
|
||||
<label class="select" for="facetValuesOrder">
|
||||
<select class="preferences-facet-values-order" name="facetValuesOrder">
|
||||
<option {% if facet_values_order == constant('Alchemy\\Phrasea\\Core\\Configuration\\DisplaySettingService::ORDER_BY_HITS') %} selected="selected" {% endif %}
|
||||
value="{{ constant('Alchemy\\Phrasea\\Core\\Configuration\\DisplaySettingService::ORDER_BY_HITS') }}">{{ 'index::advance_search: order-by-hits' | trans }}</option>
|
||||
<option {% if facet_values_order == constant('Alchemy\\Phrasea\\Core\\Configuration\\DisplaySettingService::ORDER_BY_HITS_ASC') %} selected="selected" {% endif %}
|
||||
value="{{ constant('Alchemy\\Phrasea\\Core\\Configuration\\DisplaySettingService::ORDER_BY_HITS_ASC') }}">{{ 'index::advance_search: order-by-hits-asc' | trans }}</option>
|
||||
<option {% if facet_values_order == constant('Alchemy\\Phrasea\\Core\\Configuration\\DisplaySettingService::ORDER_ALPHA_ASC') %} selected="selected" {% endif %}
|
||||
value="{{ constant('Alchemy\\Phrasea\\Core\\Configuration\\DisplaySettingService::ORDER_ALPHA_ASC') }}">{{ 'Alphabetic asc' | trans }}</option>
|
||||
</select>
|
||||
</label>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button id="facets-back-btn" style="display:none;">back</button>
|
||||
</div>
|
||||
{% include 'prod/tab_thesaurus.html.twig' with {has_access_to_module: app.getAclForUser(app.getAuthenticatedUser()).has_access_to_module('thesaurus')} %}
|
||||
@@ -326,6 +383,9 @@
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<input class="btn btn_lightgrey reset_button search-reset-action" style="display: none;" type="button" value="{{ 'Re-initialiser' | trans }}" />
|
||||
|
||||
<span class="btn btn-info btn-lg reload-search hidden " id="reload-search">{{ 'help::help-search: relaunch search without filter' | trans }}</span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -681,11 +741,15 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<h1>{{ 'Language' | trans }} : {{ app['locale'] }}</h1>
|
||||
<h1>{{ 'Language selection' | trans }}</h1>
|
||||
<label class="inline" for="language">
|
||||
<select onchange="window.location = $(this).val();" id="language">
|
||||
{% for code, language in app.getAvailableLanguages() if code != app['locale'] %}
|
||||
{% for code, language in app.getAvailableLanguages() %}
|
||||
{% if code == app['locale'] %}
|
||||
<option selected="selected" disabled="disabled">{{ language }}</option>
|
||||
{% else %}
|
||||
<option value="{{ path('set_locale', {'locale' : code, 'redirect' : '/prod' }) }}"><a href="{{ path('set_locale', {'locale' : code, 'redirect' : '/prod' }) }}" data-country-code="{{ code }}">{{ language }}</a></option>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</select>
|
||||
</label>
|
||||
@@ -811,30 +875,6 @@
|
||||
</div>
|
||||
<div class="box">
|
||||
<h1>{{ 'index::advance_search: facet' | trans }}</h1>
|
||||
<h1>{{ 'index::advance_search: facet-order' | trans }}</h1>
|
||||
<form class="form-inline">
|
||||
{% set order_facet = app['settings'].getUserSetting(app.getAuthenticatedUser(), 'order_facet') %}
|
||||
<label class="select" for="orderFacet">
|
||||
<select class="preferences-facet-order" name="orderFacet">
|
||||
<option {% if order_facet == constant('Alchemy\\Phrasea\\Core\\Configuration\\DisplaySettingService::ORDER_BY_BCT') %} selected="selected" {% endif %}
|
||||
value="{{ constant('Alchemy\\Phrasea\\Core\\Configuration\\DisplaySettingService::ORDER_BY_BCT') }}">{{ 'index::advance_search: facet-tech-order' | trans }}</option>
|
||||
<option {% if order_facet == constant('Alchemy\\Phrasea\\Core\\Configuration\\DisplaySettingService::ORDER_ALPHA_ASC') %} selected="selected" {% endif %}
|
||||
value="{{ constant('Alchemy\\Phrasea\\Core\\Configuration\\DisplaySettingService::ORDER_ALPHA_ASC') }}">{{ 'Alphabetic asc' | trans }}</option>
|
||||
</select>
|
||||
</label>
|
||||
</form>
|
||||
<h1>{{ 'index::advance_search: facet-values-order' | trans }}</h1>
|
||||
<form class="form-inline">
|
||||
{% set facet_values_order = app['settings'].getUserSetting(app.getAuthenticatedUser(), 'facet_values_order') %}
|
||||
<label class="select" for="facetValuesOrder">
|
||||
<select class="preferences-facet-values-order" name="facetValuesOrder">
|
||||
<option {% if facet_values_order == constant('Alchemy\\Phrasea\\Core\\Configuration\\DisplaySettingService::ORDER_BY_HITS') %} selected="selected" {% endif %}
|
||||
value="{{ constant('Alchemy\\Phrasea\\Core\\Configuration\\DisplaySettingService::ORDER_BY_HITS') }}">{{ 'index::advance_search: order-by-hits' | trans }}</option>
|
||||
<option {% if facet_values_order == constant('Alchemy\\Phrasea\\Core\\Configuration\\DisplaySettingService::ORDER_ALPHA_ASC') %} selected="selected" {% endif %}
|
||||
value="{{ constant('Alchemy\\Phrasea\\Core\\Configuration\\DisplaySettingService::ORDER_ALPHA_ASC') }}">{{ 'Alphabetic asc' | trans }}</option>
|
||||
</select>
|
||||
</label>
|
||||
</form>
|
||||
{% set facetFilter = app['settings'].getUserSetting(app.getAuthenticatedUser(), 'facet') %}
|
||||
<label class="checkbox inline" for="ADVSRCH_FILTER_FACET" style="margin-bottom: 1em">
|
||||
<input id="ADVSRCH_FILTER_FACET" type="checkbox" name="filter_facet" {% if facetFilter == 'true' %}checked="checked"{% endif %}>
|
||||
@@ -926,7 +966,7 @@
|
||||
{% set basket_status_display = app['settings'].getUserSetting(app.getAuthenticatedUser(), 'basket_status_display') %}
|
||||
<label for="basket_status_display" class="checkbox">
|
||||
<input
|
||||
name="basket_status_display" type="checkbox preferences-options-basket-status" class="checkbox" value="1"
|
||||
name="basket_status_display" type="checkbox" class="checkbox preferences-options-basket-status" value="1"
|
||||
id="basket_status_display" {% if basket_status_display == '1' %}checked="checked"{% endif %} />
|
||||
{{ 'Afficher les status' | trans }}
|
||||
</label>
|
||||
|
@@ -23,19 +23,19 @@
|
||||
data-position="0"
|
||||
data-id="{{basket.getId()}}"
|
||||
data-reload="true"
|
||||
class="otherBaskToolTip open-preview-action" title="{{basket.getDescription()}}">
|
||||
class="otherBaskToolTip to-open-preview-action" title="{{basket.getDescription()}}">
|
||||
{#<img style="vertical-align:middle" src="/assets/common/images/icons/basket.png" width="16">#}
|
||||
|
||||
{% if basket.getValidation() %}
|
||||
<img src='/assets/common/images/icons/basket_validation.png' title='' width="16" class="btn-image"/>
|
||||
<img src='/assets/common/images/icons/basket_validation.png' title='' width="24" class="btn-image"/>
|
||||
{% elseif basket.getPusher() %}
|
||||
{% if not basket.isRead() %}
|
||||
<img src='/assets/common/images/icons/basket_push_unread.png' title='' width="16" class="btn-image"/>
|
||||
<img src='/assets/common/images/icons/basket_push_unread.png' title='' width="24" class="btn-image"/>
|
||||
{% else %}
|
||||
<img src='/assets/common/images/icons/basket_push.png' title='' width="16" class="btn-image"/>
|
||||
<img src='/assets/common/images/icons/basket_push.png' title='' width="24" class="btn-image"/>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<img src='/assets/common/images/icons/basket.png' title='' width="16" class="btn-image"/>
|
||||
<img src='/assets/common/images/icons/basket.png' title='' width="24" class="btn-image"/>
|
||||
{% endif %}
|
||||
|
||||
<span class="title">{{basket.getName()}}</span>
|
||||
|
@@ -8,7 +8,7 @@
|
||||
<div style="margin:3px 0">
|
||||
|
||||
{% set appbox = '' %}
|
||||
<div class="history-{{action}}">
|
||||
<div class="history-block history-{{action}}">
|
||||
{% if action == 'push' %}
|
||||
{% set n_user = done['final']|length %}
|
||||
{% set appbox = '<span class="provenance">' ~ site %}
|
||||
@@ -63,11 +63,9 @@
|
||||
{% endif %}
|
||||
|
||||
</span>
|
||||
<p style="font-size:10px;text-decoration:italic;">{{hour}}</p>
|
||||
</div>
|
||||
|
||||
<div style="font-size:10px;text-decoration:italic;">{{hour}}</div>
|
||||
|
||||
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
{% include 'prod/results/record.html.twig' with {
|
||||
'record': record,
|
||||
'settings': settings
|
||||
'settings': settings,
|
||||
'plugins': plugins
|
||||
} %}
|
||||
|
@@ -30,63 +30,11 @@
|
||||
<li><p>{{ 'help::help-section-bullet: search-in-a-specific-field' | trans }}</p></li>
|
||||
</ul>
|
||||
</div>
|
||||
{#<h5>{{ 'La recherche s\'effectue grâce à la boîte de dialogue qui se trouve en haut à gauche de l\'écran.' | trans }}#}
|
||||
{#{{ 'Sachez que vous pouvez utiliser les opérateurs ou caractères spéciaux suivants :' | trans }}</h5>#}
|
||||
{#<h5 style="border:#CCCCCC 2px solid">{{ '* , ? , ET , OU , SAUF , DANS , DERNIERS , TOUT (ou AND , OR , EXCEPT , LAST , ALL)' | trans }}</h5>#}
|
||||
|
||||
{#<h5>{{ 'Caractères de troncature' | trans }}</h5>#}
|
||||
|
||||
{#<table>#}
|
||||
{#<tr>#}
|
||||
{#<td valign="top"><kbd class="ky">{{ 'auto*' | trans }}</kbd></td>#}
|
||||
{#<td valign="top"> {{ 'retourne "automobile", "automate", "autoroute", ...' | trans }}</td>#}
|
||||
{#</tr>#}
|
||||
{#<tr>#}
|
||||
{#<td valign="top"><kbd class="ky">{{ 'dé?it' | trans }}</kbd></td>#}
|
||||
{#<td valign="top"> {{ 'retourne "délit", "débit", ...' | trans }}</td>#}
|
||||
{#</tr>#}
|
||||
{#</table>#}
|
||||
|
||||
{#<h5>{{ 'Visualiser tous les enregistrements / les derniers enregistrements' | trans }}</h5>#}
|
||||
{#<table>#}
|
||||
{#<tr>#}
|
||||
{#<td valign="top"><kbd class="ky"><b>{{ 'TOUT' | trans }}</b></kbd></td>#}
|
||||
{#<td valign="top">{{ 'retourne tous les enregistrements des collections selectionnees' | trans }}</td>#}
|
||||
{#</tr>#}
|
||||
{#<tr>#}
|
||||
{#<td valign="top"><kbd class="ky"><b>{{ 'LAST 20' | trans }}</b></kbd></td>#}
|
||||
{#<td valign="top">{{ 'retourne les 20 derniers enregistrements archives dans les collections selectionnees' | trans }}</td>#}
|
||||
{#</tr>#}
|
||||
{#</table>#}
|
||||
|
||||
{#<h5>{{ 'Recherche multicritères' | trans }}</h5>#}
|
||||
{#{{ 'Vous pouvez affiner votre recherche avec les opérateurs : ET, OU, SAUF ou DANS' | trans }}<br>#}
|
||||
{#<table>#}
|
||||
{#<tr>#}
|
||||
{#<td valign="top"><kbd class="ky">{{ 'sport' | trans }} <b>ET</b> {{ 'automobile' | trans }}</kbd></td>#}
|
||||
{#<td valign="top">{{ 'retourne les documents comprenant les deux mots.' | trans }}</td>#}
|
||||
{#</tr>#}
|
||||
{#<tr>#}
|
||||
{#<td valign="top"><kbd class="ky">{{ 'journal OU jt' | trans }}</kbd></td>#}
|
||||
{#<td valign="top">{{ 'retourne les documents comprenant un mot et/ou l\'autre.' | trans }}</td>#}
|
||||
{#</tr>#}
|
||||
{#<tr>#}
|
||||
{#<td valign="top"><kbd class="ky">{{ 'cannes SAUF festival' | trans }}</kbd></td>#}
|
||||
{#<td valign="top">{{ 'retourne les documents comprenant cannes sans le mot festival.' | trans }}</td>#}
|
||||
{#</tr>#}
|
||||
{#<tr>#}
|
||||
{#<td valign="top"><kbd class="ky">{{ 'thalassa DANS titre' | trans }}</kbd></td>#}
|
||||
{#<td valign="top">{{ 'retourne les documents où le terme est au moins présent dans le titre, en évitant par exemple celles où le terme est uniquement cité dans la légende.' | trans }}</td>#}
|
||||
{#</tr>#}
|
||||
{#</table>#}
|
||||
|
||||
{#<center>#}
|
||||
{#<h3 style="background-color:#CCCCCC; color:#000000">{{ 'Attention' | trans }}</h3>#}
|
||||
{#<h4> {{ 'pour chercher une phrase contenant un des mots-clé ci-dessus, utilisez les guillemets :' | trans }}</h4>#}
|
||||
{#<kbd class='tx'><i>"</i>{{ 'C dans l\'air' | trans }}<i>"</i></kbd>#}
|
||||
{#, <kbd class='tx'><i>"</i>{{ 'Et Dieu créa la femme' | trans }}<i>"</i></kbd>#}
|
||||
{#, <kbd class='tx'><i>"</i>{{ 'bijou en or' | trans }}<i>"</i></kbd>#}
|
||||
{#, <kbd class='tx'><i>"</i>{{ 'tout le sport' | trans }}<i>"</i></kbd>#}
|
||||
{#</center>#}
|
||||
<br>
|
||||
<p class="text-center">{{ 'help::help-search: OR' | trans }}</p>
|
||||
<br>
|
||||
<p class="text-center">
|
||||
<span class="btn btn-info btn-lg trigger-reload-search" onclick="jQuery('.reload-search').trigger('click');">{{ 'help::help-search: relaunch search without filter' | trans }}</span>
|
||||
</p>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
@@ -7,7 +7,8 @@
|
||||
<td valign="top" style='width:{{ settings.images_size + 50 }}px'>
|
||||
{% include 'prod/results/record.html.twig' with {
|
||||
'record': record,
|
||||
'settings': settings
|
||||
'settings': settings,
|
||||
'plugins': plugins
|
||||
} %}
|
||||
</td>
|
||||
<td valign="middle">
|
||||
|
@@ -104,7 +104,7 @@
|
||||
{% if settings.show_context_menu %}
|
||||
<span class="fa-stack contextMenuTrigger" id="contextTrigger_{{ record.id }}"
|
||||
tooltipsrc="{{ path('prod_tooltip_technical_data', { 'sbas_id' : record.databoxId, 'record_id' : record.recordId }) }}">
|
||||
<i class="icomoon icon-circle fa-stack-2x" aria-hidden="true"></i>
|
||||
<i class="icomoon icon-circle fa-stack-2x fa-inverse-bg" aria-hidden="true"></i>
|
||||
<i class="icomoon icon-round-more_horiz-24px white fa-stack-1x fa-inverse" aria-hidden="true"></i>
|
||||
</span>
|
||||
<table cellspacing="0" cellpadding="0" style="display:none;" id="answerContext_{{record.id}}" class="contextMenu answercontextmenu">
|
||||
@@ -155,6 +155,29 @@
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{# add plugins entries #}
|
||||
{% for plugin in plugins.actionbar|default([]) %}
|
||||
{% set menu = plugin.ActionBar['_context_']|default([]) %}
|
||||
{% for k, action in menu %}
|
||||
{% if plugin.isContextMenuOptionAvailable(k, record) %}
|
||||
<div title="" class="context-menu-item"
|
||||
onclick="{{ plugin.getContextMenuJS(k) }}('{{ k }}', '{{record.baseId}}', '{{record.recordId}}', '{{ record.id }}');">
|
||||
<div class="context-menu-item-inner">
|
||||
{% set icon = (action.icon ?? false) ? plugin_asset(plugin.PluginName, action.icon) : null %}
|
||||
{% set label = (action.label ?? false) ? (action.label|trans({}, plugin.PluginLocale)) : 'undefined label' %}
|
||||
<a title="{{ label }}" href="#">
|
||||
{% if icon %}
|
||||
<img style="cursor:pointer;" src="{{ icon }}" alt="{{ label }}">
|
||||
{% endif %}
|
||||
<span>{{ label }}</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
@@ -31,7 +31,8 @@
|
||||
'doctype_display': doctype_display,
|
||||
'handle_dblclick' : true,
|
||||
'show_context_menu': true
|
||||
}
|
||||
},
|
||||
'plugins': plugins
|
||||
} %}
|
||||
{% endblock %}
|
||||
{% endfor %}
|
||||
|
@@ -150,6 +150,8 @@
|
||||
<div class="control-group">
|
||||
<input id="PushSendFormName" placeholder="{% trans %}Name{% endtrans %}" type="text" name="name"
|
||||
class="input-block-level"/>
|
||||
<input id="feedbackTitle" type="hidden" value="{% trans %}prod::feedback:feedback_set_title{% endtrans %}" />
|
||||
<input id="pushTitle" type="hidden" value="{% trans %}prod::push:push_set_title{% endtrans %}" />
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<textarea id="PushSendFormMessage" placeholder="{% trans %}Message{% endtrans %}" name="message"
|
||||
|
@@ -44,270 +44,159 @@
|
||||
</div>
|
||||
</span>
|
||||
|
||||
<span class="dropdownButton">
|
||||
<div class="btn-group">
|
||||
<button id="TOOL_disktt" class="default_action TOOL_disktt_btn results_window btn btn-inverse" data-selection-source="search-result">
|
||||
<img src="/assets/common/images/icons/disktt_history.png" height="16" width="16" class="btn-image"/> {{ 'action : exporter' | trans }}
|
||||
</button>
|
||||
<button class="trigger btn btn-inverse dropdown-toggle" data-toggle="dropdown"><span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li>
|
||||
<a class="TOOL_print_btn results_window" data-selection-source="search-result">
|
||||
<img src="/assets/common/images/icons/print_history.png" height="16" width="16" class="btn-image"/>
|
||||
{{ 'action : print' | trans }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</span>
|
||||
{% set menus = {
|
||||
'export': [
|
||||
{
|
||||
'class':'TOOL_disktt_btn',
|
||||
'icon':'/assets/common/images/icons/disktt_history.png',
|
||||
'label':'action : exporter' | trans },
|
||||
{
|
||||
'class':'TOOL_print_btn',
|
||||
'icon':'/assets/common/images/icons/print_history.png',
|
||||
'label':'action : print' | trans }
|
||||
],
|
||||
'edit': [],
|
||||
'push': [],
|
||||
'tools': [],
|
||||
'delete': []
|
||||
} %}
|
||||
|
||||
{% set actions = {} %}
|
||||
{# menu "edit" #}
|
||||
{% set m = [] %}
|
||||
{% if acl.has_right(constant('\\ACL::CANMODIFRECORD')) %}
|
||||
{% set label %}
|
||||
{{ 'action : editer' | trans }}
|
||||
{% endset %}
|
||||
{% set actions = actions|merge( { 'edit' : {'icon': "/assets/common/images/icons/ppen_history.png", 'class':'TOOL_ppen_btn', 'label' : label} }) %}
|
||||
{% set label %}
|
||||
{{ 'prod::toolbar : video editor' | trans }}
|
||||
{% endset %}
|
||||
{% set actions = actions|merge( { 'video' : {'icon': "/assets/common/images/icons/icon-video-editor.png", 'class':'TOOL_videoeditor_btn', 'label' : label} }) %}
|
||||
{% set m = m|merge([
|
||||
{
|
||||
'class':'TOOL_ppen_btn',
|
||||
'icon':'/assets/common/images/icons/ppen_history.png',
|
||||
'label':'action : editer' | trans },
|
||||
{
|
||||
'class':'TOOL_videoeditor_btn',
|
||||
'icon':'/assets/common/images/icons/icon-video-editor.png',
|
||||
'label':'prod::toolbar : video editor' | trans }
|
||||
]) %}
|
||||
{% endif %}
|
||||
{% if acl.has_right(constant('\\ACL::CHGSTATUS')) %}
|
||||
{% set label %}
|
||||
{{ 'action : status' | trans }}
|
||||
{% endset %}
|
||||
{% set actions = actions|merge( { 'status' : {'icon': "/assets/common/images/icons/chgstatus_history.png", 'class':'TOOL_chgstatus_btn', 'label' : label} }) %}
|
||||
{% if acl.has_right(constant('\\\ACL::CHGSTATUS')) %}
|
||||
{% set m = m|merge([
|
||||
{
|
||||
'class':'TOOL_chgstatus_btn',
|
||||
'icon':'/assets/common/images/icons/chgstatus_history.png',
|
||||
'label':'action : status' | trans }
|
||||
]) %}
|
||||
{% endif %}
|
||||
{% if acl.has_right(constant('\\ACL::CANDELETERECORD')) and acl.has_right(constant('\\ACL::CANADDRECORD')) %}
|
||||
{% set label %}
|
||||
{{ 'action : collection' | trans }}
|
||||
{% endset %}
|
||||
{% set actions = actions|merge( { 'move' : {'icon': "/assets/common/images/icons/chgcoll_history.png", 'class':'TOOL_chgcoll_btn', 'label' : label} }) %}
|
||||
{% set m = m|merge([
|
||||
{
|
||||
'class':'TOOL_chgcoll_btn',
|
||||
'icon':'/assets/common/images/icons/chgcoll_history.png',
|
||||
'label':'action : collection' | trans }
|
||||
]) %}
|
||||
{% endif %}
|
||||
{% set menus = menus|merge({'edit' : m}) %}
|
||||
|
||||
{# menu "push" #}
|
||||
{% set m = [] %}
|
||||
{% if acl.has_right(constant('\\ACL::CANPUSH')) %}
|
||||
{% set m = m|merge([
|
||||
{
|
||||
'class':'TOOL_pushdoc_btn',
|
||||
'icon':'/assets/common/images/icons/push16.png',
|
||||
'label':'action : push' | trans },
|
||||
{
|
||||
'class':'TOOL_feedback_btn',
|
||||
'icon':'/assets/common/images/icons/feedback16.png',
|
||||
'label':'Feedback' | trans }
|
||||
]) %}
|
||||
{% endif %}
|
||||
{% if acl.has_right(constant('\\ACL::BAS_CHUPUB')) %}
|
||||
{% set m = m|merge([
|
||||
{
|
||||
'class':'TOOL_publish_btn',
|
||||
'icon':'/assets/common/images/icons/rss16.png',
|
||||
'label':'action : publier' | trans }
|
||||
]) %}
|
||||
{% endif %}
|
||||
{% set menus = menus|merge({'push' : m}) %}
|
||||
|
||||
{# menu "tools" #}
|
||||
{% if acl.has_right(constant('\\ACL::IMGTOOLS')) %}
|
||||
{% set menus = menus|merge({'tools' : [
|
||||
{
|
||||
'class':'TOOL_imgtools_btn',
|
||||
'icon':'/assets/common/images/icons/imgtools_history.png',
|
||||
'label':'action : outils' | trans }
|
||||
]}) %}
|
||||
{% endif %}
|
||||
|
||||
{% set n_actions = actions|length %}
|
||||
{% if n_actions > 1 %}
|
||||
<span class="dropdownButton">
|
||||
<div class="btn-group">
|
||||
{% for action in actions %}
|
||||
{% if loop.first %}
|
||||
<button class="default_action {{ action.class }} results_window btn btn-inverse" data-selection-source="search-result">
|
||||
<img src="{{ action.icon }}" height="16" width="16" class="btn-image"/> {{ action.label }}
|
||||
</button>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<button class="trigger btn btn-inverse dropdown-toggle" data-toggle="dropdown"><span
|
||||
class="caret"></span></button>
|
||||
<ul class="dropdown-menu">
|
||||
{% for action in actions %}
|
||||
{% if not loop.first %}
|
||||
<li>
|
||||
<a class="{{ action.class }} results_window" data-selection-source="search-result">
|
||||
<img src="{{ action.icon }}" height="16" width="16" class="btn-image"/>
|
||||
{{ action.label }}
|
||||
</a>
|
||||
</li>
|
||||
{% if not loop.last %}
|
||||
<li class="divider"></li>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{# menu "delete" #}
|
||||
{% if acl.has_right(constant('\\ACL::CANDELETERECORD')) %}
|
||||
{% set menus = menus|merge({'delete' : [
|
||||
{
|
||||
'class':'TOOL_trash_btn',
|
||||
'icon':'/assets/common/images/icons/delete.png',
|
||||
'label':'action : supprimer' | trans }
|
||||
]}) %}
|
||||
{% endif %}
|
||||
|
||||
{# add plugins entries #}
|
||||
{% if plugins.actionbar is not empty %}
|
||||
{% for plugin in plugins.actionbar %}
|
||||
{% for k, menu in plugin.getActionBar() %}
|
||||
{% if k != '_context_' %}
|
||||
{% set m = menus[k]|default([]) %}
|
||||
{% for action in menu %}
|
||||
{% set m = m|merge([{
|
||||
'class':action.classes|default(''),
|
||||
'icon':plugin_asset(plugin.PluginName, action.icon),
|
||||
'label':action.label|trans({}, plugin.PluginLocale) }])
|
||||
%}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</span>
|
||||
{% elseif n_actions == 1 %}
|
||||
<span class="classicButton">
|
||||
<div class="btn-group">
|
||||
{% for action in actions %}
|
||||
<button class="{{ action.class }} results_window btn btn-inverse" data-selection-source="search-result">
|
||||
<img src="{{ action.icon }}" height="16" width="16" class="btn-image"/> {{ action.label }}
|
||||
</button>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</span>
|
||||
{% set menus = menus|merge({(k) : m}) %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% if acl.has_right(constant('\\ACL::CANPUSH')) and acl.has_right(constant('\\ACL::BAS_CHUPUB')) %}
|
||||
<span class="dropdownButton">
|
||||
<div class="btn-group">
|
||||
<button class="TOOL_pushdoc_btn default_action results_window btn btn-inverse" data-selection-source="search-result">
|
||||
<img src="/assets/common/images/icons/push16.png" height="16" width="16" class="btn-image"/> {{ 'action : push' | trans }}
|
||||
</button>
|
||||
<button class="trigger btn btn-inverse dropdown-toggle" data-toggle="dropdown"><span
|
||||
class="caret"></span></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li>
|
||||
<a class="TOOL_feedback_btn results_window" data-selection-source="search-result">
|
||||
<img src="/assets/common/images/icons/feedback16.png" height="16" width="16" class="btn-image"/>
|
||||
{{ 'Feedback' | trans }}
|
||||
</a>
|
||||
</li>
|
||||
{#<li class="divider"></li>#}
|
||||
{#<li>#}
|
||||
{#<a class="TOOL_bridge_btn results_window" href="{{ path("prod_bridge_manager") }}" data-selection-source="search-result">#}
|
||||
{#<img src="/assets/common/images/icons/door.png" height="16" width="16" class="btn-image"/>#}
|
||||
{#{{ 'action : bridge' | trans }}#}
|
||||
{#</a>#}
|
||||
{#</li>#}
|
||||
<li class="divider"></li>
|
||||
<li>
|
||||
<a class="TOOL_publish_btn results_window" data-selection-source="search-result">
|
||||
<img src="/assets/common/images/icons/rss16.png" height="16" width="16" class="btn-image"/>
|
||||
{{ 'action : publier' | trans }}
|
||||
</a>
|
||||
</li>
|
||||
{% if plugins.actionbar is not empty %}
|
||||
{% for plugin in plugins.actionbar %}
|
||||
<li class="divider"></li>
|
||||
{% for key, action in plugin.getActionBar().push|default([]) %}
|
||||
<li>
|
||||
<a class="results_window {{ action.classes|default('') }}" data-selection-source="search-result">
|
||||
{% if action.icon %}
|
||||
<img src="{{ plugin_asset(plugin.PluginName, action.icon) }}" height="16" width="16" class="btn-image"/>
|
||||
{% endif %}
|
||||
{{ action.label|trans({}, plugin.PluginLocale) }}
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
</span>
|
||||
{% elseif acl.has_right(constant('\\ACL::CANPUSH')) %}
|
||||
<span class="dropdownButton">
|
||||
<div class="btn-group">
|
||||
<button class="TOOL_pushdoc_btn default_action results_window btn btn-inverse" data-selection-source="search-result">
|
||||
<img src="/assets/common/images/icons/push16.png" height="16" width="16" class="btn-image"/> {{ 'action : push' | trans }}
|
||||
</button>
|
||||
<button class="trigger btn btn-inverse dropdown-toggle" data-toggle="dropdown"><span
|
||||
class="caret"></span></button>
|
||||
<ul class="submenu dropdown-menu">
|
||||
<li>
|
||||
<a class="TOOL_feedback_btn results_window" data-selection-source="search-result">
|
||||
<img src="/assets/common/images/icons/feedback16.png" height="16" width="16" class="btn-image"/>
|
||||
{{ 'Feedback' | trans }}
|
||||
</a>
|
||||
</li>
|
||||
{% if plugins.actionbar is not empty %}
|
||||
{% for plugin in plugins.actionbar %}
|
||||
<li class="divider"></li>
|
||||
{% for key, action in plugin.getActionBar().push|default([]) %}
|
||||
<li>
|
||||
<a class="results_window {{ action.classes|default('') }}" data-selection-source="search-result">
|
||||
{% if action.icon %}
|
||||
<img src="{{ plugin_asset(plugin.PluginName, action.icon) }}" height="16" width="16" class="btn-image"/>
|
||||
{% endif %}
|
||||
{{ action.label|trans({}, plugin.PluginLocale) }}
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
</span>
|
||||
{% elseif acl.has_right(constant('\\ACL::BAS_CHUPUB')) %}
|
||||
<span class="dropdownButton">
|
||||
<div class="btn-group">
|
||||
{#<button class="TOOL_pushdoc_btn default_action results_window btn btn-inverse" data-selection-source="search-result">#}
|
||||
{#<img src="/assets/common/images/icons/door.png" height="16" width="16" class="btn-image"/> {{ 'action : bridge' | trans }}#}
|
||||
{#</button>#}
|
||||
<button class="TOOL_publish_btn results_window btn btn-inverse">
|
||||
<img src="/assets/common/images/icons/rss16.png" height="16" width="16" class="btn-image"/>
|
||||
{{ 'action : publier' | trans }}
|
||||
</button>
|
||||
<button class="trigger btn btn-inverse dropdown-toggle" data-toggle="dropdown"><span
|
||||
class="caret"></span></button>
|
||||
{% if plugins.actionbar is not empty %}
|
||||
{# print #}
|
||||
{% for menu_entries in menus %}
|
||||
{% if menu_entries|length > 0 %}
|
||||
<span class="dropdownButton">
|
||||
<div class="btn-group">
|
||||
{% set menu_entry = menu_entries[0] %}
|
||||
<button class="results_window btn btn-inverse {{ menu_entry.class }}" data-selection-source="search-result">
|
||||
<img src="{{ menu_entry.icon }}" class="btn-image"/>
|
||||
{{ menu_entry.label }}
|
||||
</button>
|
||||
{% set menu_entries = menu_entries|slice(1) %}
|
||||
{% if menu_entries|length > 0 %}
|
||||
<button class="trigger btn btn-inverse dropdown-toggle" data-toggle="dropdown"><span
|
||||
class="caret"></span></button>
|
||||
<ul class="submenu dropdown-menu">
|
||||
{% for plugin in plugins.actionbar %}
|
||||
<li class="divider"></li>
|
||||
{% for key, action in plugin.getActionBar().push|default([]) %}
|
||||
<li>
|
||||
<a class="results_window {{ action.classes|default('') }}">
|
||||
{% if action.icon %}
|
||||
<img src="{{ plugin_asset(plugin.PluginName, action.icon) }}"
|
||||
height="16" width="16" class="btn-image"/>
|
||||
{% endif %}
|
||||
{{ action.label|trans({}, plugin.PluginLocale) }}
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</div>
|
||||
</span>
|
||||
{% elseif plugins.actionbar is not empty %}
|
||||
<span class="dropdownButton">
|
||||
<div class="btn-group">
|
||||
{% set firstButton = true %}
|
||||
{% for plugin in plugins.actionbar %}
|
||||
{% for key, action in plugin.getActionBar().push|default([]) %}
|
||||
{% if firstButton %}
|
||||
<button class="default_action results_window btn btn-inverse" data-selection-source="search-result">
|
||||
<a class="results_window {{ action.classes|default('') }}" data-selection-source="search-result">
|
||||
{% if action.icon %}
|
||||
<img src="{{ plugin_asset(plugin.PluginName, action.icon) }}" height="16" width="16"/>
|
||||
{% endif %}
|
||||
{{ action.label|trans({}, plugin.PluginLocale) }}
|
||||
</a>
|
||||
</button>
|
||||
{% if not (loop.last and loop.parent.loop.last) %}
|
||||
<button class="trigger btn btn-inverse dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button>
|
||||
<ul class="submenu dropdown-menu">
|
||||
{% endif %}
|
||||
{% if not loop.first %}<li class="divider"></li>{% endif %}
|
||||
{% if not firstButton %}
|
||||
class="caret"></span></button>
|
||||
<ul class="dropdown-menu">
|
||||
{% for menu_entry in menu_entries %}
|
||||
<li>
|
||||
<a class="results_window {{ action.classes|default('') }}" data-selection-source="search-result">
|
||||
{% if action.icon %}
|
||||
<img src="{{ plugin_asset(plugin.PluginName, action.icon) }}" height="16" width="16" class="btn-image"/>
|
||||
{% endif %}
|
||||
{{ action.label|trans({}, plugin.PluginLocale) }}
|
||||
<a class="results_window {{ menu_entry.class }}" data-selection-source="search-result">
|
||||
<img src="{{ menu_entry.icon }}" class="btn-image"/>
|
||||
{{ menu_entry.label }}
|
||||
</a>
|
||||
</li>
|
||||
{% else %}
|
||||
{% set firstButton = false %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
{% if not firstButton %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</div>
|
||||
</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
</span>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% if acl.has_right(constant('\\ACL::IMGTOOLS')) %}
|
||||
<span class="classicButton">
|
||||
<div class="btn-group">
|
||||
<button class="TOOL_imgtools_btn results_window btn btn-inverse" data-selection-source="search-result">
|
||||
<img src="/assets/common/images/icons/imgtools_history.png" height="16" width="16" class="btn-image"/> {{ 'action : outils' | trans }}
|
||||
</button>
|
||||
</div>
|
||||
</span>
|
||||
{% endif %}
|
||||
{% if acl.has_right(constant('\\ACL::CANDELETERECORD')) %}
|
||||
<span class="classicButton">
|
||||
<div class="btn-group">
|
||||
<button class="TOOL_trash_btn results_window btn btn-inverse" data-selection-source="search-result">
|
||||
<img src="/assets/common/images/icons/delete.png" height="16" width="16" class="btn-image"/> {{ 'action : supprimer' | trans }}
|
||||
</button>
|
||||
</div>
|
||||
</span>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block toolbarJS %}
|
||||
{% if plugins.actionbar is not empty %}
|
||||
{% for plugin in plugins.actionbar %}
|
||||
{{ (plugin.JS|default(''))|raw }}
|
||||
{% endfor %}
|
||||
{% for pluginId, plugin in plugins.actionbar %}
|
||||
{% if plugin.getActionBarTemplate is defined %}
|
||||
{% set template = plugin.getActionBarTemplate() %}
|
||||
{% if template %}
|
||||
{% include template with {'app': app, 'plugin_id': pluginId, 'plugin': plugin} only %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
@@ -35,7 +35,7 @@
|
||||
<ul class="unstyled">
|
||||
{% for file in lazaretFiles %}
|
||||
<li class="row-fluid wrapper-item well">
|
||||
{{ _self.lazaretElement(app, file) }}
|
||||
{{ _self.lazaretElement(app, file) }}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
@@ -48,56 +48,56 @@
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$('document').ready(function(){
|
||||
$('document').ready(function () {
|
||||
$(".btn-group.emptying").hide();
|
||||
|
||||
var scope = $('#lazaretBox');
|
||||
|
||||
$("#tab-lazaret").scrollTop(0);
|
||||
|
||||
function getLazaretId(el){
|
||||
function getLazaretId(el) {
|
||||
return el.closest('div.lazaret-file').find('input[name=lazaret_file]').val();
|
||||
}
|
||||
|
||||
function getDestinationId(el){
|
||||
function getDestinationId(el) {
|
||||
return el.closest('div.lazaret-file').find('input[name=lazaret_file_destination]').val();
|
||||
}
|
||||
|
||||
function startAjax(button){
|
||||
function startAjax(button) {
|
||||
button.closest(".btn-group").find('button').prop('disabled', true);
|
||||
button.closest(".btn-group").addClass('loading');
|
||||
}
|
||||
|
||||
function stopAjax(button){
|
||||
function stopAjax(button) {
|
||||
button.closest(".btn-group").find('button').prop('disabled', false);
|
||||
button.closest(".btn-group").removeClass('loading');
|
||||
}
|
||||
|
||||
function reloadContent(force){
|
||||
function reloadContent(force) {
|
||||
var nbItems = scope.find(".wrapper-item").length;
|
||||
|
||||
if( nbItems === 0 || force === true) {
|
||||
if (nbItems === 0 || force === true) {
|
||||
$.ajax({
|
||||
url:'/prod/lazaret/',
|
||||
beforeSend: function(){
|
||||
$("#lazaretBox").empty().append(language.loading );
|
||||
url: '/prod/lazaret/',
|
||||
beforeSend: function () {
|
||||
$("#lazaretBox").empty().append(language.loading);
|
||||
},
|
||||
success: function(data) {
|
||||
success: function (data) {
|
||||
scope.empty().append(data);
|
||||
},
|
||||
error : function() {
|
||||
error: function () {
|
||||
$("#lazaretBox").empty().append(language.errorAjaxRequest);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
$(".records-subititution .diapo", scope)
|
||||
.bind('click', function(e){
|
||||
$(this).closest('.lazaret-proposals').find('.diapo').removeClass('selected');
|
||||
$(this).addClass('selected');
|
||||
}
|
||||
);
|
||||
/* $(".records-subititution .diapo", scope)
|
||||
.bind('click', function(e){
|
||||
$(this).closest('.lazaret-proposals').find('.diapo').removeClass('selected');
|
||||
$(this).addClass('selected');
|
||||
}
|
||||
);*/
|
||||
|
||||
$(".records-subititution .captionTips", scope).tooltip();
|
||||
$(".records-subititution .infoTips", scope).tooltip();
|
||||
@@ -106,23 +106,23 @@
|
||||
var emptying = false; // true=emptying, set to false to stop
|
||||
|
||||
// stop emptying lazaret
|
||||
$('button.stopempty-lazaret', scope).bind('click', function() {
|
||||
$('button.stopempty-lazaret', scope).bind('click', function () {
|
||||
emptying = false;
|
||||
});
|
||||
|
||||
// empty lazaret
|
||||
$('button.empty-lazaret', scope).bind('click', function(){
|
||||
$('button.empty-lazaret', scope).bind('click', function () {
|
||||
|
||||
var that = $(this);
|
||||
|
||||
if(!confirm("{{ "Empty quarantine will remove all items, are you sure you want to continue ?" | trans }}")) {
|
||||
|
||||
if (!confirm("{{ "Empty quarantine will remove all items, are you sure you want to continue ?" | trans }}")) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$(".btn-group.empty").hide();
|
||||
$(".btn-group.emptying").show();
|
||||
|
||||
var f = function() {
|
||||
var f = function () {
|
||||
var todo = 0;
|
||||
var msg_html = "";
|
||||
$.ajax({
|
||||
@@ -135,7 +135,7 @@
|
||||
success: function (data) {
|
||||
if (data.success) {
|
||||
todo = data.result.todo;
|
||||
$("#QUARANTINE_TOOLBAR_EMPTYING_TODO").text(""+todo);
|
||||
$("#QUARANTINE_TOOLBAR_EMPTYING_TODO").text("" + todo);
|
||||
} else {
|
||||
emptying = false; // force stop
|
||||
msg_html = _.template($("#alert_error_tpl").html(), {
|
||||
@@ -150,67 +150,72 @@
|
||||
});
|
||||
}
|
||||
})
|
||||
.done(function(data) {
|
||||
if(emptying && todo > 0) {
|
||||
window.setTimeout(f, 500); // wait between loops
|
||||
}
|
||||
})
|
||||
.fail(function() {
|
||||
emptying = false; // force stop
|
||||
})
|
||||
.always(function(){
|
||||
if(!emptying || todo <= 0) {
|
||||
$(".btn-group.emptying").hide();
|
||||
$(".btn-group.empty").show();
|
||||
if(msg_html != "") {
|
||||
$("#QUARANTINE_TOOLBAR_EMPTYING_MSG").html(msg_html);
|
||||
.done(function (data) {
|
||||
if (emptying && todo > 0) {
|
||||
window.setTimeout(f, 500); // wait between loops
|
||||
}
|
||||
else {
|
||||
reloadContent(true);
|
||||
})
|
||||
.fail(function () {
|
||||
emptying = false; // force stop
|
||||
})
|
||||
.always(function () {
|
||||
if (!emptying || todo <= 0) {
|
||||
$(".btn-group.emptying").hide();
|
||||
$(".btn-group.empty").show();
|
||||
if (msg_html != "") {
|
||||
$("#QUARANTINE_TOOLBAR_EMPTYING_MSG").html(msg_html);
|
||||
}
|
||||
else {
|
||||
reloadContent(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
// start emptying
|
||||
emptying = true;
|
||||
f();
|
||||
});
|
||||
|
||||
var data;
|
||||
//add lazaret file click action
|
||||
$("button.add-lazaret", scope).bind('click', function(){
|
||||
$("button.add-lazaret", scope).bind('click', function () {
|
||||
var that = $(this);
|
||||
var lazaretId = getLazaretId(that);
|
||||
var destinationCollectionId = getDestinationId(that);
|
||||
var container = $(this).closest('.wrapper-item');
|
||||
var form = $(this).closest("form");
|
||||
|
||||
/*fix POST on firefox*/
|
||||
data = form.serializeArray();
|
||||
var allData = that.parent().closest('.wrapper-item').find(".change-record-wrapper").html();
|
||||
that.closest(".form-backup ").append(allData);
|
||||
that.parent().closest('.wrapper-item').find(".change-record ").remove();
|
||||
|
||||
$.ajax({
|
||||
type : 'POST',
|
||||
url: '/prod/lazaret/'+lazaretId+'/force-add/',
|
||||
type: 'POST',
|
||||
url: '/prod/lazaret/' + lazaretId + '/force-add/',
|
||||
dataType: 'json',
|
||||
data : {
|
||||
bas_id:destinationCollectionId,
|
||||
keep_attributes: 1
|
||||
},
|
||||
beforeSend: function(){
|
||||
data: data,
|
||||
beforeSend: function () {
|
||||
startAjax(that);
|
||||
},
|
||||
success: function(data){
|
||||
if(data.success){
|
||||
that.closest(".wrapper-item").remove();
|
||||
}else{
|
||||
success: function (data) {
|
||||
if (data.success) {
|
||||
container.remove();
|
||||
} else {
|
||||
var html = _.template($("#alert_error_tpl").html(), {
|
||||
content:data.message
|
||||
content: data.message
|
||||
});
|
||||
that.closest(".diapo").append(html);
|
||||
}
|
||||
},
|
||||
error: function(){
|
||||
var html = _.template($("#alert_error_tpl").html(), {
|
||||
content:language.errorAjaxRequest
|
||||
});
|
||||
that.closest(".diapo").append(html);
|
||||
error: function () {
|
||||
var html = _.template($("#alert_error_tpl").html(), {
|
||||
content: language.errorAjaxRequest
|
||||
});
|
||||
that.closest(".diapo").append(html);
|
||||
},
|
||||
complete: function(){
|
||||
complete: function () {
|
||||
stopAjax(that);
|
||||
reloadContent();
|
||||
}
|
||||
@@ -218,42 +223,131 @@
|
||||
});
|
||||
|
||||
//delete lazaret file click action
|
||||
$("button.delete-lazaret", scope).bind('click', function(){
|
||||
$("button.delete-lazaret", scope).bind('click', function () {
|
||||
var that = $(this);
|
||||
var lazaretId = getLazaretId(that);
|
||||
var container = $(this).closest('.wrapper-item');
|
||||
var form = $(this).closest("form");
|
||||
data = form.serializeArray();
|
||||
var allData = that.parent().closest('.wrapper-item').find(".change-record-wrapper").html();
|
||||
that.closest(".form-backup ").append(allData);
|
||||
that.parent().closest('.wrapper-item').find(".change-record ").remove();
|
||||
|
||||
$.ajax({
|
||||
type : 'POST',
|
||||
url: '/prod/lazaret/'+lazaretId+'/deny/',
|
||||
type: 'POST',
|
||||
url: '/prod/lazaret/' + lazaretId + '/deny/',
|
||||
dataType: 'json',
|
||||
beforeSend: function(){
|
||||
beforeSend: function () {
|
||||
startAjax(that);
|
||||
},
|
||||
success: function(data){
|
||||
if(data.success){
|
||||
that.closest(".wrapper-item").remove();
|
||||
}else{
|
||||
var html = _.template($("#alert_error_tpl").html(), {
|
||||
content:data.message
|
||||
});
|
||||
that.closest(".diapo").append(html);
|
||||
success: function (data) {
|
||||
if (data.success) {
|
||||
container.remove();
|
||||
} else {
|
||||
var html = _.template($("#alert_error_tpl").html(), {
|
||||
content: data.message
|
||||
});
|
||||
that.closest(".diapo").append(html);
|
||||
}
|
||||
},
|
||||
error: function(){
|
||||
error: function () {
|
||||
var html = _.template($("#alert_error_tpl").html(), {
|
||||
content:language.errorAjaxRequest
|
||||
content: language.errorAjaxRequest
|
||||
});
|
||||
that.closest(".diapo").append(html);
|
||||
},
|
||||
complete: function(){
|
||||
complete: function () {
|
||||
stopAjax(that);
|
||||
reloadContent();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
//update status list
|
||||
function resetStatus(that) {
|
||||
that.removeClass('selected');
|
||||
var html = that.parent().closest('.wrapper-item').find(".status-backup").html();
|
||||
that.parent().closest('.wrapper-item').find(".status-container").html('');
|
||||
that.parent().closest('.wrapper-item').find(".status-container").append(html);
|
||||
};
|
||||
$(".span12 img, .reset-status").click(function () {
|
||||
var that = $(this).closest('.wrapper-item').find('.lazaret-proposals .diapo');
|
||||
resetStatus(that);
|
||||
});
|
||||
$(".records-subititution .diapo", scope).bind('click', function () {
|
||||
var that = $(this);
|
||||
var diapo = that.closest('.lazaret-proposals').find('.diapo');
|
||||
var container = that.closest('.wrapper-item');
|
||||
diapo.not(this).removeClass('selected');
|
||||
/*Set selected or not to check for sending ajax request*/
|
||||
if (that.hasClass("selected")) {
|
||||
resetStatus(that);
|
||||
} else {
|
||||
that.addClass('selected');
|
||||
var elements = $(".selected", container);
|
||||
var recordId = elements.first().attr("data-record_id");
|
||||
var sBas = elements.first().attr("sbas");
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: '/prod/lazaret/' + sBas + '/' + recordId + '/status',
|
||||
dataType: 'json',
|
||||
beforeSend: function () {
|
||||
startAjax(that);
|
||||
},
|
||||
success: function (data) {
|
||||
if (data.status) {
|
||||
html = '';
|
||||
for ([key, value] of Object.entries(data.status)) {
|
||||
if (value.flag == 1) {
|
||||
checkValOff = '';
|
||||
checkValOn = 'checked=checked';
|
||||
} else {
|
||||
checkValOff = 'checked=checked';
|
||||
checkValOn = '';
|
||||
}
|
||||
var labelOff = value['labels_off_i18n']["{{ app['locale'] }}"];
|
||||
var labelOn = value['labels_on_i18n']["{{ app['locale'] }}"];
|
||||
if (labelOff == null || labelOff == "") {
|
||||
labelOff = 'off';
|
||||
}
|
||||
if (labelOn == null || labelOn == "") {
|
||||
labelOn = 'on';
|
||||
}
|
||||
html += '<tr>';
|
||||
html += '<td class="status-tab-left">';
|
||||
if (value['img_off'] != null) {
|
||||
html += ' <img src="{{ value['img_off'] }}" width="16" height="16" />';
|
||||
}
|
||||
;
|
||||
html += '<span>' + labelOff + '</span>';
|
||||
html += '<input type="radio" name="status[' + sBas + '][' + value.bit + ']" value="0" ' + checkValOff + ' />';
|
||||
html += '</td>';
|
||||
html += '<td class="status-tab-right">';
|
||||
html += '<input type="radio" name="status[' + sBas + '][' + value.bit + ']" value="1" ' + checkValOn + ' />';
|
||||
html += '<span>' + labelOn + '</span>';
|
||||
if (value['img_on'] != null) {
|
||||
html += '<img src="' + value['img_on'] + '" width="16" height="16" />';
|
||||
}
|
||||
;
|
||||
html += '</td>';
|
||||
html += '</tr>';
|
||||
}
|
||||
;
|
||||
that.parent().closest('.wrapper-item').find(".status-container").html('');
|
||||
that.parent().closest('.wrapper-item').find(".status-container").append(html);
|
||||
}
|
||||
},
|
||||
complete: function () {
|
||||
stopAjax(that);
|
||||
reloadContent();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
//substitute lazaret file click action
|
||||
$("button.subtitute-lazaret", scope).bind('click', function(){
|
||||
$("button.subtitute-lazaret", scope).bind('click', function () {
|
||||
var that = $(this);
|
||||
var lazaretId = getLazaretId(that);
|
||||
var container = $(this).closest('.wrapper-item');
|
||||
@@ -262,70 +356,82 @@
|
||||
var elements = [];
|
||||
var nbElement = 0;
|
||||
|
||||
if(nbProposals >= 1){
|
||||
|
||||
|
||||
if (nbProposals > 1) {
|
||||
elements = $(".selected", container);
|
||||
nbElement = elements.length;
|
||||
}else{
|
||||
return false;
|
||||
} else if (nbProposals == 1) {
|
||||
elements = $(".records-subititution > div", container);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(nbElement === 0){
|
||||
if (nbElement === 0 && nbProposals > 1) {
|
||||
alert(language.selectOneRecord);
|
||||
|
||||
return false;
|
||||
}else if(nbElement > 1){
|
||||
} else if (nbElement > 1) {
|
||||
alert(language.onlyOneRecord);
|
||||
return false;
|
||||
}
|
||||
|
||||
var recordId = elements.first().attr("data-record_id");
|
||||
var form = $(this).closest("form");
|
||||
$(".record_id").val(recordId);
|
||||
|
||||
|
||||
var form = $(this).closest("form");
|
||||
data = form.serializeArray();
|
||||
var allData = that.parent().closest('.wrapper-item').find(".change-record-wrapper").html();
|
||||
that.closest(".form-backup ").append(allData);
|
||||
that.parent().closest('.wrapper-item').find(".change-record ").remove();
|
||||
|
||||
$.ajax({
|
||||
type : 'POST',
|
||||
url: '/prod/lazaret/'+lazaretId+'/accept/',
|
||||
type: 'POST',
|
||||
url: '/prod/lazaret/' + lazaretId + '/accept/',
|
||||
dataType: 'json',
|
||||
data:{
|
||||
record_id: recordId
|
||||
data: data,
|
||||
beforeSend: function () {
|
||||
startAjax(that);
|
||||
},
|
||||
beforeSend: function(){
|
||||
startAjax(that);
|
||||
},
|
||||
success: function(data){
|
||||
if(data.success){
|
||||
that.closest(".wrapper-item").remove();
|
||||
}else{
|
||||
success: function (data) {
|
||||
if (data.success) {
|
||||
container.remove();
|
||||
} else {
|
||||
var html = _.template($("#alert_error_tpl").html(), {
|
||||
content:data.message
|
||||
content: data.message
|
||||
});
|
||||
that.closest(".diapo").append(html);
|
||||
}
|
||||
},
|
||||
error: function(){
|
||||
error: function () {
|
||||
var html = _.template($("#alert_error_tpl").html(), {
|
||||
content:language.errorAjaxRequest
|
||||
content: language.errorAjaxRequest
|
||||
});
|
||||
that.closest(".diapo").append(html);
|
||||
},
|
||||
complete: function(){
|
||||
complete: function () {
|
||||
stopAjax(that);
|
||||
reloadContent();
|
||||
}
|
||||
});
|
||||
});
|
||||
/*Toggle status block*/
|
||||
$(".toggle-status").click(function () {
|
||||
$(this).nextAll('.status-wrapper').first().toggleClass('hidden');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<style>
|
||||
.lazaret-proposals .diapo {
|
||||
float:none;
|
||||
}
|
||||
</style>
|
||||
|
||||
{% macro lazaretElement(app, file) %}
|
||||
{% import "common/thumbnail.html.twig" as thumb %}
|
||||
{% set records = file.getRecordsToSubstitute(app, true) %}
|
||||
<div class="lazaret-file span4">
|
||||
|
||||
<h5>{{ "Last uploaded version" | trans }}</h5>
|
||||
<ul class="thumbnails">
|
||||
<li class="span12" >
|
||||
<li class="span12">
|
||||
<div class="thumbnail">
|
||||
<img src="/prod/lazaret/{{ file.getId() }}/thumbnail/"/>
|
||||
<div class="caption">
|
||||
@@ -344,19 +450,128 @@
|
||||
<p>{{ border_checker_from_fqcn(check.getCheckClassname()).getMessage(app['translator']) }}</p>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="btn-group" style="text-align:center; padding:5px;">
|
||||
<button class="btn add-lazaret" title="{{ "Add" | trans }}">
|
||||
<img src="/assets/common/images/icons/add.png" width="16" height="16" class="btn-image">{{ "Add" | trans }}
|
||||
</button>
|
||||
<button class="btn delete-lazaret" title="{{ "Delete" | trans }}">
|
||||
<img src="/assets/common/images/icons/delete.png" width="16" height="16" class="btn-image">{{ "Delete" | trans }}
|
||||
</button>
|
||||
{% if records|length > 0 %}
|
||||
<button class="btn subtitute-lazaret" title="{{ "Substitute" | trans }}">
|
||||
<img src="/assets/common/images/icons/reload.png" width="16" height="16" class="btn-image">{{ "Substitute" | trans }}
|
||||
</button>
|
||||
<form class="change-record" name="change-records-status" action="/" method="POST">
|
||||
<div class="change-record-wrapper">
|
||||
{% set collection = file.getCollection(app) %}
|
||||
<input type="hidden" name="bas_id" value="{{ collection.get_base_id() }}">
|
||||
<input type="hidden" name="keep_attributes" value="1">
|
||||
<input class="record_id" type="hidden" name="record_id">
|
||||
<div class="update-status">
|
||||
<div id="status-{{ collection.get_base_id() }}" class='collection-status'>
|
||||
<a href="#" class="reset-status btn">Reset status</a>
|
||||
<h5 class="toggle-status">{{ 'upload:: Status :' | trans }} <img src="/assets/common/images/icons/icon-right-arrow.svg" width="10" height="10" class="btn-status"></h5>
|
||||
<div class="status-wrapper hidden">
|
||||
<table style="margin: auto">
|
||||
<tbody class="status-container">
|
||||
{% if file.getStatus(app) is not null %}
|
||||
{% for bit, status in file.getStatus(app) %}
|
||||
<tr>
|
||||
<td class="status-tab-left">
|
||||
{% if status['img_off'] is not empty %}
|
||||
<img src="{{ status['img_off'] }}" width="16" height="16" />
|
||||
{% endif %}
|
||||
<span>{{ status['labels_off_i18n'][app['locale']]|default('off') }}</span>
|
||||
<input type="radio" name="status[{{ collection.get_sbas_id() }}][{{ bit }}]" value="0" {% if status['flag'] == 0 %}checked="checked"{% endif%}/>
|
||||
|
||||
</td>
|
||||
<td class="status-tab-right">
|
||||
<input type="radio" name="status[{{ collection.get_sbas_id() }}][{{ bit }}]" value="1" {% if status['flag'] == 1 %}checked="checked"{% endif%} />
|
||||
<span for="labelon">{{ status['labels_on_i18n'][app['locale']]|default('on') }}</span>
|
||||
{% if status['img_on'] is not empty %}
|
||||
<img src="{{ status['img_on'] }}" width="16" height="16" />
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
{% for bit, status in collection.get_databox().getStatusStructure() %}
|
||||
<tr>
|
||||
<td class="status-tab-left">
|
||||
{% if status['img_off'] is not empty %}
|
||||
<img src="{{ status['img_off'] }}" width="16" height="16" />
|
||||
{% endif %}
|
||||
<span>{{ status['labels_off_i18n'][app['locale']]|default('off') }}</span>
|
||||
<input type="radio" name="status[{{ collection.get_sbas_id() }}][{{ bit }}]" value="0" checked="checked"/>
|
||||
|
||||
</td>
|
||||
<td class="status-tab-right">
|
||||
<input type="radio" name="status[{{ collection.get_sbas_id() }}][{{ bit }}]" value="1" />
|
||||
<span for="labelon">{{ status['labels_on_i18n'][app['locale']]|default('on') }}</span>
|
||||
{% if status['img_on'] is not empty %}
|
||||
<img src="{{ status['img_on'] }}" width="16" height="16" />
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="btn-group" style="text-align:center; padding:5px;">
|
||||
<button class="btn add-lazaret" title="{{ "Add" | trans }}">
|
||||
<img src="/assets/common/images/icons/add.png" width="16" height="16" class="btn-image">{{ "Add" | trans }}
|
||||
</button>
|
||||
<button class="btn delete-lazaret" title="{{ "Delete" | trans }}">
|
||||
<img src="/assets/common/images/icons/delete.png" width="16" height="16" class="btn-image">{{ "Delete" | trans }}
|
||||
</button>
|
||||
{% if records|length > 0 %}
|
||||
<button class="btn subtitute-lazaret" title="{{ "Substitute" | trans }}">
|
||||
<img src="/assets/common/images/icons/reload.png" width="16" height="16" class="btn-image">{{ "Substitute" | trans }}
|
||||
</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="hidden form-backup"></div>
|
||||
{# bloc to backup initial value of status list#}
|
||||
<table class="hidden">
|
||||
<tbody class="status-backup">
|
||||
{% if file.getStatus(app) is not null %}
|
||||
{% for bit, status in file.getStatus(app) %}
|
||||
<tr>
|
||||
<td class="status-tab-left">
|
||||
{% if status['img_off'] is not empty %}
|
||||
<img src="{{ status['img_off'] }}" width="16" height="16"/>
|
||||
{% endif %}
|
||||
<span>{{ status['labels_off_i18n'][app['locale']]|default('off') }}</span>
|
||||
<input type="radio" name="status[{{ collection.get_sbas_id() }}][{{ bit }}]" value="0" {% if status['flag'] == 0 %}checked="checked"{% endif%}/>
|
||||
|
||||
</td>
|
||||
<td class="status-tab-right">
|
||||
<input type="radio" name="status[{{ collection.get_sbas_id() }}][{{ bit }}]" value="1" {% if status['flag'] == 1 %}checked="checked"{% endif%} />
|
||||
<span for="labelon">{{ status['labels_on_i18n'][app['locale']]|default('on') }}</span>
|
||||
{% if status['img_on'] is not empty %}
|
||||
<img src="{{ status['img_on'] }}" width="16" height="16"/>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
{% for bit, status in collection.get_databox().getStatusStructure() %}
|
||||
<tr>
|
||||
<td class="status-tab-left">
|
||||
{% if status['img_off'] is not empty %}
|
||||
<img src="{{ status['img_off'] }}" width="16" height="16" />
|
||||
{% endif %}
|
||||
<span>{{ status['labels_off_i18n'][app['locale']]|default('off') }}</span>
|
||||
<input type="radio" name="status[{{ collection.get_sbas_id() }}][{{ bit }}]" value="0" checked="checked"/>
|
||||
|
||||
</td>
|
||||
<td class="status-tab-right">
|
||||
<input type="radio" name="status[{{ collection.get_sbas_id() }}][{{ bit }}]" value="1" />
|
||||
<span for="labelon">{{ status['labels_on_i18n'][app['locale']]|default('on') }}</span>
|
||||
{% if status['img_on'] is not empty %}
|
||||
<img src="{{ status['img_on'] }}" width="16" height="16" />
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -369,11 +584,11 @@
|
||||
{% if record_count > 0 %}
|
||||
<div class="lazaret-proposals span8">
|
||||
<h5>
|
||||
{% if record_count <= 1 %}
|
||||
{% trans %}A record matches the unique identifier :{% endtrans %}
|
||||
{% else %}
|
||||
{% trans with {'%record_count%' : record_count} %}%record_count% records match the unique identifier :{% endtrans %}
|
||||
{% endif %}
|
||||
{% if record_count <= 1 %}
|
||||
{% trans %}A record matches the unique identifier :{% endtrans %}
|
||||
{% else %}
|
||||
{% trans with {'%record_count%' : record_count} %}%record_count% records match the unique identifier :{% endtrans %}
|
||||
{% endif %}
|
||||
</h5>
|
||||
<ul class="thumbnails">
|
||||
{% for record in records %}
|
||||
@@ -383,15 +598,15 @@
|
||||
and app.getAclForUser(app.getAuthenticatedUser()).has_right_on_base(record.get_base_id(), constant('\\ACL::CANDELETERECORD')) %}
|
||||
<li class="records-subititution span3" style="width:210px">
|
||||
{% include 'prod/results/record.html.twig' with {
|
||||
'record': record,
|
||||
'settings': {
|
||||
'images_size': 169,
|
||||
'technical_display': '1',
|
||||
'rollover_thumbnail': 'caption',
|
||||
'doctype_display': '1',
|
||||
'handle_dblclick' : false,
|
||||
'show_context_menu': false
|
||||
}
|
||||
'record': record,
|
||||
'settings': {
|
||||
'images_size': 169,
|
||||
'technical_display': '1',
|
||||
'rollover_thumbnail': 'caption',
|
||||
'doctype_display': '1',
|
||||
'handle_dblclick' : false,
|
||||
'show_context_menu': false
|
||||
}
|
||||
} %}
|
||||
<div class="caption">
|
||||
{% for reason in reasons %}
|
||||
@@ -406,3 +621,30 @@
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
|
||||
<style>
|
||||
.lazaret-proposals .diapo {
|
||||
float:none;
|
||||
}
|
||||
|
||||
.collection-status {
|
||||
margin: 0 11px 14px;
|
||||
background: #f5f5f5;
|
||||
padding-bottom: 10px;
|
||||
color: #151515;
|
||||
}
|
||||
.collection-status h5 {
|
||||
padding: 10px 10px 0 10px;
|
||||
cursor: pointer;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.reset-status {
|
||||
display: inline-block;
|
||||
float: right;
|
||||
background: #fff;
|
||||
border: 1px solid;
|
||||
padding: 2px 5px;
|
||||
margin-top: -4px;
|
||||
margin-right: -6px;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
Reference in New Issue
Block a user