mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-12 04:23:19 +00:00
Minor tweaks
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
|
||||
namespace Alchemy\Phrasea\Controller\Admin;
|
||||
|
||||
use Alchemy\Phrasea\Application as PhraseaApplication;
|
||||
use Alchemy\Phrasea\Metadata\TagProvider;
|
||||
use Alchemy\Phrasea\Vocabulary\Controller as VocabularyController;
|
||||
use Silex\Application;
|
||||
@@ -140,8 +141,16 @@ class Fields implements ControllerProviderInterface
|
||||
|
||||
public function displayApp(Application $app, Request $request, $sbas_id)
|
||||
{
|
||||
$languages = array();
|
||||
|
||||
foreach (PhraseaApplication::getAvailableLanguages() as $code => $language) {
|
||||
$data = explode('_', $code);
|
||||
$languages[$data[0]] = $language;
|
||||
}
|
||||
|
||||
return $app['twig']->render('/admin/fields/index.html.twig', array(
|
||||
'sbas_id' => $sbas_id
|
||||
'sbas_id' => $sbas_id,
|
||||
'languages' => $languages,
|
||||
));
|
||||
}
|
||||
|
||||
@@ -230,7 +239,8 @@ class Fields implements ControllerProviderInterface
|
||||
'location' => $app->path('admin_fields_show_field', array(
|
||||
'sbas_id' => $sbas_id,
|
||||
'id' => $field->get_id()
|
||||
))));
|
||||
))
|
||||
));
|
||||
}
|
||||
|
||||
public function listFields(Application $app, $sbas_id) {
|
||||
|
@@ -21,4 +21,4 @@
|
||||
</div>
|
||||
|
||||
{# bootstrap admin field backbone application #}
|
||||
<script type="text/javascript" src="/include/minify/f=/assets/requirejs/require.js,/scripts/apps/admin/fields/main.js"></script>
|
||||
<script type="text/javascript" src="/include/minify/?f=/assets/requirejs/require.js,/scripts/apps/admin/fields/main.js"></script>
|
||||
|
@@ -115,7 +115,7 @@
|
||||
<i class='icon-ok'></i>
|
||||
<% } else { %>
|
||||
<i class='icon-remove'></i>
|
||||
<% } %> {% trans %}Multivalued{% endtrans %}
|
||||
<% } %> {% trans %}Multivalued{% endtrans %}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -168,7 +168,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="separator">{% trans %}Separator{% endtrans %}</label></td>
|
||||
<td><label for="separator">{% trans %}Separator{% endtrans %}</label></td>
|
||||
<td><input id="separator" type="text" value="<%= field.separator %>" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -212,11 +212,9 @@
|
||||
<select id="thumbtitle">
|
||||
<option value="1" <%= field.thumbtitle == "1" ? "selected" : "" %> >{% trans 'Tous' %}</option>
|
||||
<option value="0" <%= field.thumbtitle == "0" ? "selected" : "" %> >{% trans 'Aucun' %}</option>
|
||||
<option value="fr" <%= field.thumbtitle == "fr" ? "selected" : "" %> >{% trans 'Francais' %}</option>
|
||||
<option value="nl" <%= field.thumbtitle == "nl" ? "selected" : "" %> >{% trans 'Dutch' %}</option>
|
||||
<option value="de" <%= field.thumbtitle == "de" ? "selected" : "" %> >{% trans 'Allemand' %}</option>
|
||||
<option value="en" <%= field.thumbtitle == "en" ? "selected" : "" %> >{% trans 'Anglais' %}</option>
|
||||
<option value="ar" <%= field.thumbtitle == "ar" ? "selected" : "" %> >{% trans 'Arabe' %}</option>
|
||||
{% for code, language in languages %}
|
||||
<option value="{{ code }}" <%= field.thumbtitle == "{{ code }}" ? "selected" : "" %> >{{ language}}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
@@ -49,5 +49,5 @@ define([
|
||||
}
|
||||
});
|
||||
|
||||
return ModalView;
|
||||
return ModalView;
|
||||
});
|
||||
|
Reference in New Issue
Block a user