mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-15 14:03:27 +00:00
Merge branch '3.8'
Conflicts: lib/Alchemy/Phrasea/Controller/Permalink.php
This commit is contained in:
@@ -12,6 +12,9 @@
|
||||
namespace Alchemy\Phrasea\Command;
|
||||
|
||||
use Alchemy\Phrasea\Command\Command;
|
||||
use Alchemy\Phrasea\Command\Upgrade\Step31;
|
||||
use Alchemy\Phrasea\Command\Upgrade\Step35;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
|
||||
@@ -43,19 +46,19 @@ Steps are
|
||||
EOF
|
||||
);
|
||||
|
||||
$this->addOption('from', 'f', null, 'The version where to start upgrade');
|
||||
$this->addOption('at-version', null, null, 'The version step to upgrade');
|
||||
$this->addOption('from', 'f', InputOption::VALUE_REQUIRED, 'The version where to start upgrade');
|
||||
$this->addOption('at-version', null, InputOption::VALUE_REQUIRED, 'The version step to upgrade');
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
protected function generateUpgradesFromOption(InputInterface $input)
|
||||
{
|
||||
if (false === $input->getOption('from') && false === $input->getOption('at-version')) {
|
||||
if (null === $input->getOption('from') && null === $input->getOption('at-version')) {
|
||||
throw new \Exception('You MUST provide a `from` or `at-version` option');
|
||||
}
|
||||
|
||||
if (false !== $input->getOption('from') && false !== $input->getOption('at-version')) {
|
||||
if (null !== $input->getOption('from') && null !== $input->getOption('at-version')) {
|
||||
throw new \Exception('You CAN NOT provide a `from` AND `at-version` option at the same time');
|
||||
}
|
||||
|
||||
@@ -74,6 +77,15 @@ EOF
|
||||
$this->upgrades[] = new $classname($this->container);
|
||||
}
|
||||
}
|
||||
|
||||
if (null !== $input->getOption('at-version')) {
|
||||
if ('3.1' === $input->getOption('at-version')) {
|
||||
$this->upgrades[] = new Step31($this->container);
|
||||
}
|
||||
if ('3.5' === $input->getOption('at-version')) {
|
||||
$this->upgrades[] = new Step35($this->container);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function setUpgrades(array $upgrades)
|
||||
|
@@ -113,7 +113,7 @@ class Permalink extends AbstractDelivery
|
||||
return $response;
|
||||
};
|
||||
|
||||
$controllers->get('/v1/{sbas_id}/{record_id}/caption/', function(PhraseaApplication $app, Request $request, $sbas_id, $record_id) use ($retrieveRecord) {
|
||||
$controllers->get('/v1/{sbas_id}/{record_id}/caption/', function(PhraseaApplication $app, Request $request, $sbas_id, $record_id) {
|
||||
$token = $request->query->get('token');
|
||||
|
||||
$databox = $app['phraseanet.appbox']->get_databox((int) $sbas_id);
|
||||
|
@@ -737,6 +737,16 @@ class Browser
|
||||
}
|
||||
|
||||
return true;
|
||||
} else if(stripos($this->_agent, 'trident') !== false) {
|
||||
// >= IE 11
|
||||
$this->setBrowser(self::BROWSER_IE);
|
||||
|
||||
// version
|
||||
$result = explode("rv:", $this->_agent);
|
||||
$this->setVersion(preg_replace("/[^0-9.]+/", "", $result[1]));
|
||||
|
||||
// remove Gecko out of the user-agent, otherwise the mozilla check will success
|
||||
$this->_agent = str_replace(array("Mozilla", "Gecko"), "MSIE", $this->_agent);
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@@ -397,7 +397,7 @@ class appbox extends base
|
||||
|
||||
if (version_compare($from_version, '3.7') < 0) {
|
||||
$upgrader->addRecommendation(_('Your install might need to re-read technical datas'), 'bin/console records:rescan-technical-datas');
|
||||
$upgrader->addRecommendation(_('Your install might need to re-read technical datas'), 'bin/console records:build-missing-subdefs');
|
||||
$upgrader->addRecommendation(_('Your install might need to build some sub-definitions'), 'bin/console records:build-missing-subdefs');
|
||||
}
|
||||
|
||||
return $advices;
|
||||
|
@@ -1,3 +1,17 @@
|
||||
{% if push.get_count_actionable() == 0 %}
|
||||
<div class="PNB">
|
||||
<div style="text-align:center;margin-top:150px;">
|
||||
{% if 'Push' == context %}
|
||||
{% trans %}None of the selected records can be pushed.{% endtrans %}
|
||||
{% else %}
|
||||
{% trans %}None of the selected records can be sent for feedback.{% endtrans %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<div style="text-align:center;margin-top:15px;">
|
||||
<button class="btn btn-inverse" onclick="p4.Dialog.Close(1)">{% trans "boutton::fermer" %}</button>
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="PNB PushBox" id="PushBox" >
|
||||
<div class="PNB" style="width:205px;">
|
||||
<div class="PNB10 LeftColumn">
|
||||
@@ -162,6 +176,23 @@
|
||||
<table style="table-layout:auto;">
|
||||
<tr>
|
||||
<td>
|
||||
{% if 'Push' == context %}
|
||||
{% set nb_push_items = push.get_count_actionable() %}
|
||||
{% if push.get_count_not_actionable() == 0 %}
|
||||
{% trans %}You are about to push {{ nb_push_items }} records.{% endtrans %}
|
||||
{% else %}
|
||||
{% set nb_not_available = push.get_count_not_actionable() %}
|
||||
{% trans %}You are about to push {{ nb_push_items }} records, {{ nb_not_available }} records can not be processed.{% endtrans %}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% set nb_push_items = push.get_count_actionable() %}
|
||||
{% if push.get_count_not_actionable() == 0 %}
|
||||
{% trans %}You are about to ask for feedback for {{ nb_push_items }} records.{% endtrans %}
|
||||
{% else %}
|
||||
{% set nb_not_available = push.get_count_not_actionable() %}
|
||||
{% trans %}You are about to ask for feedback for {{ nb_push_items }} records, {{ nb_not_available }} records can not be processed.{% endtrans %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="options">
|
||||
<button class="select-all btn btn-inverse">{% trans 'Select all' %}</button>
|
||||
@@ -244,3 +275,4 @@
|
||||
p4.ListManager = new ListManager($('#ListManager'));
|
||||
});
|
||||
</script>
|
||||
{% endif %}
|
||||
|
@@ -856,6 +856,9 @@ form[name=registerForm] .multiselect-group {
|
||||
.lt-ie9 .input-table input,
|
||||
.lt-ie9 .input-table .input {
|
||||
background-color: @inputIEBackground !important;
|
||||
color: contrast(@inputIEBackground) !important;
|
||||
/** If font family is issued front google fonts hidden dot characters will always be white */
|
||||
font-family: Arial !important;
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user