mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-18 15:33:15 +00:00
Merge branch 'master' into PHRAS-3052_Prod_tools_enable_disable_permalink
This commit is contained in:
@@ -48,6 +48,7 @@ class SubdefsController extends Controller
|
||||
return $this->render('prod/actions/Tools/metadata.html.twig', [
|
||||
'record' => $record,
|
||||
'metadatas' => $metadataBag,
|
||||
'subdef_name' => $subdef_name
|
||||
]);
|
||||
}
|
||||
|
||||
|
@@ -47,6 +47,8 @@ class ToolsController extends Controller
|
||||
$record = $records->first();
|
||||
$databox = $record->getDatabox();
|
||||
|
||||
/**Array list of subdefs**/
|
||||
$listsubdef = array_keys($record-> get_subdefs());
|
||||
// fetch subdef list:
|
||||
$subdefs = $record->get_subdefs();
|
||||
|
||||
@@ -57,7 +59,6 @@ class ToolsController extends Controller
|
||||
&& $acl->has_right_on_base($record->getBaseId(), \ACL::IMGTOOLS)
|
||||
) {
|
||||
$databoxSubdefs = $record->getDatabox()->get_subdef_structure()->getSubdefGroup($record->getType());
|
||||
|
||||
foreach ($subdefs as $subdef) {
|
||||
$label = $subdefName = $subdef->get_name();
|
||||
if (null === $permalink = $subdef->get_permalink()) {
|
||||
@@ -94,6 +95,7 @@ class ToolsController extends Controller
|
||||
'record' => $record,
|
||||
'recordSubdefs' => $recordAccessibleSubdefs,
|
||||
'metadatas' => $metadatas,
|
||||
'listsubdef' => $listsubdef
|
||||
]);
|
||||
}
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:jms="urn:jms:translation" version="1.2">
|
||||
<file date="2020-04-23T16:17:49Z" source-language="en" target-language="de" datatype="plaintext" original="not.available">
|
||||
<file date="2020-05-05T07:49:43Z" source-language="en" target-language="de" datatype="plaintext" original="not.available">
|
||||
<header>
|
||||
<tool tool-id="JMSTranslationBundle" tool-name="JMSTranslationBundle" tool-version="1.1.0-DEV"/>
|
||||
<note>The source node in most cases contains the sample message as written by the developer. If it looks like a dot-delimitted string such as "form.label.firstname", then the developer has not provided a default message.</note>
|
||||
@@ -9,9 +9,9 @@
|
||||
<trans-unit id="96f0767cb7ea65a7f86c8c9432e80d16cf9d8680" resname="Please provide the same passwords." approved="yes">
|
||||
<source>Please provide the same passwords.</source>
|
||||
<target state="translated">Bitte geben Sie diesselbe Passwörter ein.</target>
|
||||
<jms:reference-file line="44">Form/Login/PhraseaRecoverPasswordForm.php</jms:reference-file>
|
||||
<jms:reference-file line="36">Form/Login/PhraseaRenewPasswordForm.php</jms:reference-file>
|
||||
<jms:reference-file line="49">Form/Login/PhraseaRegisterForm.php</jms:reference-file>
|
||||
<jms:reference-file line="36">Form/Login/PhraseaRenewPasswordForm.php</jms:reference-file>
|
||||
<jms:reference-file line="44">Form/Login/PhraseaRecoverPasswordForm.php</jms:reference-file>
|
||||
</trans-unit>
|
||||
<trans-unit id="90b8c9717bb7ed061dbf20fe1986c8b8593d43d4" resname="The token provided is not valid anymore" approved="yes">
|
||||
<source>The token provided is not valid anymore</source>
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:jms="urn:jms:translation" version="1.2">
|
||||
<file date="2020-04-23T16:18:15Z" source-language="en" target-language="en" datatype="plaintext" original="not.available">
|
||||
<file date="2020-05-05T07:50:06Z" source-language="en" target-language="en" datatype="plaintext" original="not.available">
|
||||
<header>
|
||||
<tool tool-id="JMSTranslationBundle" tool-name="JMSTranslationBundle" tool-version="1.1.0-DEV"/>
|
||||
<note>The source node in most cases contains the sample message as written by the developer. If it looks like a dot-delimitted string such as "form.label.firstname", then the developer has not provided a default message.</note>
|
||||
@@ -9,9 +9,9 @@
|
||||
<trans-unit id="96f0767cb7ea65a7f86c8c9432e80d16cf9d8680" resname="Please provide the same passwords." approved="yes">
|
||||
<source>Please provide the same passwords.</source>
|
||||
<target state="translated">Please provide the same passwords.</target>
|
||||
<jms:reference-file line="44">Form/Login/PhraseaRecoverPasswordForm.php</jms:reference-file>
|
||||
<jms:reference-file line="36">Form/Login/PhraseaRenewPasswordForm.php</jms:reference-file>
|
||||
<jms:reference-file line="49">Form/Login/PhraseaRegisterForm.php</jms:reference-file>
|
||||
<jms:reference-file line="36">Form/Login/PhraseaRenewPasswordForm.php</jms:reference-file>
|
||||
<jms:reference-file line="44">Form/Login/PhraseaRecoverPasswordForm.php</jms:reference-file>
|
||||
</trans-unit>
|
||||
<trans-unit id="90b8c9717bb7ed061dbf20fe1986c8b8593d43d4" resname="The token provided is not valid anymore" approved="yes">
|
||||
<source>The token provided is not valid anymore</source>
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:jms="urn:jms:translation" version="1.2">
|
||||
<file date="2020-04-23T16:18:47Z" source-language="en" target-language="fr" datatype="plaintext" original="not.available">
|
||||
<file date="2020-05-05T07:50:31Z" source-language="en" target-language="fr" datatype="plaintext" original="not.available">
|
||||
<header>
|
||||
<tool tool-id="JMSTranslationBundle" tool-name="JMSTranslationBundle" tool-version="1.1.0-DEV"/>
|
||||
<note>The source node in most cases contains the sample message as written by the developer. If it looks like a dot-delimitted string such as "form.label.firstname", then the developer has not provided a default message.</note>
|
||||
@@ -9,9 +9,9 @@
|
||||
<trans-unit id="96f0767cb7ea65a7f86c8c9432e80d16cf9d8680" resname="Please provide the same passwords." approved="yes">
|
||||
<source>Please provide the same passwords.</source>
|
||||
<target state="translated">Veuillez indiquer des mots de passe identiques.</target>
|
||||
<jms:reference-file line="44">Form/Login/PhraseaRecoverPasswordForm.php</jms:reference-file>
|
||||
<jms:reference-file line="36">Form/Login/PhraseaRenewPasswordForm.php</jms:reference-file>
|
||||
<jms:reference-file line="49">Form/Login/PhraseaRegisterForm.php</jms:reference-file>
|
||||
<jms:reference-file line="36">Form/Login/PhraseaRenewPasswordForm.php</jms:reference-file>
|
||||
<jms:reference-file line="44">Form/Login/PhraseaRecoverPasswordForm.php</jms:reference-file>
|
||||
</trans-unit>
|
||||
<trans-unit id="90b8c9717bb7ed061dbf20fe1986c8b8593d43d4" resname="The token provided is not valid anymore" approved="yes">
|
||||
<source>The token provided is not valid anymore</source>
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:jms="urn:jms:translation" version="1.2">
|
||||
<file date="2020-04-23T16:19:16Z" source-language="en" target-language="nl" datatype="plaintext" original="not.available">
|
||||
<file date="2020-05-05T07:50:59Z" source-language="en" target-language="nl" datatype="plaintext" original="not.available">
|
||||
<header>
|
||||
<tool tool-id="JMSTranslationBundle" tool-name="JMSTranslationBundle" tool-version="1.1.0-DEV"/>
|
||||
<note>The source node in most cases contains the sample message as written by the developer. If it looks like a dot-delimitted string such as "form.label.firstname", then the developer has not provided a default message.</note>
|
||||
@@ -9,9 +9,9 @@
|
||||
<trans-unit id="96f0767cb7ea65a7f86c8c9432e80d16cf9d8680" resname="Please provide the same passwords.">
|
||||
<source>Please provide the same passwords.</source>
|
||||
<target state="new">Please provide the same passwords.</target>
|
||||
<jms:reference-file line="44">Form/Login/PhraseaRecoverPasswordForm.php</jms:reference-file>
|
||||
<jms:reference-file line="36">Form/Login/PhraseaRenewPasswordForm.php</jms:reference-file>
|
||||
<jms:reference-file line="49">Form/Login/PhraseaRegisterForm.php</jms:reference-file>
|
||||
<jms:reference-file line="36">Form/Login/PhraseaRenewPasswordForm.php</jms:reference-file>
|
||||
<jms:reference-file line="44">Form/Login/PhraseaRecoverPasswordForm.php</jms:reference-file>
|
||||
</trans-unit>
|
||||
<trans-unit id="90b8c9717bb7ed061dbf20fe1986c8b8593d43d4" resname="The token provided is not valid anymore">
|
||||
<source>The token provided is not valid anymore</source>
|
||||
|
@@ -20,7 +20,7 @@
|
||||
<div id='prod-tool-box' class="PNB10">
|
||||
|
||||
{# jquery Tabs #}
|
||||
<div id="tool-tabs" class="tabs">
|
||||
<div id="tool-tabs" class="tabs tool-modal-wrapper">
|
||||
{# jquery menu #}
|
||||
<div>
|
||||
<ul>
|
||||
@@ -194,6 +194,14 @@
|
||||
{# exiftool section #}
|
||||
{% if metadatas %}
|
||||
<div id="exiftool" class="tabBox">
|
||||
<div class="metadatas-top-block">
|
||||
<select id="select-meta-subdef" name="metaSubdef" class="input-medium check-filters">
|
||||
<option value="" disabled >{{"prod::tool:select subdef" | trans}}</option>
|
||||
{% for subdef in listsubdef %}
|
||||
<option value= "{{ subdef }}" {{ subdef== 'document'? 'selected' : 'false' }}>{{ subdef }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
<div id="metadata-load" style="height: 100%"></div>
|
||||
<div id="metadata-content"></div>
|
||||
</div>
|
||||
@@ -202,13 +210,12 @@
|
||||
<div id="tools-sharing" class="tabBox">
|
||||
<div class="well-large">
|
||||
{% for subdef in recordSubdefs %}
|
||||
<div class="row-fluid">
|
||||
<div class="span6">
|
||||
<div class="row-fluid tools-sharing-row">
|
||||
<div class="span6 tools-sharing-title">
|
||||
<span class="status-marker {{ subdef.state ? 'status-active' : 'status-inactive' }}"></span>{{ subdef.label }}
|
||||
</div>
|
||||
<div class="span6">
|
||||
<p class="text-right">
|
||||
<button type="button" class="stateChange_button btn btn-inverse text-right"
|
||||
<div class="span6 text-right">
|
||||
<button type="button" class="tools-sharing-btn stateChange_button btn btn-inverse text-right"
|
||||
data-name="{{ subdef.name }}" data-state="{{ subdef.state }}">
|
||||
{% if subdef.state %}
|
||||
{{- "Disable document type sharing"|trans -}}
|
||||
@@ -216,7 +223,6 @@
|
||||
{{- "Enable document type sharing"|trans -}}
|
||||
{% endif %}
|
||||
</button>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
@@ -288,20 +294,34 @@
|
||||
};
|
||||
|
||||
{% if record is not null %}
|
||||
function loadMetadataTab (url) {
|
||||
console.log(url);
|
||||
$.ajax({
|
||||
"url": url,
|
||||
"type": "GET",
|
||||
beforeSend: function () {
|
||||
$('#metadata-content').empty();
|
||||
$('#metadata-load').removeClass('hidden').addClass('loading');
|
||||
},
|
||||
success: function (data) {
|
||||
$('#metadata-load').removeClass('loading').addClass('hidden');
|
||||
$('#metadata-content').append(data);
|
||||
}
|
||||
});
|
||||
}
|
||||
$(document).ready(function(){
|
||||
$('.tool-metadata').click(function(e){
|
||||
$.ajax({
|
||||
"url": "{{ path('prod_subdefs_metadata', {'databox_id': record.get_sbas_id(), 'record_id': record.get_record_id, 'subdef_name': 'document'}) }}",
|
||||
"type": "GET",
|
||||
beforeSend: function(){
|
||||
$('#metadata-content').empty();
|
||||
$('#metadata-load').removeClass('hidden').addClass('loading');
|
||||
},
|
||||
success: function (data) {
|
||||
$('#metadata-load').removeClass('loading').addClass('hidden');
|
||||
$('#metadata-content').append(data);
|
||||
}
|
||||
});
|
||||
/**load default Subdef info **/
|
||||
loadMetadataTab( '{{ path('prod_subdefs_metadata', {'databox_id': record.get_sbas_id(), 'record_id': record.get_record_id, 'subdef_name': 'document' }) }}');
|
||||
$('.tool-modal-wrapper .tabBox').height($('#prod-tool-box').height() - 61 );
|
||||
$('#exiftool').height($('#prod-tool-box').height() - 55 );
|
||||
/**load selected Subdef info **/
|
||||
$('#select-meta-subdef').on('change', function (e) {
|
||||
var selectedSubdef = $(this).children('option:selected');
|
||||
if (selectedSubdef.val() !== "") {
|
||||
var url = '{{ path('prod_subdefs_metadata', {'databox_id': record.get_sbas_id(), 'record_id': record.get_record_id, 'subdef_name': 'subdefName' }) }}';
|
||||
url = url.replace("subdefName", selectedSubdef.val() );
|
||||
loadMetadataTab(url);
|
||||
}
|
||||
});
|
||||
});
|
||||
{% endif %}
|
||||
|
@@ -1,13 +1,13 @@
|
||||
{% set thumbnail = record.get_thumbnail() %}
|
||||
|
||||
<img style='float:left; margin-right:15px'
|
||||
<p><img class="metadatas-image" style='margin-right:15px'
|
||||
src="{{thumbnail.get_url()}}"
|
||||
width="{{thumbnail.get_width()}}"
|
||||
height="{{thumbnail.get_height()}}" />
|
||||
</p>
|
||||
<h3 class="metadatas-title" ><span>{{"prod::tool:metadata:metadatas" | trans}} : {{ subdef_name }}</span></h3>
|
||||
|
||||
<div>
|
||||
<h1><b>Metadatas</b></h1>
|
||||
<hr>
|
||||
<table>
|
||||
<tbody>
|
||||
{% if metadatas|length %}
|
||||
|
Reference in New Issue
Block a user