mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 18:03:17 +00:00
Merge branch 'PHRAS-1734_PORT_PHRAS-1589' into PHRAS-1744_PORT_PHRAS-1578_1579_1621_1675_1404_1336
# Conflicts: # resources/locales/messages.de.xlf # resources/locales/messages.en.xlf # resources/locales/messages.fr.xlf # resources/locales/messages.nl.xlf # resources/locales/validators.de.xlf # resources/locales/validators.en.xlf # resources/locales/validators.fr.xlf # resources/locales/validators.nl.xlf # resources/www/admin/styles/main.scss
This commit is contained in:
@@ -3,6 +3,10 @@
|
||||
|
||||
{% extends "common/index_bootstrap.html.twig" %}
|
||||
|
||||
{% block icon %}
|
||||
<link rel="shortcut icon" type="image/x-icon" href="/assets/account/images/favicon.ico">
|
||||
{% endblock %}
|
||||
|
||||
{% block stylesheet %}
|
||||
<link type="text/css" rel="stylesheet" href="/assets/account/css/account{% if not app.debug %}.min{% endif %}.css">
|
||||
<style type="text/css">
|
||||
|
14
templates/web/admin/custom_links.html.twig
Normal file
14
templates/web/admin/custom_links.html.twig
Normal file
@@ -0,0 +1,14 @@
|
||||
<tr>
|
||||
<td>{{ form_widget(form.linkName) }}</td>
|
||||
<td>{{ form_widget(form.linkLanguage) }}</td>
|
||||
<td>{{ form_widget(form.linkUrl) }}</td>
|
||||
<td>{{ form_widget(form.linkLocation) }}</td>
|
||||
<td>{{ form_widget(form.linkOrder) }}</td>
|
||||
<td>{{ form_widget(form.linkBold, { 'attr': {'style' : 'margin-top:0', 'class': 'link_check_box'} }) }}</td>
|
||||
<td>{{ form_widget(form.linkColor, { 'attr': {'class': 'link-color'} }) }}</td>
|
||||
<td>
|
||||
<button class="btn btn-default close-row">
|
||||
<span class="ui-button-icon-primary ui-icon ui-icon-closethick"></span>
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
@@ -8,6 +8,7 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block stylesheet %}
|
||||
<link rel="stylesheet" href="/bower_components/jquery-simplecolorpicker/jquery.simplecolorpicker.css">
|
||||
<link type="text/css" rel="stylesheet" href="/assets/admin/css/admin{% if not app.debug %}.min{% endif %}.css" />
|
||||
{% endblock %}
|
||||
|
||||
|
@@ -34,23 +34,36 @@
|
||||
{{ form_start(form, {'method': 'POST', 'action' : path('setup_display_globals'), 'attr': {'class' : 'form-horizontal'}}) }}
|
||||
{{ form_errors(form) }}
|
||||
{% for daform in form %}
|
||||
<fieldset>
|
||||
<legend>{{ daform.vars['label'] }}</legend>
|
||||
{% for formdata in daform %}
|
||||
<div class="control-group">
|
||||
{{ form_errors(formdata) }}
|
||||
{{ form_label(formdata, null, { 'label_attr': {'class' : 'control-label'} } ) }}
|
||||
<div class="controls">
|
||||
{{ form_widget(formdata, {'attr': {'class': 'input-xxlarge'}}) }}
|
||||
</div>
|
||||
{% if daform.vars['label'] != null %}
|
||||
<fieldset>
|
||||
<legend>{{ daform.vars['label'] }}</legend>
|
||||
{% for formdata in daform %}
|
||||
<div class="control-group">
|
||||
{{ form_errors(formdata) }}
|
||||
{{ form_label(formdata, null, { 'label_attr': {'class' : 'control-label'} } ) }}
|
||||
<div class="controls">
|
||||
{{ form_widget(formdata, {'attr': {'class': 'input-xxlarge'}}) }}
|
||||
</div>
|
||||
|
||||
<div>{{ formdata.vars['help_message'] }}</div>
|
||||
{{ form_rest(formdata) }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
{{ form_rest(daform) }}
|
||||
</fieldset>
|
||||
<div>{{ formdata.vars['help_message'] }}</div>
|
||||
{{ form_rest(formdata) }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
{{ form_rest(daform) }}
|
||||
</fieldset>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<legend>{{ "setup::custom-link:title-custom-link" | trans }}</legend>
|
||||
<table class="links" id="custom-link-table"
|
||||
data-prototype="{% filter escape %}{% include 'admin/custom_links.html.twig' with {'form': form['custom-links'].vars.prototype} %}{% endfilter %}">
|
||||
<tbody>
|
||||
{% for links in form['custom-links'] %}
|
||||
{% include 'admin/custom_links.html.twig' with {'form': links} %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<button id="add-row" class="btn btn-success">{{ "setup::custom-link:add-link" | trans }}</button>
|
||||
<div style="clear: both;"></div>
|
||||
<div class="well well-large">
|
||||
<div style="max-width: 400px;margin: 0 auto 10px;">
|
||||
<input type="submit" class="btn btn-primary btn-block btn-large" value="{{ 'boutton::valider' | trans }}"/>
|
||||
@@ -58,12 +71,26 @@
|
||||
</div>
|
||||
{{ form_end(form) }}
|
||||
|
||||
<script type="text/javascript" src="/assets/vendors/jquery-simplecolorpicker/jquery.simplecolorpicker.js"></script>
|
||||
<script type='text/javascript'>
|
||||
{% autoescape false %}
|
||||
$(document).ready(function() {
|
||||
// use html5 fallback validation if browser do not support required attribute
|
||||
var form = $("#GV_form");
|
||||
var inputs = form.find("input, select, textarea");
|
||||
|
||||
var header = "<thead>" +
|
||||
"<th>{{ "setup::custom-link:name-link" | trans }}</th>" +
|
||||
"<th>{{ "setup::custom-link:language-link" | trans }}</th>" +
|
||||
"<th>{{ "setup::custom-link:link-url" | trans }}</th>" +
|
||||
"<th>{{ "setup::custom-link:location-link" | trans }}</th>" +
|
||||
"<th>{{ "setup::custom-link:order-link" | trans }}</th>" +
|
||||
"<th></th>" +
|
||||
"<th></th>" +
|
||||
"<th></th>" +
|
||||
"</thead>";
|
||||
|
||||
|
||||
// if required not supported, emulate it
|
||||
if (!Modernizr.input.required) {
|
||||
form.bind("submit", function (event) {
|
||||
@@ -95,6 +122,73 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Get the ul that holds the collection of links
|
||||
$collectionHolder = $('table.links');
|
||||
$collectionHolder.data('index', $collectionHolder.find(':input').length);
|
||||
if ($collectionHolder.find('tbody tr').length > 0) {
|
||||
$("#custom-link-table").append(header);
|
||||
}
|
||||
$('select.link-color').simplecolorpicker({picker: true});
|
||||
_.each($('select.link-color'), function (element) {
|
||||
updateSelectColor($(element).siblings(), $(element).val());
|
||||
updateInputNameColor($(element).parent().siblings(':first').find("input"), $(element).val());
|
||||
});
|
||||
$("#add-row").click(function (e) {
|
||||
e.preventDefault();
|
||||
if ($collectionHolder.find('tbody tr').length == 0) {
|
||||
$("#custom-link-table").append(header);
|
||||
}
|
||||
addTagForm($collectionHolder);
|
||||
});
|
||||
function addTagForm($collectionHolder) {
|
||||
// Get the data-prototype
|
||||
var prototype = $collectionHolder.data('prototype');
|
||||
// get the new index
|
||||
var index = $collectionHolder.data('index');
|
||||
var newForm = prototype;
|
||||
newForm = newForm.replace(/__name__/g, index);
|
||||
// increase the index with one for the next item
|
||||
$collectionHolder.data('index', index + 1);
|
||||
$collectionHolder.append(newForm);
|
||||
$('select.link-color').simplecolorpicker({picker: true});
|
||||
_.each($('select.link-color'), function (element) {
|
||||
updateSelectColor($(element).siblings(), $(element).val());
|
||||
updateInputNameColor($(element).parent().siblings(':first').find("input"), $(element).val());
|
||||
});
|
||||
}
|
||||
|
||||
$("#custom-link-table").on('click', '.close-row', function () {
|
||||
$(this).closest('tr').remove();
|
||||
var rowCount = $('#custom-link-table tr').length;
|
||||
//remove header if no more rows
|
||||
if (rowCount <= 1) {
|
||||
$("#custom-link-table").empty();
|
||||
}
|
||||
return false;
|
||||
});
|
||||
$("#custom-link-table").on('change', 'select.link-color', function () {
|
||||
var element = $(this).parent().siblings(':first').find("input");
|
||||
updateSelectColor($(this).siblings(), $(this).val());
|
||||
updateInputNameColor(element, $(this).val());
|
||||
});
|
||||
function updateSelectColor(element, color) {
|
||||
element.css("border", "none");
|
||||
if (color === "") {
|
||||
element.css("background", "url(/assets/common/images/icons/Bouton-couleur.png)");
|
||||
} else {
|
||||
element.css("background", color);
|
||||
}
|
||||
}
|
||||
|
||||
function updateInputNameColor(element, color) {
|
||||
element.css("background-color", color);
|
||||
if (color === "") {
|
||||
element.css("color", "#555");
|
||||
} else {
|
||||
element.css("color", "#FFFFFF");
|
||||
}
|
||||
}
|
||||
});
|
||||
{% endautoescape %}
|
||||
</script>
|
||||
|
@@ -15,372 +15,583 @@
|
||||
{#<script type="text/javascript" src="/assets/vendors/jquery/jquery{% if not app.debug %}.min{% endif %}.js"></script>
|
||||
<script type="text/javascript" src="/assets/vendors/jquery-ui/jquery-ui{% if not app.debug %}.min{% endif %}.js"></script>
|
||||
<script type="text/javascript" src="/assets/vendors/jquery-test-paths/jquery.test-paths{% if not app.debug %}.min{% endif %}.js"></script>#}
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
$('.path_testable').path_file_test();
|
||||
$('.url_testable').url_test();
|
||||
$('.tabs').tabs({
|
||||
beforeActivate:function(event, ui){
|
||||
$('.path_testable:visible, .url_testable:visible').trigger('keyup');
|
||||
}
|
||||
});
|
||||
});
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
$('.path_testable').path_file_test();
|
||||
$('.url_testable').url_test();
|
||||
$('.tabs').tabs({
|
||||
beforeActivate: function (event, ui) {
|
||||
$('.path_testable:visible, .url_testable:visible').trigger('keyup');
|
||||
}
|
||||
});
|
||||
|
||||
function select_mediatype(name, selector)
|
||||
{
|
||||
$('.'+name).hide();
|
||||
$('#box'+name+$(selector).val()).show();
|
||||
}
|
||||
$(function() {
|
||||
// a workaround for a flaw in the demo system (http://dev.jqueryui.com/ticket/4375), ignore!
|
||||
$( "#dialog:ui-dialog" ).dialog( "destroy" );
|
||||
$(".toggle").on("click", function () {
|
||||
var box = $(this).data("toggle");
|
||||
$(box).toggle("500");
|
||||
});
|
||||
|
||||
var name = $( "#name" ), accessclass = $( "#accessclass" ),
|
||||
allFields = $( [] ).add( name ).add(accessclass),
|
||||
tips = $( ".validateTips" );
|
||||
|
||||
function updateTips( t ) {
|
||||
tips
|
||||
.text( t )
|
||||
.addClass( "ui-state-highlight" );
|
||||
setTimeout(function() {
|
||||
tips.removeClass( "ui-state-highlight", 1500 );
|
||||
}, 500 );
|
||||
}
|
||||
|
||||
function checkLength( o, n, min, max ) {
|
||||
if ( o.val().length > max || o.val().length < min ) {
|
||||
o.addClass( "ui-state-error" );
|
||||
updateTips( "Length of " + n + " must be between " +
|
||||
min + " and " + max + "." );
|
||||
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
function get_current_group()
|
||||
{
|
||||
return $('.ui-tabs-nav .ui-state-active a').html();
|
||||
}
|
||||
|
||||
function checkPresence( o ) {
|
||||
|
||||
var el = $('input[name="subdefs[]"][value="'+get_current_group()+'_'+o.val()+'"]');
|
||||
if ( el.length !== 0 ) {
|
||||
o.addClass( "ui-state-error" );
|
||||
updateTips( "SubdefName should be unique per group" );
|
||||
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
function checkSpecialChar( o )
|
||||
{
|
||||
var ok = true;
|
||||
var reg = new RegExp("[A-Za-z0-9-]+","g");
|
||||
|
||||
if(o.val().match(reg)[0].length !== o.val().length)
|
||||
{
|
||||
ok = false;
|
||||
o.addClass( "ui-state-error" );
|
||||
updateTips( "Special characters (except minus) or espaces are not authorized" );
|
||||
}
|
||||
|
||||
return ok;
|
||||
}
|
||||
|
||||
|
||||
$( "#dialog-form" ).dialog({
|
||||
autoOpen: false,
|
||||
height: 250,
|
||||
width: 350,
|
||||
modal: true,
|
||||
buttons: {
|
||||
"Create a Subdef": function() {
|
||||
var bValid = true;
|
||||
|
||||
allFields.removeClass( "ui-state-error" );
|
||||
|
||||
bValid = bValid && checkLength( name, "subdef name", 3, 16 );
|
||||
bValid = bValid && checkSpecialChar( name );
|
||||
bValid = bValid && checkPresence( name );
|
||||
|
||||
|
||||
|
||||
if ( bValid ) {
|
||||
$('input[name="add_subdef[group]"]').val(get_current_group());
|
||||
$('input[name="add_subdef[name]"]').val(name.val());
|
||||
$('input[name="add_subdef[class]"]').val(accessclass.val());
|
||||
$( this ).dialog( "close" );
|
||||
$('form.subdefs').submit();
|
||||
}
|
||||
},
|
||||
Cancel: function() {
|
||||
$( this ).dialog( "close" );
|
||||
}
|
||||
},
|
||||
close: function() {
|
||||
allFields.val( "" ).removeClass( "ui-state-error" );
|
||||
}
|
||||
});
|
||||
|
||||
$( "#create-subdef" )
|
||||
// .button()
|
||||
.click(function() {
|
||||
$( "#dialog-form" ).dialog( "open" );
|
||||
});
|
||||
|
||||
$('.subdef_deleter')
|
||||
// .button()
|
||||
.click(function(){
|
||||
delete_subdef($(this).next('input[name="subdef"]').val());
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
function delete_subdef(name)
|
||||
{
|
||||
$( "#dialog-delete-subdef" ).dialog({
|
||||
resizable: false,
|
||||
height:140,
|
||||
modal: true,
|
||||
buttons: {
|
||||
"Delete subdef": function() {
|
||||
$('#delete_subdef').val(name);
|
||||
$( this ).dialog( "destroy" );
|
||||
$('form.subdefs').submit();
|
||||
},
|
||||
Cancel: function() {
|
||||
$( this ).dialog( "destroy" );
|
||||
}
|
||||
}
|
||||
$("input, select").one("change", activeSubmit);
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
function activeSubmit() {
|
||||
$(".subviews-submit").removeAttr("disabled");
|
||||
$("input, select").off("change", activeSubmit);
|
||||
}
|
||||
|
||||
function fillCheckbox(section, name, defType, fieldname, values) {
|
||||
|
||||
$("[name='" + section + "_" + name + "_" + defType + "[" + fieldname + "][]']").each(function () {
|
||||
$(this).removeAttr("checked");
|
||||
|
||||
for (var key in values) {
|
||||
if ($(this).val() == values[key])
|
||||
$(this).prop("checked", "true");
|
||||
}
|
||||
});
|
||||
}
|
||||
function fillRadio(section, name, defType, fieldname, value) {
|
||||
$("[name='" + section + "_" + name + "_" + defType + "[" + fieldname + "]'][value='" + value + "']").prop("checked", true);
|
||||
}
|
||||
|
||||
function fillSelect(section, name, defType, fieldname, value) {
|
||||
$("[name='" + section + "_" + name + "_" + defType + "[" + fieldname + "]']").val(value)
|
||||
}
|
||||
|
||||
function fillSlide(section, name, defType, fieldname, value) {
|
||||
$("#slider" + section + name + defType + fieldname).slider({value: value});
|
||||
$("#slidervalue" + section + name + defType + fieldname).val(value);
|
||||
}
|
||||
|
||||
|
||||
function populate_values(section, name) {
|
||||
|
||||
var config = JSON.parse('{{ config |json_encode|raw }}'),
|
||||
i = 0,
|
||||
defType = $('[name="' + section + '_' + name + '_mediatype"]').val(),
|
||||
preset = $('[name="' + section + '_' + name + '_presets"]').val(),
|
||||
optionValue = $('[name="' + section + '_' + name + '_presets"] option:selected').attr("value");
|
||||
|
||||
if (typeof optionValue === 'undefined') {
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
for (var input in config[defType].form) {
|
||||
if (config[defType].form[input] == "slide") {
|
||||
fillSlide(section, name, defType, input, config[defType].definitions[preset][input]);
|
||||
}
|
||||
if (config[defType].form[input] == "radio") {
|
||||
fillRadio(section, name, defType, input, config[defType].definitions[preset][input]);
|
||||
}
|
||||
if (config[defType].form[input] == "select") {
|
||||
fillSelect(section, name, defType, input, config[defType].definitions[preset][input]);
|
||||
}
|
||||
if (config[defType].form[input] == "checkbox") {
|
||||
fillCheckbox(section, name, defType, input, config[defType].definitions[preset][input]);
|
||||
}
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
function select_mediatype(type, name, selector) {
|
||||
var config = JSON.parse('{{ config |json_encode|raw }}'),
|
||||
inputPresets = '[name="' + type + '_' + name + '_presets"]',
|
||||
defType = $(selector).val();
|
||||
|
||||
|
||||
$('.' + type + name).hide();
|
||||
|
||||
$('[data-toggle^="#box' + type + name + '"]').hide();
|
||||
$('[data-toggle="#box' + type + name + defType + '"]').show();
|
||||
|
||||
$('#box' + type + name + $(selector).val()).show();
|
||||
|
||||
if (defType == 'flexpaper') {
|
||||
$(inputPresets).closest("tr").hide();
|
||||
return;
|
||||
} else {
|
||||
$(inputPresets).closest("tr").show();
|
||||
}
|
||||
|
||||
$(inputPresets)
|
||||
.find('option')
|
||||
.remove()
|
||||
.end()
|
||||
.append($("<option value='custom'></option>").text('{{ 'Custom' | trans }}'));
|
||||
|
||||
if (typeof config[defType] === 'undefined') {
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
for (var key in config[defType].definitions) {
|
||||
if (config[defType].definitions[key] == null) {
|
||||
$(inputPresets).append($("<option></option>")
|
||||
.attr("disabled", "disabled")
|
||||
.text(key)
|
||||
);
|
||||
} else {
|
||||
$(inputPresets).append($("<option></option>")
|
||||
.attr("value", key)
|
||||
.text(key)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function subview_type(selector) {
|
||||
var mapping = JSON.parse('{{ subviews_mapping |json_encode|raw }}'),
|
||||
subviewType = $(selector).val();
|
||||
|
||||
$("#mediaType")
|
||||
.find('option')
|
||||
.remove()
|
||||
.end()
|
||||
.append($("<option></option>").text('{{ 'Choisir' | trans }}'));
|
||||
|
||||
for (var key in mapping[subviewType]) {
|
||||
$("#mediaType").append($('<option></option>')
|
||||
.attr("value", mapping[subviewType][key])
|
||||
.text(mapping[subviewType][key])
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function media_type(selector) {
|
||||
var config = JSON.parse('{{ config |json_encode|raw }}'),
|
||||
defType = $(selector).val();
|
||||
|
||||
$("#presets")
|
||||
.find('option')
|
||||
.remove()
|
||||
.end()
|
||||
.append($("<option></option>").text('{{ 'Choisir' | trans }}'));
|
||||
|
||||
if (typeof config[defType] === 'undefined') {
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
for (var key in config[defType].definitions) {
|
||||
if (config[defType].definitions[key] == null) {
|
||||
$("#presets").append($("<option></option>")
|
||||
.attr("disabled", "disabled")
|
||||
.text(key)
|
||||
);
|
||||
} else {
|
||||
$("#presets").append($('<option></option>')
|
||||
.attr("value", key)
|
||||
.text(key)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$(function () {
|
||||
// a workaround for a flaw in the demo system (http://dev.jqueryui.com/ticket/4375), ignore!
|
||||
$("#dialog:ui-dialog").dialog("destroy");
|
||||
|
||||
var name = $("#name"), accessclass = $("#accessclass"), subviewType = $("#subviewType"),
|
||||
mediaType = $("#mediaType"), presets = $("#presets"),
|
||||
allFields = $([]).add(name).add(accessclass).add(subviewType).add(mediaType).add(presets),
|
||||
tips = $(".validateTips");
|
||||
|
||||
function updateTips(t) {
|
||||
tips
|
||||
.text(t)
|
||||
.addClass("ui-state-highlight");
|
||||
setTimeout(function () {
|
||||
tips.removeClass("ui-state-highlight", 1500);
|
||||
}, 500);
|
||||
}
|
||||
|
||||
function checkLength(o, n, min, max) {
|
||||
if (o.val().length > max || o.val().length < min) {
|
||||
o.addClass("ui-state-error");
|
||||
updateTips("Length of " + n + " must be between " +
|
||||
min + " and " + max + ".");
|
||||
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
function checkPresence(mediaType, o) {
|
||||
|
||||
var el = $('input[name="subdefs[]"][value="' + mediaType + '_' + o.val() + '"]');
|
||||
if (el.length !== 0) {
|
||||
o.addClass("ui-state-error");
|
||||
updateTips("SubdefName should be unique per group");
|
||||
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
function checkSpecialChar(o) {
|
||||
var ok = true;
|
||||
var reg = new RegExp("[A-Za-z0-9-]+", "g");
|
||||
|
||||
if (o.val().match(reg)[0].length !== o.val().length) {
|
||||
ok = false;
|
||||
o.addClass("ui-state-error");
|
||||
updateTips("Special characters (except minus) or espaces are not authorized");
|
||||
}
|
||||
|
||||
return ok;
|
||||
}
|
||||
|
||||
|
||||
$("#dialog-form").dialog({
|
||||
autoOpen: false,
|
||||
height: 420,
|
||||
width: 300,
|
||||
modal: true,
|
||||
buttons: {
|
||||
"Create a Subdef": function () {
|
||||
var bValid = true;
|
||||
|
||||
allFields.removeClass("ui-state-error");
|
||||
|
||||
bValid = bValid && checkLength(name, "subdef name", 3, 16);
|
||||
bValid = bValid && checkSpecialChar(name);
|
||||
bValid = bValid && checkPresence(subviewType.val(), name);
|
||||
|
||||
if (bValid) {
|
||||
$('input[name="add_subdef[group]"]').val(subviewType.val());
|
||||
$('input[name="add_subdef[name]"]').val(name.val());
|
||||
$('input[name="add_subdef[mediaType]"]').val(mediaType.val());
|
||||
$('input[name="add_subdef[class]"]').val(accessclass.val());
|
||||
$('input[name="add_subdef[presets]"]').val(presets.val());
|
||||
$(this).dialog("close");
|
||||
$('form.subdefs').submit();
|
||||
}
|
||||
},
|
||||
Cancel: function () {
|
||||
$(this).dialog("close");
|
||||
}
|
||||
},
|
||||
close: function () {
|
||||
allFields.val("").removeClass("ui-state-error");
|
||||
}
|
||||
});
|
||||
|
||||
$("#create-subdef")
|
||||
// .button()
|
||||
.click(function () {
|
||||
$("#dialog-form").dialog("open");
|
||||
});
|
||||
|
||||
$('.subdef_deleter')
|
||||
// .button()
|
||||
.click(function () {
|
||||
delete_subdef($(this).next('input[name="subdef"]').val());
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
function delete_subdef(name) {
|
||||
$("#dialog-delete-subdef").dialog({
|
||||
resizable: false,
|
||||
height: 140,
|
||||
modal: true,
|
||||
buttons: {
|
||||
"Delete subdef": function () {
|
||||
$('#delete_subdef').val(name);
|
||||
$(this).dialog("destroy");
|
||||
$('form.subdefs').submit();
|
||||
},
|
||||
Cancel: function () {
|
||||
$(this).dialog("destroy");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<p>
|
||||
<button id="create-subdef" class="btn btn-success">{{ 'Create new subdef' | trans }}</button>
|
||||
</p>
|
||||
<div id="dialog-delete-subdef" title="{{ 'Delete the subdef ?' | trans }}" style="display:none;">
|
||||
<p>
|
||||
<span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 20px 0;"></span>
|
||||
{{ 'These subdef will be permanently deleted and cannot be recovered. Are you sure?' | trans }}
|
||||
<button id="create-subdef" class="btn btn-success">{{ 'Create new subdef' | trans }}</button>
|
||||
</p>
|
||||
</div>
|
||||
<div id="dialog-delete-subdef" title="{{ 'Delete the subdef ?' | trans }}" style="display:none;">
|
||||
<p>
|
||||
<span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 20px 0;"></span>
|
||||
{{ 'These subdef will be permanently deleted and cannot be recovered. Are you sure?' | trans }}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="dialog-form" title="Create new subdef">
|
||||
<p class="validateTips"></p>
|
||||
<form>
|
||||
<fieldset>
|
||||
<label for="name">{{ 'Subdef name' | trans }}</label>
|
||||
<input type="text" name="name" id="name" class="text ui-widget-content ui-corner-all" value=""/><br/>
|
||||
<label for="accessclass">{{ 'classe d\'acces' | trans }}</label>
|
||||
<select name="accessclass" id="accessclass">
|
||||
<option value="document">{{ 'document' | trans }}</option>
|
||||
<option value="preview" selected="selected">{{ 'preview' | trans }}</option>
|
||||
<option value="thumbnail">{{ 'tout le monde' | trans }}</option>
|
||||
</select>
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
<div id="dialog-form" title="Create new subdef">
|
||||
<p class="validateTips"></p>
|
||||
<form>
|
||||
<fieldset>
|
||||
<label for="name">{{ 'Subdef name' | trans }}</label>
|
||||
<input type="text" name="name" id="name" class="text ui-widget-content ui-corner-all" value=""/><br/>
|
||||
<label for="accessclass">{{ 'classe d\'acces' | trans }}</label>
|
||||
<select name="accessclass" id="accessclass">
|
||||
<option value="document">{{ 'document' | trans }}</option>
|
||||
<option value="preview" selected="selected">{{ 'preview' | trans }}</option>
|
||||
<option value="thumbnail">{{ 'tout le monde' | trans }}</option>
|
||||
</select>
|
||||
<label for="subviewType">{{ 'subviewType' | trans }}</label>
|
||||
<select name="subviewType" id="subviewType" onchange="subview_type(this)">
|
||||
<option>{{ 'Choisir' | trans }}</option>
|
||||
<option value="image">{{ 'image' | trans }}</option>
|
||||
<option value="video">{{ 'video' | trans }}</option>
|
||||
<option value="audio">{{ 'audio' | trans }}</option>
|
||||
<option value="document">{{ 'document' | trans }}</option>
|
||||
<option value="flash">{{ 'flash' | trans }}</option>
|
||||
</select>
|
||||
<label for="mediaType">{{ 'mediatype' | trans }}</label>
|
||||
<select name="mediaType" id="mediaType" onchange="media_type(this)">
|
||||
<option>{{ 'Choisir' | trans }}</option>
|
||||
</select>
|
||||
<label for="presets">{{ 'Presets' | trans }}</label>
|
||||
<select name="presets" id="presets">
|
||||
<option>{{ 'Choisir' | trans }}</option>
|
||||
</select>
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<form method="post" action="{{ path('admin_subdefs_subdef_update', { 'sbas_id' : databox.get_sbas_id }) }}" target="_self" class="subdefs">
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
{% for subdefgroup, subdeflist in subdefs %}
|
||||
<li><a class="no-ajax" href="#{{subdefgroup}}">{{subdefgroup}}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
{% for subdefgroup, subdeflist in subdefs %}
|
||||
<div id="{{subdefgroup}}">
|
||||
<div>
|
||||
<table cellspacing="0" cellpading="0" border="0" style="width:500px;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="width:120px;">
|
||||
<h2>{{ 'subdef.document' | trans }}</h2>
|
||||
</td>
|
||||
<td style="width:250px;"></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ 'subdef.orderable' | trans }}</td>
|
||||
<td><input type="checkbox" name="subdefsgroups[{{ subdefgroup }}][document_orderable]" {% if subdeflist.isDocumentOrderable() %}checked="checked" {% endif %}value="1"/></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% for subdefname , subdef in subdeflist %}
|
||||
<div>
|
||||
<input type="hidden" name="subdefs[]" value="{{subdefgroup}}_{{subdefname}}"/>
|
||||
<table cellspacing="0" cellpading="0" border="0" style="width:500px;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="width:120px;">
|
||||
<h2>{{subdefname}}</h2><button class="subdef_deleter btn btn-danger btn-mini">{{ 'boutton::supprimer' | trans }}</button>
|
||||
<input type="hidden" name="subdef" value="{{subdefgroup}}_{{subdefname}}"/>
|
||||
</td>
|
||||
<td style="width:250px;"></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
||||
{% for code, language in app['locales.available'] %}
|
||||
<tr>
|
||||
<td>{{ language }}</td>
|
||||
<td><input type="text" name="{{subdefgroup}}_{{subdefname}}_label[{{ code }}]" value="{{ subdef.get_label(code, false) }}" /></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
<tr>
|
||||
<td>{{ 'Telechargeable' | trans }}</td>
|
||||
<td><input type="checkbox" name="{{subdefgroup}}_{{subdefname}}_downloadable" {% if subdef.isDownloadable() %}checked="checked"{% endif %} value="1" /></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ 'subdef.orderable' | trans }}</td>
|
||||
<td><input type="checkbox" name="{{subdefgroup}}_{{subdefname}}_orderable" {% if subdef.isOrderable() %}checked="checked"{% endif %} value="1" /></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{{ 'classe' | trans }}
|
||||
</td>
|
||||
<td>
|
||||
<select name="{{subdefgroup}}_{{subdefname}}_class">
|
||||
<option>{{ 'classe' | trans }}</option>
|
||||
<option value="document" {% if subdef.get_class() == "document" %}selected="selected"{% endif %}>{{ 'document' | trans }}</option>
|
||||
<option value="preview" {% if subdef.get_class() == "preview" %}selected="selected"{% endif %}>{{ 'preview' | trans }}</option>
|
||||
<option value="thumbnail" {% if subdef.get_class() == "thumbnail" %}selected="selected"{% endif %}>{{ 'tout le monde' | trans }}</option>
|
||||
</select>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
Path
|
||||
</td>
|
||||
<td>
|
||||
<input class="path_testable test_writeable" type="text" value="{{subdef.get_path()}}" name="{{subdefgroup}}_{{subdefname}}_path"/>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{{ 'Write Metas' | trans }}
|
||||
</td>
|
||||
<td>
|
||||
<input type="checkbox" value="yes" {% if subdef.isMetadataUpdateRequired() %}checked="checked"{% endif %} name="{{subdefgroup}}_{{subdefname}}_meta"/>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{{ 'mediatype' | trans }}
|
||||
</td>
|
||||
<td>
|
||||
<select onchange="select_mediatype('{{subdefgroup}}{{subdefname}}', this);" name="{{subdefgroup}}_{{subdefname}}_mediatype">
|
||||
<option>{{ 'Choisir' | trans }}</option>
|
||||
{% for subdefType in subdef.getAvailableSubdefTypes() %}
|
||||
<option value="{{ subdefType.getType() }}" {% if subdef.getSubdefType.getType() == subdefType.getType() %}selected="selected"{% endif %}>{{ subdefType.getType() }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
{% for subdefType in subdef.getAvailableSubdefTypes() %}
|
||||
<div id="box{{subdefgroup}}{{subdefname}}{{ subdefType.getType() }}" class="{{subdefgroup}}{{subdefname}}" {% if subdef.getSubdefType.getType() != subdefType.getType() %}style="display:none;"{% endif %}>
|
||||
<table cellspacing="0" cellpading="0" border="0" style="width:500px;">
|
||||
{% for option in subdefType.getOptions() %}
|
||||
{% set varname = subdefgroup~'_'~subdefname~'_'~subdefType.getType()~'['~ option.getName() ~']' %}
|
||||
<tr>
|
||||
<td style="width:120px;">
|
||||
{{option.getDisplayName()}}
|
||||
</td>
|
||||
<td style="width:250px;">
|
||||
{% set extradata = '' %}
|
||||
{% if option.getType() == constant('\\Alchemy\\Phrasea\\Media\\Subdef\\OptionType\\OptionType::TYPE_RANGE') %}
|
||||
<div style="width:250px;" id="slider{{subdefgroup}}{{subdefname}}{{subdefType.getType()}}{{ option.getName() }}"></div>
|
||||
<script type="text/javascript">
|
||||
|
||||
$('#slider{{subdefgroup}}{{subdefname}}{{subdefType.getType()}}{{ option.getName() }}')
|
||||
.slider({
|
||||
value:{{ option.getValue }},
|
||||
min: {{ option.getMinValue() }},
|
||||
max: {{ option.getMaxValue() }},
|
||||
{% if option.getStep() is not empty %}step : {{ option.getStep() }},{% endif %}
|
||||
slide: function( event, ui ) {
|
||||
$( "#slidervalue{{subdefgroup}}{{subdefname}}{{ subdefType.getType() }}{{ option.getName() }}" ).val( ui.value );
|
||||
},
|
||||
create: function (event, ui) {
|
||||
{# add no-ajax class to slider link to prevent page load in IE7 #}
|
||||
$("a.ui-slider-handle", event.target).addClass("no-ajax");
|
||||
}
|
||||
});
|
||||
|
||||
$('#slidervalue{{subdefgroup}}{{subdefname}}{{subdefType.getType()}}{{ option.getName() }}').on('change', function(){
|
||||
var $this = $(this);
|
||||
$('#slider{{subdefgroup}}{{subdefname}}{{subdefType.getType()}}{{ option.getName() }}').slider( "option", "value", $this.val() );
|
||||
})
|
||||
|
||||
</script>
|
||||
{% elseif option.getType() == constant('\\Alchemy\\Phrasea\\Media\\Subdef\\OptionType\\OptionType::TYPE_ENUM') %}
|
||||
<select name="{{varname}}">
|
||||
<option value="">{{ 'Choisir' | trans }}</option>
|
||||
{% for pot_value in option.getAvailableValues() %}
|
||||
<option value="{{ pot_value }}" {% if pot_value == option.getValue() %}selected="selected"{% endif %}>{{ pot_value }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
{% elseif option.getType() == constant('\\Alchemy\\Phrasea\\Media\\Subdef\\OptionType\\OptionType::TYPE_BOOLEAN') %}
|
||||
<input name="{{varname}}" type="radio" value="yes" {% if option.getValue() %}checked="checked"{% endif %} /> {{ 'yes' | trans }}
|
||||
<input name="{{varname}}" type="radio" value="no" {% if option.getValue() is empty %}checked="checked"{% endif %}/> {{ 'no' | trans }}
|
||||
{% elseif option.getType() == constant('\\Alchemy\\Phrasea\\Media\\Subdef\\OptionType\\OptionType::TYPE_MULTI') %}
|
||||
{% for pot_value, selected in option.Value(true) %}
|
||||
<label class="checkbox inline">
|
||||
<input type="checkbox" name="{{varname}}[]" value="{{ pot_value }}" {% if selected %}checked="checked"{% endif %}/>{{ pot_value }}
|
||||
</label>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{% if option.type == constant('\\Alchemy\\Phrasea\\Media\\Subdef\\OptionType\\OptionType::TYPE_RANGE') %}
|
||||
<input style="width:35px;" value="{{option.value}}" id="slidervalue{{subdefgroup}}{{subdefname}}{{subdefType.getType()}}{{ option.getName() }}" name="{{varname}}" />
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
<form method="post" action="{{ path('admin_subdefs_subdef_update', { 'sbas_id' : databox.get_sbas_id }) }}"
|
||||
target="_self" class="subdefs">
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
{% for subdefgroup, subdeflist in subdefs %}
|
||||
<li><a class="no-ajax" href="#{{ subdefgroup }}">{{ subdefgroup }}</a></li>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</ul>
|
||||
<button type="submit" disabled="disabled"
|
||||
class="btn btn-primary subviews-submit">{{ 'boutton::valider' | trans }}</button>
|
||||
{% for subdefgroup, subdeflist in subdefs %}
|
||||
<div id="{{ subdefgroup }}">
|
||||
{% for subdefname , subdef in subdeflist %}
|
||||
<div>
|
||||
<input type="hidden" name="subdefs[]" value="{{ subdefgroup }}_{{ subdefname }}"/>
|
||||
<h2 class="subdefName">{{ subdefname }}</h2>
|
||||
<button class="subdef_deleter btn btn-danger btn-mini">{{ 'boutton::supprimer' | trans }}</button>
|
||||
<input type="hidden" name="subdef" value="{{ subdefgroup }}_{{ subdefname }}"/>
|
||||
<br/>
|
||||
<table class="subdefTab" cellspacing="0" cellpading="0" border="0"
|
||||
style="display:inline-block;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="width:100px;line-height: 0.9rem;">{{ 'Telechargeable' | trans }}</td>
|
||||
<td style="width:300px;"><input type="checkbox"
|
||||
name="{{ subdefgroup }}_{{ subdefname }}_downloadable"
|
||||
{% if subdef.isDownloadable() %}checked="checked"{% endif %}
|
||||
value="1"/></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ 'subdef.orderable' | trans }}</td>
|
||||
<td><input type="checkbox" name="{{ subdefgroup }}_{{ subdefname }}_orderable"
|
||||
{% if subdef.isOrderable() %}checked="checked"{% endif %} value="1"/>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{{ 'classe' | trans }}
|
||||
</td>
|
||||
<td>
|
||||
<select name="{{ subdefgroup }}_{{ subdefname }}_class">
|
||||
<option>{{ 'classe' | trans }}</option>
|
||||
<option value="document"
|
||||
{% if subdef.get_class() == "document" %}selected="selected"{% endif %}>{{ 'document' | trans }}</option>
|
||||
<option value="preview"
|
||||
{% if subdef.get_class() == "preview" %}selected="selected"{% endif %}>{{ 'preview' | trans }}</option>
|
||||
<option value="thumbnail"
|
||||
{% if subdef.get_class() == "thumbnail" %}selected="selected"{% endif %}>{{ 'tout le monde' | trans }}</option>
|
||||
</select>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{{ 'mediatype' | trans }}
|
||||
</td>
|
||||
<td>
|
||||
<select onchange="select_mediatype('{{ subdefgroup }}', '{{ subdefname }}', this);"
|
||||
name="{{ subdefgroup }}_{{ subdefname }}_mediatype">
|
||||
<option>{{ 'Choisir' | trans }}</option>
|
||||
{% for subdefType in subdef.getAvailableSubdefTypes() %}
|
||||
<option value="{{ subdefType.getType() }}"
|
||||
{% if subdef.getSubdefType.getType() == subdefType.getType() %}selected="selected"{% endif %}>{{ subdefType.getType() }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{{ 'Presets' | trans }}
|
||||
</td>
|
||||
<td>
|
||||
<select onchange="populate_values('{{ subdefgroup }}', '{{ subdefname }}');"
|
||||
name="{{ subdefgroup }}_{{ subdefname }}_presets">
|
||||
<option value="custom">{{ 'Custom' | trans }}</option>
|
||||
{% set defType = subdef.getSubdefType.getType() %}
|
||||
{% for key, pressets in config[defType].definitions %}
|
||||
{% if pressets == null %}
|
||||
<option disabled="disabled">{{ key }}</option>
|
||||
{% else %}
|
||||
<option value="{{ key }}"
|
||||
{% if subdef.get_preset() == key %}selected="selected"{% endif %}>{{ key }}</option>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</select>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
Path
|
||||
</td>
|
||||
<td>
|
||||
<input class="path_testable test_writeable" type="text"
|
||||
value="{{ subdef.get_path() }}"
|
||||
name="{{ subdefgroup }}_{{ subdefname }}_path"/>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{{ 'Write Metas' | trans }}
|
||||
</td>
|
||||
<td>
|
||||
<input type="checkbox" value="yes"
|
||||
{% if subdef.isMetadataUpdateRequired() %}checked="checked"{% endif %}
|
||||
name="{{ subdefgroup }}_{{ subdefname }}_meta"/>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<table cellspacing="0" class="langTab" cellpading="0" border="0">
|
||||
<tr>
|
||||
<td colspan="2"><h3>Labels</h3></td>
|
||||
</tr>
|
||||
{% for code, language in app['locales.available'] %}
|
||||
<tr>
|
||||
<td style="width:100px;">{{ language }}</td>
|
||||
<td style="width:300px;"><input type="text"
|
||||
name="{{ subdefgroup }}_{{ subdefname }}_label[{{ code }}]"
|
||||
value="{{ subdef.get_label(code, false) }}"/>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% for subdefType in subdef.getAvailableSubdefTypes() %}
|
||||
<span class="toggle"
|
||||
data-toggle="#box{{ subdefgroup }}{{ subdefname }}{{ subdefType.getType() }}"
|
||||
{% if subdef.getSubdefType.getType() != subdefType.getType() %}style="display:none;"{% endif %}>
|
||||
{{ 'Advanced settings' | trans }}
|
||||
</span>
|
||||
<div id="box{{ subdefgroup }}{{ subdefname }}{{ subdefType.getType() }}"
|
||||
class="{{ subdefgroup }}{{ subdefname }}"
|
||||
{% if subdef.getSubdefType.getType() != subdefType.getType() %}style="display:none;"{% endif %}>
|
||||
<table cellspacing="0" cellpading="0" border="0" style="width:500px;">
|
||||
{% for option in subdefType.getOptions() %}
|
||||
{% set varname = subdefgroup~'_'~subdefname~'_'~subdefType.getType()~'['~ option.getName() ~']' %}
|
||||
<tr>
|
||||
<td style="width:120px;">
|
||||
{{ option.getDisplayName() }}
|
||||
</td>
|
||||
<td style="width:250px;">
|
||||
{% set extradata = '' %}
|
||||
{% if option.getType() == constant('\\Alchemy\\Phrasea\\Media\\Subdef\\OptionType\\OptionType::TYPE_RANGE') %}
|
||||
<div style="width:250px;"
|
||||
id="slider{{ subdefgroup }}{{ subdefname }}{{ subdefType.getType() }}{{ option.getName() }}"></div>
|
||||
<script type="text/javascript">
|
||||
|
||||
$('#slider{{ subdefgroup }}{{ subdefname }}{{ subdefType.getType() }}{{ option.getName() }}')
|
||||
.slider({
|
||||
value:{{ option.getValue }},
|
||||
min: {{ option.getMinValue() }},
|
||||
max: {{ option.getMaxValue() }},
|
||||
{% if option.getStep() is not empty %}step: {{ option.getStep() }},{% endif %}
|
||||
slide: function (event, ui) {
|
||||
$("#slidervalue{{ subdefgroup }}{{ subdefname }}{{ subdefType.getType() }}{{ option.getName() }}").val(ui.value);
|
||||
jQuery('[name={{ subdefgroup }}_{{ subdefname }}_presets]').val("custom");
|
||||
if (jQuery(".subviews-submit").attr("disabled"))
|
||||
activeSubmit();
|
||||
},
|
||||
create: function (event, ui) {
|
||||
{# add no-ajax class to slider link to prevent page load in IE7 #}
|
||||
$("a.ui-slider-handle", event.target).addClass("no-ajax");
|
||||
}
|
||||
});
|
||||
|
||||
$('#slidervalue{{ subdefgroup }}{{ subdefname }}{{ subdefType.getType() }}{{ option.getName() }}').on('change', function () {
|
||||
var $this = $(this);
|
||||
$('#slider{{ subdefgroup }}{{ subdefname }}{{ subdefType.getType() }}{{ option.getName() }}').slider("option", "value", $this.val());
|
||||
})
|
||||
|
||||
</script>
|
||||
{% elseif option.getType() == constant('\\Alchemy\\Phrasea\\Media\\Subdef\\OptionType\\OptionType::TYPE_ENUM') %}
|
||||
<select name="{{ varname }}">
|
||||
<option value="">{{ 'Choisir' | trans }}</option>
|
||||
{% for pot_value in option.getAvailableValues() %}
|
||||
<option value="{{ pot_value }}"
|
||||
{% if pot_value == option.getValue() %}selected="selected"{% endif %}>{{ pot_value }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
{% elseif option.getType() == constant('\\Alchemy\\Phrasea\\Media\\Subdef\\OptionType\\OptionType::TYPE_BOOLEAN') %}
|
||||
<input name="{{ varname }}" type="radio" value="yes"
|
||||
{% if option.getValue() %}checked="checked"{% endif %} /> {{ 'yes' | trans }}
|
||||
<input name="{{ varname }}" type="radio" value="no"
|
||||
{% if option.getValue() is empty %}checked="checked"{% endif %}/> {{ 'no' | trans }}
|
||||
{% elseif option.getType() == constant('\\Alchemy\\Phrasea\\Media\\Subdef\\OptionType\\OptionType::TYPE_MULTI') %}
|
||||
{% for pot_value, selected in option.Value(true) %}
|
||||
<label class="checkbox inline">
|
||||
<input type="checkbox" name="{{ varname }}[]"
|
||||
value="{{ pot_value }}"
|
||||
{% if selected %}checked="checked"{% endif %}/>{{ pot_value }}
|
||||
</label>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{% if option.type == constant('\\Alchemy\\Phrasea\\Media\\Subdef\\OptionType\\OptionType::TYPE_RANGE') %}
|
||||
<input style="width:35px;" value="{{ option.value }}"
|
||||
id="slidervalue{{ subdefgroup }}{{ subdefname }}{{ subdefType.getType() }}{{ option.getName() }}"
|
||||
name="{{ varname }}"/>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<script>
|
||||
{% set defType = subdef.getSubdefType.getType() %}
|
||||
jQuery('#box{{ subdefgroup }}{{ subdefname }}{{ defType }} input, #box{{ subdefgroup }}{{ subdefname }}{{ defType }} select').change(function () {
|
||||
jQuery('[name={{ subdefgroup }}_{{ subdefname }}_presets]').val("custom");
|
||||
});
|
||||
</script>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<input type="hidden" name="delete_subdef" id="delete_subdef" value=""/>
|
||||
<input type="hidden" name="add_subdef[group]" value=""/>
|
||||
<input type="hidden" name="add_subdef[name]" value=""/>
|
||||
<input type="hidden" name="add_subdef[class]" value=""/>
|
||||
<div class="form-actions">
|
||||
<button type="submit" class="btn btn-primary">{{ 'boutton::valider' | trans }}</button>
|
||||
</div>
|
||||
</form>
|
||||
<input type="hidden" name="delete_subdef" id="delete_subdef" value=""/>
|
||||
<input type="hidden" name="add_subdef[group]" value=""/>
|
||||
<input type="hidden" name="add_subdef[name]" value=""/>
|
||||
<input type="hidden" name="add_subdef[mediaType]" value=""/>
|
||||
<input type="hidden" name="add_subdef[class]" value=""/>
|
||||
<input type="hidden" name="add_subdef[presets]" value=""/>
|
||||
</form>
|
||||
|
||||
<div style="display:none;">
|
||||
<div id="image_template">
|
||||
<div style="display:none;">
|
||||
<div id="image_template">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@@ -68,11 +68,10 @@
|
||||
<tr>
|
||||
<td class="menu">
|
||||
<div class="btn-group dropdown">
|
||||
<a class="btn btn-mini dropdown-toggle disabled" data-toggle="dropdown" href="#">
|
||||
<a class="btn btn-mini dropdown-toggle" data-toggle="dropdown" href="#">
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
{% if app['phraseanet.configuration']['main']['task-manager']['enabled'] %}
|
||||
<li>
|
||||
<a href="{{ path('admin_tasks_task_show', {"task" : task["id"] }) }}">
|
||||
{{ 'Edit' | trans }}
|
||||
@@ -93,7 +92,6 @@
|
||||
{{ 'Delete' | trans }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li>
|
||||
<a href="{{ path('admin_tasks_task_log', {"task" : task["id"] }) }}">
|
||||
{{ 'Logs' | trans }}
|
||||
|
@@ -506,7 +506,8 @@
|
||||
fileTooLargeAlt: '{{ 'You can alternatively receive an email when the download is ready.' | trans | e('js') }}',
|
||||
fileTooLargeEmail: '{{ 'Would you like to receive an e-mail when your download is ready ?' | trans | e('js') }}',
|
||||
success: '{{ "Success" | trans | e('js') }}',
|
||||
warning: '{{ "Warning !" | trans | e('js') }}'
|
||||
warning: '{{ "Warning !" | trans | e('js') }}',
|
||||
invalidEmail: '{{ 'export::export-email: email-invalid' | trans }}'
|
||||
},
|
||||
user: {
|
||||
email: '{{app.getAuthenticatedUser().getEmail() | e('js')}}'
|
||||
|
@@ -25,6 +25,8 @@
|
||||
<script type="text/javascript">
|
||||
google.charts.load('42', {packages: ['corechart']});
|
||||
</script>
|
||||
<script type="text/javascript"
|
||||
src="/assets/vendors/underscore/underscore{% if not app.debug %}.min{% endif %}.js"></script>
|
||||
{% block rss %}{% endblock %}
|
||||
{% block javascript %}{% endblock %}
|
||||
</head>
|
||||
|
@@ -1,5 +1,6 @@
|
||||
<div id="mainMenu" class="">
|
||||
<div class="PNB" style="right:auto;overflow:hidden;">
|
||||
{% set configuration = app['conf'].get(['registry', 'custom-links']) %}
|
||||
<div class="PNB menu-bar" style="right:auto;overflow:hidden;">
|
||||
<ol>
|
||||
<li>
|
||||
<span class="title">
|
||||
@@ -137,7 +138,8 @@
|
||||
<a target="_blank" href="https://docs.phraseanet.com/4.0/">
|
||||
<span>
|
||||
{{ 'phraseanet:: aide' | trans }}
|
||||
<span style="display:inline-block;cursor:pointer;padding:0;border:none;" id="help-trigger"> <i class="icon-caret-down"></i></span>
|
||||
<span style="display:inline-block;cursor:pointer;padding:0;border:none;padding-right:4px;padding-left:4px;"
|
||||
id="help-trigger"> <i class="icon-caret-down"></i></span>
|
||||
</span>
|
||||
</a>
|
||||
<table cellspacing="0" cellpadding="0" style="display:none;" class="contextMenu helpcontextmenu">
|
||||
@@ -153,7 +155,8 @@
|
||||
</div>
|
||||
{% endif %}
|
||||
<div title="" class="context-menu-item menu3-custom-item">
|
||||
<div style="" class="context-menu-item-inner infoDialog" infos="<div><span style='font-size:18px;'>PHRASEANET</span> {{ app['phraseanet.version'].getName() }} (V{{ app['phraseanet.version'].getNumber() }})</div><div></div><br/><div><a href='http://www.gnu.org/licenses/gpl.html' target='_blank'><img src='http://www.gnu.org/graphics/gplv3-88x31.png' style='vertical-align:middle;'/><span>License GNU GPL v3</span></a></div><br/><div><a href='http://www.phraseanet.com/' target='_blank'> © Copyright Alchemy 2005-{{ "now"|date("Y") }}</a></div>">{{ 'phraseanet:: a propos' | trans }}</div>
|
||||
<div style="" class="context-menu-item-inner infoDialog"
|
||||
infos="<div><span style='font-size:18px;'>PHRASEANET</span> {{ app['phraseanet.version'].getName() }} (V{{ app['phraseanet.version'].getNumber() }})</div><div></div><br/><div><a href='http://www.gnu.org/licenses/gpl.html' target='_blank'><img src='http://www.gnu.org/graphics/gplv3-88x31.png' style='vertical-align:middle;'/><span>License GNU GPL v3</span></a></div><br/><div><a href='http://www.phraseanet.com/' target='_blank'> © Copyright Alchemy 2005-{{ "now"|date("Y") }}</a><p style='margin-top: 10px' ><a href='../../gitlog.txt' target='_blank'>gitlog</a></p></div>">{{ 'phraseanet:: a propos' | trans }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
@@ -180,3 +183,50 @@
|
||||
{% include 'prod/notifications.html.twig' %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
// var key = 'help';
|
||||
var configurationSettingLinks = {{ configuration|json_encode|raw }};
|
||||
//seperate array based on location of link
|
||||
var seperatedLinksByLocation = _.groupBy(configurationSettingLinks, "linkLocation");
|
||||
|
||||
for (key in seperatedLinksByLocation) {
|
||||
if (key === 'navigation-bar') {
|
||||
var sortedCustomLinks = _.sortBy(seperatedLinksByLocation[key], 'linkOrder');
|
||||
|
||||
_.each(sortedCustomLinks, function (linksData) {
|
||||
if (linksData.linkLanguage == 'all' || linksData.linkLanguage === '{{ app['locale'] }}') {
|
||||
var styleAttr = "";
|
||||
styleAttr += linksData.linkColor ? "color: " + linksData.linkColor + ";" : "";
|
||||
styleAttr += linksData.linkBold == true ? "font-weight: bold;" : "";
|
||||
|
||||
var spanElement = $('<span />').attr('style', styleAttr).html(linksData.linkName);
|
||||
var links = '<li><a target="_blank" href="' + linksData.linkUrl + '">' +
|
||||
spanElement.prop("outerHTML") + '</a></li>';
|
||||
$('#mainMenu .menu-bar ol').append(links);
|
||||
}
|
||||
});
|
||||
} else if (key === 'help-menu') {
|
||||
var sortedCustomLinks = _.sortBy(seperatedLinksByLocation[key], 'linkOrder');
|
||||
|
||||
_.each(sortedCustomLinks, function (linksData) {
|
||||
if (linksData.linkLanguage == 'all' || linksData.linkLanguage === '{{ app['locale'] }}') {
|
||||
var styleAttr = "";
|
||||
styleAttr += linksData.linkColor ? "color: " + linksData.linkColor + ";" : "";
|
||||
styleAttr += linksData.linkBold == true ? "font-weight: bold;" : "";
|
||||
|
||||
var spanElement = $('<span />').attr('style', styleAttr).html(linksData.linkName);
|
||||
var links = '<div title="" class="context-menu-item menu3-custom-item">' +
|
||||
'<div style="" class="context-menu-item-inner">' +
|
||||
'<a target="_blank" href="' + linksData.linkUrl + '">' +
|
||||
spanElement.prop("outerHTML") + '</a></div></div>';
|
||||
$('.helpcontextmenu .context-menu-theme-vista').append(links);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
</script>
|
||||
|
@@ -7,6 +7,8 @@
|
||||
<option value="">{{ 'Choisir' | trans }}</option>
|
||||
<option value="default">{{ 'Re-initialiser' | trans }}</option>
|
||||
<option value="title">{{ 'Titre' | trans }}</option>
|
||||
<option value="date_created">{{ 'Date de création' | trans }}</option>
|
||||
<option value="date_updated">{{ 'Date de modification' | trans }}</option>
|
||||
</select>
|
||||
<button type="button" class="autoorder btn btn-inverse">{{ 'Re-ordonner' | trans }}</button>
|
||||
<button type="button" class="reverseorder btn btn-inverse">{{ 'Inverser' | trans }}</button>
|
||||
@@ -22,13 +24,17 @@
|
||||
{% for element in basket.getElements() %}
|
||||
<div id="ORDER_{{ element.getId() }}" class="CHIM diapo" style="height:130px;overflow:hidden;">
|
||||
<div class="title" title="{{ element.getRecord(app).get_title() }}" style="position:relative;z-index:1200;height:30px;overflow:hidden;text-align:center;text-overflow: ellipsis; line-height: 15px;">
|
||||
{{ element.getRecord(app).get_title() }} {{ element.getRecord(app).get_title() }}{{ element.getRecord(app).get_title() }}
|
||||
{{ element.getRecord(app).get_title() }}
|
||||
</div>
|
||||
{{ thumbnail.format(element.getRecord(app).get_thumbnail(), 80, 80, '', false, false) }}
|
||||
<form style="display:none;">
|
||||
<input type="hidden" name="id" value="{{ element.getId() }}"/>
|
||||
<input type="hidden" name="title" value="{{ element.getRecord(app).get_title() }}"/>
|
||||
<input type="hidden" name="default" value="{{ element.getOrd() }}"/>
|
||||
<input type="hidden" name="date_created"
|
||||
value="{{ element.getRecord(app).getCreated() | date('Y-m-dTH:i:s') }}"/>
|
||||
<input type="hidden" name="date_updated"
|
||||
value="{{ element.getRecord(app).getUpdated() | date('Y-m-dTH:i:s') }}"/>
|
||||
</form>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
@@ -1,59 +1,137 @@
|
||||
{% if not isAvailable %}
|
||||
<p>{{ 'No permalink available.' | trans }}</p>
|
||||
{% else %}
|
||||
{% if preview.permalinkUrl is not empty %}
|
||||
{% if subdefList is not empty %}
|
||||
{% set defKey = defaultKey %}
|
||||
<div id="share">
|
||||
<div id="tweet" class="well-large">
|
||||
<p>
|
||||
<a href="http://www.twitter.com/home/?status={{ preview.permaviewUrl }}" target="_blank">
|
||||
<img src="/assets/common/images/icons/twitter.png" title="share this on twitter" style="width:25px;vertical-align:middle;padding:0 5px;"/>
|
||||
{% trans %}Send to Twitter{% endtrans %}
|
||||
</a>
|
||||
</p>
|
||||
<p>
|
||||
<a href="http://www.facebook.com/sharer.php?u={{ preview.permaviewUrl }}" target="_blank">
|
||||
<img src="/assets/common/images/icons/facebook.png" title="share on facebook" style="width:25px;vertical-align:middle;padding:0 5px;"/>
|
||||
{% trans %}Send to Facebook{% endtrans %}
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<form action="#">
|
||||
<div class="form-group clearfix">
|
||||
<label>{% trans %}Resource URL{% endtrans %}</label>
|
||||
<input class="input-block-level" readonly="readonly" type="text" value="{{ preview.permalinkUrl }}"
|
||||
id="permalinkUrl"/>
|
||||
|
||||
<p class="pull-right">
|
||||
<a href="{{ preview.permalinkUrl }}" target="_blank">{{ 'previewLinkLabel' | trans }}</a>
|
||||
<a href="#" class="" id="permalinkUrlCopy">{{ 'copyClipboardLabel' | trans }}</a>
|
||||
</p>
|
||||
</div>
|
||||
<div class="form-group clearfix">
|
||||
<label>{% trans %}Detailed view URL{% endtrans %}</label>
|
||||
<input class="input-block-level" readonly="readonly" type="text" value="{{ preview.permaviewUrl }}" id="permaviewUrl"/>
|
||||
<p class="pull-right">
|
||||
<a href="{{ preview.permaviewUrl }}" target="_blank">{{ 'previewLinkLabel' | trans }}</a>
|
||||
<a href="#" class="" id="permaviewUrlCopy">{{ 'copyClipboardLabel' | trans }}</a>
|
||||
</p>
|
||||
</div>
|
||||
<div class="form-group clearfix">
|
||||
{#{% if type == 'image' %}#}
|
||||
<label>{% trans %}Embed code{% endtrans %}</label>
|
||||
{% spaceless %}
|
||||
<textarea class="input-block-level" rows="4" readonly="true" id="embedRecordUrl">
|
||||
<iframe width="{{ preview.width }}" height="{{ preview.height }}" src="{{ preview.embedUrl }}" frameborder="0" allowfullscreen></iframe>
|
||||
</textarea>
|
||||
{% endspaceless %}
|
||||
<p class="pull-right">
|
||||
<a href="{{ preview.embedUrl }}" target="_blank">{{ 'previewLinkLabel' | trans }}</a>
|
||||
<a href="#" class="" id="embedCopy">{{ 'copyClipboardLabel' | trans }}</a>
|
||||
</p>
|
||||
</div>
|
||||
{#{% endif %}#}
|
||||
</form>
|
||||
<div id="tweet" class="well-large">
|
||||
<p>
|
||||
<a href="#" id="advance-share">{{ 'share::share-record: advance' | trans }}</a>
|
||||
<span id="shared-def">
|
||||
{{ 'share::share-record: select-shared-def' | trans }}
|
||||
<select name="resource_type" id="resource_type_sel" class="input-small">
|
||||
{% for key,value in subdefList %}
|
||||
<option value={{ key }} {% if key == defKey %}selected{% endif %}>{{ value.label }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</span>
|
||||
</p>
|
||||
<p>
|
||||
<a id="twitter-link" href="http://www.twitter.com/home/?status={{ subdefList[defKey].permaviewUrl }}"
|
||||
target="_blank">
|
||||
<img src="/assets/common/images/icons/twitter.png" title="share this on twitter"
|
||||
style="width:25px;vertical-align:middle;padding:0 5px;"/>
|
||||
{% trans %}Send to Twitter{% endtrans %}
|
||||
</a>
|
||||
</p>
|
||||
<p>
|
||||
<a id="facebook-link" href="http://www.facebook.com/sharer.php?u={{ subdefList[defKey].permaviewUrl }}"
|
||||
target="_blank">
|
||||
<img src="/assets/common/images/icons/facebook.png" title="share on facebook"
|
||||
style="width:25px;vertical-align:middle;padding:0 5px;"/>
|
||||
{% trans %}Send to Facebook{% endtrans %}
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<form action="#">
|
||||
<div class="form-group clearfix">
|
||||
<label style="display:inline-block;">{% trans %}Resource URL{% endtrans %}</label>
|
||||
<input class="input-block-level" readonly="readonly" type="text"
|
||||
value="{{ subdefList[defKey].permalinkUrl }}"
|
||||
id="permalinkUrl"/>
|
||||
|
||||
<p class="pull-right">
|
||||
<a id="permalinkUrl-link" href="{{ subdefList[defKey].permalinkUrl }}"
|
||||
target="_blank">{{ 'previewLinkLabel' | trans }}</a>
|
||||
<a href="#" class="" id="permalinkUrlCopy">{{ 'copyClipboardLabel' | trans }}</a>
|
||||
</p>
|
||||
</div>
|
||||
<div class="form-group clearfix">
|
||||
<label>{% trans %}Detailed view URL{% endtrans %}</label>
|
||||
<input class="input-block-level" readonly="readonly" type="text"
|
||||
value="{{ subdefList[defKey].permaviewUrl }}" id="permaviewUrl"/>
|
||||
<p class="pull-right">
|
||||
<a id="permaviewUrl-link" href="{{ subdefList[defKey].permaviewUrl }}"
|
||||
target="_blank">{{ 'previewLinkLabel' | trans }}</a>
|
||||
<a href="#" class="" id="permaviewUrlCopy">{{ 'copyClipboardLabel' | trans }}</a>
|
||||
</p>
|
||||
</div>
|
||||
<div class="form-group clearfix">
|
||||
{#{% if type == 'image' %}#}
|
||||
<label>{% trans %}Embed code{% endtrans %}</label>
|
||||
{% spaceless %}
|
||||
<textarea class="input-block-level" rows="4" readonly="true" id="embedRecordUrl">
|
||||
<iframe width="{{ subdefList[defKey].width }}" height="{{ subdefList[defKey].height }}"
|
||||
src="{{ subdefList[defKey].embedUrl }}" frameborder="0"
|
||||
allowfullscreen></iframe>
|
||||
</textarea>
|
||||
{% endspaceless %}
|
||||
<p class="pull-right">
|
||||
<a id="embedRecordUrl-link" href="{{ subdefList[defKey].embedUrl }}"
|
||||
target="_blank">{{ 'previewLinkLabel' | trans }}</a>
|
||||
<a href="#" class="" id="embedCopy">{{ 'copyClipboardLabel' | trans }}</a>
|
||||
</p>
|
||||
</div>
|
||||
{#{% endif %}#}
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<script language="javascript">
|
||||
// var subdefListObj = JSON.parse(subdefList); // to convert json into a javascript object
|
||||
$(document).ready(function () {
|
||||
var subdefList = JSON.parse('{{ subdefList | json_encode | escape('js') }}');
|
||||
$('#resource_type_sel').on('change', function () {
|
||||
assignPermalinks(this.value);
|
||||
});
|
||||
$('input.ui-state-default').hover(
|
||||
function () {
|
||||
$(this).addClass('ui-state-hover');
|
||||
},
|
||||
function () {
|
||||
$(this).removeClass('ui-state-hover');
|
||||
}
|
||||
);
|
||||
$('#permalinkUrlCopy').on('click', function (event) {
|
||||
event.preventDefault();
|
||||
return copyElContentClipboard('permalinkUrl');
|
||||
});
|
||||
$('#permaviewUrlCopy').on('click', function (event) {
|
||||
event.preventDefault();
|
||||
return copyElContentClipboard('permaviewUrl');
|
||||
});
|
||||
$('#embedCopy').on('click', function (event) {
|
||||
event.preventDefault();
|
||||
return copyElContentClipboard('embedRecordUrl');
|
||||
});
|
||||
$('#advance-share').on('click', function () {
|
||||
$('#shared-def').show();
|
||||
});
|
||||
var copyElContentClipboard = function (elId) {
|
||||
var copyEl = document.getElementById(elId);
|
||||
copyEl.select();
|
||||
try {
|
||||
var successful = document.execCommand('copy');
|
||||
var msg = successful ? 'successful' : 'unsuccessful';
|
||||
console.log('Copying text command was ' + msg);
|
||||
} catch (err) {
|
||||
console.log('unable to copy');
|
||||
}
|
||||
}
|
||||
var assignPermalinks = function (resourceType) {
|
||||
$('#twitter-link').attr('href', 'http://www.twitter.com/home/?status=' + subdefList[resourceType].permaviewUrl);
|
||||
$('#facebook-link').attr('href', 'http://www.facebook.com/sharer.php?u=' + subdefList[resourceType].permaviewUrl);
|
||||
$('#permalinkUrl').val(subdefList[resourceType].permalinkUrl);
|
||||
$('#permalinkUrl-link').attr('href', subdefList[resourceType].permalinkUrl);
|
||||
$('#permaviewUrl').val(subdefList[resourceType].permaviewUrl);
|
||||
$('#permaviewUrl-link').attr('href', subdefList[resourceType].permaviewUrl);
|
||||
var html = '<iframe width="' + subdefList[resourceType].width
|
||||
+ '" height="' + subdefList[resourceType].height + '" src="' + subdefList[resourceType].embedUrl + '" frameborder="0" allowfullscreen></iframe>';
|
||||
$('#embedRecordUrl').val(html);
|
||||
$('#embedRecordUrl-link').attr('href', subdefList[resourceType].embedUrl);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
{% else %}
|
||||
<div>{{ 'No URL available' | trans }}</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
@@ -1,34 +1,39 @@
|
||||
{% import 'common/thumbnail.html.twig' as thumbnail %}
|
||||
<div id="reorder_options" class="PNB" style="height:30px;bottom:auto;">
|
||||
<form id="reorder_options" class="form-inline" style="display:inline-block;">
|
||||
<div id="reorder_options" class="row-fluid" style="height:30px;bottom:auto;">
|
||||
<form id="reorder_options" class="form-inline span10">
|
||||
<span>{{ 'Reordonner automatiquement' | trans }}</span>
|
||||
<select id="auto_order">
|
||||
<option value="">{{ 'Choisir' | trans }}</option>
|
||||
<option value="default">{{ 'Re-initialiser' | trans }}</option>
|
||||
<option value="title">{{ 'Titre' | trans }}</option>
|
||||
<option value="date_created">{{ 'Date de création' | trans }}</option>
|
||||
<option value="date_updated">{{ 'Date de modification' | trans }}</option>
|
||||
</select>
|
||||
<button type="button" class="autoorder">{{ 'Re-ordonner' | trans }}</button>
|
||||
<button type="button" class="reverseorder">{{ 'Inverser' | trans }}</button>
|
||||
<button type="button" class="autoorder btn btn-inverse">{{ 'Re-ordonner' | trans }}</button>
|
||||
<button type="button" class="reverseorder btn btn-inverse">{{ 'Inverser' | trans }}</button>
|
||||
</form>
|
||||
<form style="display:inline-block;" class="form-inline" name="reorder" method="POST" action="{{ path('prod_stories_story_reorder', { 'sbas_id' : story.get_sbas_id(), 'record_id' : story.get_record_id() }) }}">
|
||||
<form class="form-inline span2" name="reorder" method="POST"
|
||||
action="{{ path('prod_stories_story_reorder', { 'sbas_id' : story.get_sbas_id(), 'record_id' : story.get_record_id() }) }}">
|
||||
{% for element in story.get_children() %}
|
||||
<input type="hidden" name="element[{{ element.get_record_id() }}]" value="{{ element.getNumber() }}"/>
|
||||
{% endfor %}
|
||||
<button>{{ 'boutton::valider' | trans }}</button>
|
||||
<input type="submit" class="btn btn-inverse" value="{{ 'boutton::valider' | trans }}"/>
|
||||
</form>
|
||||
</div>
|
||||
<div style="top:45px;overflow:auto;" id="reorder_box" class="PNB">
|
||||
<div style="top:45px;overflow:auto;" id="reorder_box" class="row-fluid">
|
||||
<div class="elements">
|
||||
{% for element in story.get_children() %}
|
||||
<div id="ORDER_{{ element.get_record_id() }}" class="CHIM diapo" style="height:130px;overflow:hidden;">
|
||||
<div class="title" title="{{ element.get_title() }}" style="position:relative;z-index:1200;height:30px;overflow:hidden;text-align:center;text-overflow: ellipsis; line-height: 15px;">
|
||||
{{ element.get_title() }} {{ element.get_title() }} {{ element.get_title() }}
|
||||
{{ element.get_title() }}
|
||||
</div>
|
||||
{{ thumbnail.format(element.get_thumbnail(), 80, 80, '', false, false) }}
|
||||
<form style="display:none;">
|
||||
<input type="hidden" name="id" value="{{ element.get_record_id() }}"/>
|
||||
<input type="hidden" name="title" value="{{ element.get_title() }}"/>
|
||||
<input type="hidden" name="default" value="{{ element.getNumber() }}"/>
|
||||
<input type="hidden" name="date_created" value="{{ element.getCreated() | date('Y-m-dTH:i:s') }}"/>
|
||||
<input type="hidden" name="date_updated" value="{{ element.getUpdated() | date('Y-m-dTH:i:s') }}"/>
|
||||
</form>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
@@ -41,9 +41,9 @@
|
||||
</button>
|
||||
{% endif %}
|
||||
{% if app.getAclForUser(app.getAuthenticatedUser()).has_right(constant('\\ACL::BAS_CHUPUB')) %}
|
||||
<button class="ui-corner-all TOOL_bridge_btn basket_window" title="{{ 'action : bridge' | trans }}" data-href="{{ path("prod_bridge_manager") }}">
|
||||
<img src="/assets/common/images/icons/door.png"/>
|
||||
</button>
|
||||
{#<button class="ui-corner-all TOOL_bridge_btn basket_window" title="{{ 'action : bridge' | trans }}" data-href="{{ path("prod_bridge_manager") }}">#}
|
||||
{#<img src="/assets/common/images/icons/door.png"/>#}
|
||||
{#</button>#}
|
||||
<button class="ui-corner-all TOOL_publish_btn basket_window" title="{{ 'action : publier' | trans }}" data-selection-source="basket">
|
||||
<img src="/assets/common/images/icons/rss16.png"/>
|
||||
</button>
|
||||
|
@@ -41,9 +41,9 @@
|
||||
</button>
|
||||
{% endif %}
|
||||
{% if app.getAclForUser(app.getAuthenticatedUser()).has_right(constant('\\ACL::BAS_CHUPUB')) %}
|
||||
<button class="ui-corner-all TOOL_bridge_btn story_window" title="{{ 'action : bridge' | trans }}" data-href="{{ path("prod_bridge_manager") }}" data-selection-source="story">
|
||||
<img src="/assets/common/images/icons/door.png"/>
|
||||
</button>
|
||||
{#<button class="ui-corner-all TOOL_bridge_btn story_window" title="{{ 'action : bridge' | trans }}" data-href="{{ path("prod_bridge_manager") }}" data-selection-source="story">#}
|
||||
{#<img src="/assets/common/images/icons/door.png"/>#}
|
||||
{#</button>#}
|
||||
<button class="ui-corner-all TOOL_publish_btn story_window" title="{{ 'action : publier' | trans }}" data-selection-source="story">
|
||||
<img src="/assets/common/images/icons/rss16.png"/>
|
||||
</button>
|
||||
|
@@ -200,39 +200,53 @@
|
||||
<li class="context-menu-item">
|
||||
<div class="context-menu-item-inner">
|
||||
<a title="{{ 'action:: nouveau panier' | trans }}" class="basket-create-action" href="#">
|
||||
<img style="cursor:pointer;" src="/assets/common/images/icons/mtadd_0.gif" title="{{ 'action:: nouveau panier' | trans }}" />
|
||||
{{ 'action:: nouveau panier' | trans }}
|
||||
<img style="cursor:pointer;" src="/assets/common/images/icons/new_basket.png"
|
||||
title="{{ 'action:: nouveau panier' | trans }}"/>
|
||||
<span>{{ 'action:: nouveau panier' | trans }}</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="context-menu-item-inner">
|
||||
<a title="{{ 'Browse Baskets' | trans }}" class="basket-browse-action" href="#">
|
||||
{{ 'Browse Baskets' | trans }}
|
||||
<img style="cursor:pointer;" src="/assets/common/images/icons/browse_basket.png"
|
||||
title="{{ 'Browse Baskets' | trans }}"/>
|
||||
<span>{{ 'Browse Baskets' | trans }}</span>
|
||||
</a>
|
||||
</div>
|
||||
{% if app['conf'].get(['registry', 'modules', 'stories']) and app.getAclForUser(app.getAuthenticatedUser()).has_right(constant('\\ACL::CANADDRECORD')) %}
|
||||
<div class="context-menu-item-inner">
|
||||
<div class="context-menu-item-inner" style="line-height: 34px;">
|
||||
<div class="divider"></div>
|
||||
<a title="{{ 'action:: nouveau reportage' | trans }}" class="story-create-action" href="#">
|
||||
<img style="cursor:pointer;" src="/assets/common/images/icons/mtadd_0.gif" title="{{ 'action:: nouveau reportage' | trans }}" />
|
||||
{{ 'action:: nouveau reportage' | trans }}
|
||||
<img style="cursor:pointer;" src="/assets/common/images/icons/new_report.png"
|
||||
title="{{ 'action:: nouveau reportage' | trans }}"/>
|
||||
<span>{{ 'action:: nouveau reportage' | trans }}</span>
|
||||
</a>
|
||||
<div class="divider"></div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</li>
|
||||
<li class="context-menu-item">
|
||||
<div class="context-menu-item-inner basket-filter-action" data-sort="date">
|
||||
<img style="cursor:pointer;" src="/assets/common/images/icons/cal.png" title="{{ 'phraseanet:: tri par date' | trans }}" />
|
||||
{{ 'phraseanet:: tri par date' | trans }}
|
||||
<a title="{{ 'phraseanet:: tri par date' | trans }} " href="#">
|
||||
<img style="cursor:pointer;" src="/assets/common/images/icons/sort_date.png"
|
||||
title="{{ 'phraseanet:: tri par date' | trans }}"/>
|
||||
<span>{{ 'phraseanet:: tri par date' | trans }}</span>
|
||||
</a>
|
||||
</div>
|
||||
</li>
|
||||
<li class="context-menu-item">
|
||||
<div class="context-menu-item-inner basket-filter-action" data-sort="name">
|
||||
<img style="cursor:pointer;" src="/assets/common/images/icons/alpha.png" title="{{ 'phraseanet:: tri par nom' | trans }}" />
|
||||
{{ 'phraseanet:: tri par nom' | trans }}
|
||||
<a title="{{ 'phraseanet:: tri par nom' | trans }} " href="#">
|
||||
<img style="cursor:pointer;" src="/assets/common/images/icons/sort_alpha.png"
|
||||
title="{{ 'phraseanet:: tri par nom' | trans }}"/>
|
||||
<span>{{ 'phraseanet:: tri par nom' | trans }}</span>
|
||||
</a>
|
||||
</div>
|
||||
</li>
|
||||
<li class="context-menu-item">
|
||||
<div class="context-menu-item-inner basket-preferences-action">
|
||||
{{ 'Preferences' | trans }}
|
||||
<a title="{{ 'Preferences' | trans }} " href="#">
|
||||
<span>{{ 'Preferences' | trans }}</span>
|
||||
</a>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -288,6 +302,13 @@
|
||||
<table style="width:100%; table-layout:fixed;">
|
||||
<tr>
|
||||
<td style="width:50%; vertical-align:top;">
|
||||
{% set useTruncation = app['settings'].getUserSetting(app.getAuthenticatedUser(), 'use_truncation') %}
|
||||
<label class="checkbox inline" for="ADVSRCH_USE_TRUNCATION">
|
||||
<input id="ADVSRCH_USE_TRUNCATION" type="checkbox"
|
||||
class="checkbox preferences-options-use-truncation" name="truncation"
|
||||
{% if useTruncation == '1' or useTruncation == NULL %}checked="checked"{% endif %}>
|
||||
{{ 'index:advanced-preferences:: use truncation' | trans }}
|
||||
</label>
|
||||
<div id="ADVSRCH_SBAS_ZONE" class="sbasglob">
|
||||
<div class="btn-toolbar">
|
||||
<input class="btn btn-inverse toggle-database" type="button"
|
||||
@@ -664,6 +685,22 @@
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<h1>{{ 'Collection order' | trans }}</h1>
|
||||
<form class="form-inline">
|
||||
{% set order_collection_by = app['settings'].getUserSetting(app.getAuthenticatedUser(), 'order_collection_by') %}
|
||||
<label class="select" for="orderByName">
|
||||
<select class="preferences-options-collection-order" name="orderByName">
|
||||
<option {% if order_collection_by == constant('Alchemy\\Phrasea\\Core\\Configuration\\DisplaySettingService::ORDER_BY_ADMIN') %} selected="selected" {% endif %}
|
||||
value="{{ constant('Alchemy\\Phrasea\\Core\\Configuration\\DisplaySettingService::ORDER_BY_ADMIN') }}">{{ 'Defined by admin' | trans }}</option>
|
||||
<option {% if order_collection_by == 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_collection_by == 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="box">
|
||||
<h1>{{ 'index::advance_search: facet' | trans }}</h1>
|
||||
{% set facetFilter = app['settings'].getUserSetting(app.getAuthenticatedUser(), 'facet') %}
|
||||
|
@@ -139,13 +139,13 @@
|
||||
{{ '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_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">
|
||||
@@ -211,36 +211,37 @@
|
||||
{% 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 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>
|
||||
<ul class="submenu dropdown-menu">
|
||||
<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([]) %}
|
||||
{% if plugins.actionbar is not empty %}
|
||||
<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('') }}" data-selection-source="search-result">
|
||||
{% if action.icon %}
|
||||
<img src="{{ plugin_asset(plugin.PluginName, action.icon) }}" height="16" width="16" class="btn-image"/>
|
||||
{% endif %}
|
||||
<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 %}
|
||||
|
||||
{% set label = action.label %}
|
||||
{% trans from plugin.PluginLocale %}label{% endtrans %}
|
||||
</a>
|
||||
</li>
|
||||
{% set label = action.label %}
|
||||
{% trans from plugin.PluginLocale %}label{% endtrans %}
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</ul>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</div>
|
||||
</span>
|
||||
{% elseif plugins.actionbar is not empty %}
|
||||
|
@@ -33,20 +33,21 @@
|
||||
({% trans with {'%maxFileSizeReadable%' : maxFileSizeReadable} %}maximum : %maxFileSizeReadable%{% endtrans %})
|
||||
</span>
|
||||
</td>
|
||||
<td class='uploader-icon'>
|
||||
<img src='/assets/common/images/icons/logo-flash.png' width="32px" heigh="32px" title="{{ 'You are using the Flash uploader.' | trans }}"/>
|
||||
</td>
|
||||
<td class='uploader-info'>
|
||||
<p>
|
||||
{{ 'You are using the Flash uploader.' | trans }}
|
||||
{% if not app['browser'].supportFileAPI() %}
|
||||
{{ 'This version does not allow you to access all the features offered by the HTML5 uploader' | trans }}
|
||||
{% endif %}
|
||||
</p>
|
||||
{% if app['browser'].supportFileAPI() %}
|
||||
<a id="UPLOAD_HTML5_LINK" href="{{ path('upload_html5_form') }}" class="dialog full-dialog">{{ 'Use the HTML5 uploader' | trans }}</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
{#<td class='uploader-icon'>#}
|
||||
{#<img src='/assets/common/images/icons/logo-flash.png' width="32px" heigh="32px" title="{{ 'You are using the Flash uploader.' | trans }}"/>#}
|
||||
{#</td>#}
|
||||
{#<td class='uploader-info'>#}
|
||||
{#<p>#}
|
||||
{#{{ 'You are using the Flash uploader.' | trans }}#}
|
||||
{#{% if not app['browser'].supportFileAPI() %}#}
|
||||
{#{{ 'This version does not allow you to access all the features offered by the HTML5 uploader' | trans }}#}
|
||||
{#{% endif %}#}
|
||||
{#</p>#}
|
||||
{#{% if app['browser'].supportFileAPI() %}#}
|
||||
<a style="display: none" id="UPLOAD_HTML5_LINK" href="{{ path('upload_html5_form') }}"
|
||||
class="dialog full-dialog">{{ 'Use the HTML5 uploader' | trans }}</a>
|
||||
{#{% endif %}#}
|
||||
{#</td>#}
|
||||
</tr>
|
||||
</table>
|
||||
{# settings box #}
|
||||
@@ -54,11 +55,14 @@
|
||||
<h5>{{ 'upload:: Destination (collection) :' | trans }} :</h5>
|
||||
{# collections list #}
|
||||
{% if collections|length > 0 %}
|
||||
<select name="base_id" class="span3" style="margin-left: 10px;">
|
||||
{% set last_used_collection = app['settings'].getUserSetting(app.getAuthenticatedUser(), 'upload_last_used_collection') %}
|
||||
<select name="base_id" class="span3 upload-options-collection" style="margin-left: 10px;">
|
||||
{% for sbasId, availableCollections in collections %}
|
||||
<optgroup label="{{ availableCollections['databox'].get_label(app['locale']) }}" class="select-label">
|
||||
{% for collection in availableCollections['databox_collections'] %}
|
||||
<option value="{{ collection.get_base_id() }}" class="select-row">{{ collection.get_label(app['locale']) }}</option>
|
||||
<option {% if last_used_collection == collection.get_base_id() %} selected="selected" {% endif %}
|
||||
value="{{ collection.get_base_id() }}"
|
||||
class="select-row">{{ collection.get_label(app['locale']) }}</option>
|
||||
{% endfor %}
|
||||
</optgroup>
|
||||
{% endfor %}
|
||||
@@ -66,7 +70,8 @@
|
||||
{# collections status #}
|
||||
{% for availableCollections in collections %}
|
||||
{% for collection in availableCollections['databox_collections'] %}
|
||||
<div id="status-{{ collection.get_base_id() }}" class='collection-status' style='{{ loop.parent.loop.first and loop.first ? "display:block" :"display:none" }}'>
|
||||
<div id="status-{{ collection.get_base_id() }}" class='collection-status'
|
||||
style='{{ last_used_collection == collection.get_base_id() ? "display:block" :"display:none" }}'>
|
||||
<h5>{{ 'upload:: Status :' | trans }} :</h5>
|
||||
<table class="status-tab">
|
||||
<tbody>
|
||||
@@ -121,6 +126,12 @@
|
||||
</div>
|
||||
|
||||
</form>
|
||||
<div>
|
||||
<select name="upload_type" id="upload_type" class="input-large" style="width: 200px; float:right">
|
||||
<option value="html">{{ 'Use the HTML5 uploader' | trans }}</option>
|
||||
<option value="flash" selected>{{ 'Use the Flash uploader' | trans }}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -36,18 +36,19 @@
|
||||
({% trans with {'%maxFileSizeReadable%' : maxFileSizeReadable} %}maximum : %maxFileSizeReadable%{% endtrans %})
|
||||
</span>
|
||||
</td>
|
||||
<td class='uploader-icon'>
|
||||
<img src='/assets/common/images/icons/html5-logo.png' width="32px" heigh="32px" title="{{ 'You are using the HTML5 uploader.' | trans }}"/>
|
||||
</td>
|
||||
<td class="uploader-infmaxFileSizeo">
|
||||
<p>
|
||||
{{ 'You are using the HTML5 uploader.' | trans }}
|
||||
{% if not app['browser'].supportFileAPI() %}
|
||||
{{ 'Your browser does not support all HTML5 features properly.' | trans }}
|
||||
{% endif %}
|
||||
</p>
|
||||
<a id="UPLOAD_FLASH_LINK" href="{{ path('upload_flash_form') }}" class="dialog full-dialog">{{ 'Use the Flash uploader' | trans }}</a>
|
||||
</td>
|
||||
{#<td class='uploader-icon'>#}
|
||||
{#<img src='/assets/common/images/icons/html5-logo.png' width="32px" heigh="32px" title="{{ 'You are using the HTML5 uploader.' | trans }}"/>#}
|
||||
{#</td>#}
|
||||
{#<td class="uploader-infmaxFileSizeo">#}
|
||||
{#<p>#}
|
||||
{#{{ 'You are using the HTML5 uploader.' | trans }}#}
|
||||
{#{% if not app['browser'].supportFileAPI() %}#}
|
||||
{#{{ 'Your browser does not support all HTML5 features properly.' | trans }}#}
|
||||
{#{% endif %}#}
|
||||
{#</p>#}
|
||||
<a style="display: none" id="UPLOAD_FLASH_LINK" href="{{ path('upload_flash_form') }}"
|
||||
class="dialog full-dialog">{{ 'Use the Flash uploader' | trans }}</a>
|
||||
{#</td>#}
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@@ -55,19 +56,24 @@
|
||||
<div class='settings-box'>
|
||||
<h5>{{ 'upload:: Destination (collection) :' | trans }} :</h5>
|
||||
{# collections list #}
|
||||
<select name="base_id" class="span3" style="margin-left: 10px;">
|
||||
{% for sbasId, availableCollections in collections %}
|
||||
<optgroup label="{{ availableCollections['databox'].get_label(app['locale']) }}" class="select-label">
|
||||
{% for collection in availableCollections['databox_collections'] %}
|
||||
<option value="{{ collection.get_base_id() }}" class="select-row">{{ collection.get_label(app['locale']) }}</option>
|
||||
{% set last_used_collection = app['settings'].getUserSetting(app.getAuthenticatedUser(), 'upload_last_used_collection') %}
|
||||
<select name="base_id" class="span3 upload-options-collection" style="margin-left: 10px;">
|
||||
{% for sbasId, availableCollections in collections %}
|
||||
<optgroup label="{{ availableCollections['databox'].get_label(app['locale']) }}"
|
||||
class="select-label">
|
||||
{% for collection in availableCollections['databox_collections'] %}
|
||||
<option {% if last_used_collection == collection.get_base_id() %} selected="selected" {% endif %}
|
||||
value="{{ collection.get_base_id() }}"
|
||||
class="select-row">{{ collection.get_label(app['locale']) }}</option>
|
||||
{% endfor %}
|
||||
</optgroup>
|
||||
{% endfor %}
|
||||
</optgroup>
|
||||
{% endfor %}
|
||||
</select>
|
||||
{# collections status #}
|
||||
{% for availableCollections in collections %}
|
||||
{% for collection in availableCollections['databox_collections'] %}
|
||||
<div id="status-{{ collection.get_base_id() }}" class='collection-status' style='{{ loop.parent.loop.first and loop.first ? "display:block" :"display:none" }}'>
|
||||
<div id="status-{{ collection.get_base_id() }}" class='collection-status'
|
||||
style='{{ last_used_collection == collection.get_base_id() ? "display:block" :"display:none" }}'>
|
||||
<h5>{{ 'upload:: Status :' | trans }} :</h5>
|
||||
<table class="status-tab">
|
||||
<tbody>
|
||||
@@ -131,6 +137,12 @@
|
||||
</div>
|
||||
|
||||
</form>
|
||||
<div>
|
||||
<select name="upload_type" id="upload_type" class="input-large" style="width: 200px; float:right">
|
||||
<option value="html" selected>{{ 'Use the HTML5 uploader' | trans }}</option>
|
||||
<option value="flash">{{ 'Use the Flash uploader' | trans }}</option>
|
||||
</select>
|
||||
</div>
|
||||
{% else %}
|
||||
{{ 'You can not upload files' | trans }}
|
||||
{% endif %}
|
||||
|
@@ -738,8 +738,8 @@
|
||||
<td><label>{{ 'Modele de donnees' | trans }}</label></td>
|
||||
<td>
|
||||
<select name="db_template" class="databox_creation_input">
|
||||
{% for template in available_templates %}
|
||||
<option value="{{ template }}">{{ template }}</option>
|
||||
{% for key,template in available_templates %}
|
||||
<option value="{{ key }}">{{ template }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</td>
|
||||
|
@@ -39,6 +39,14 @@
|
||||
self.location.replace("thesaurus.php?piv={{ piv }}&bid={{ bid }}") ;
|
||||
}
|
||||
|
||||
function inputChanged() {
|
||||
if ($("[name=term]").val().length > 0) {
|
||||
$("[name=term]").css('border-color', '');
|
||||
} else {
|
||||
$("[name=term]").css('border-color', '#F00');
|
||||
}
|
||||
}
|
||||
|
||||
function test(div)
|
||||
{
|
||||
t = document.getElementById(div).innerHTML;
|
||||
@@ -262,7 +270,8 @@
|
||||
<tr>
|
||||
<td style="text-align:right; width:80px;"><span class="label"></span> : </td>
|
||||
<td></td>
|
||||
<td><input type="text" style="width:250px;" name="term"></td>
|
||||
<td><input type="text" style="width:250px;" name="term"
|
||||
onkeyup="inputChanged();return(false);"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align:right">{{ 'thesaurus:: contexte' | trans }} : </td>
|
||||
@@ -976,6 +985,10 @@
|
||||
var myObj = { "win":window };
|
||||
|
||||
var t = zdialog.find("[name=term]").val();
|
||||
if (t.length == 0) {
|
||||
zdialog.find("[name=term]").css('border-color', '#F00');
|
||||
return;
|
||||
}
|
||||
var k = zdialog.find("[name=context]").val();
|
||||
if(k != "") {
|
||||
t += " (" + k + ")";
|
||||
|
Reference in New Issue
Block a user