mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 18:03:17 +00:00
Add admin field application
This commit is contained in:

committed by
Romain Neutron

parent
7199d38ab3
commit
05dc3659af
27
templates/web/admin/fields/index.html.twig
Normal file
27
templates/web/admin/fields/index.html.twig
Normal file
@@ -0,0 +1,27 @@
|
||||
{# empty Twig template #}
|
||||
<script type="text/javascript" src="/assets/i18n/i18next-1.6.0.min.js"></script>
|
||||
|
||||
{% include 'admin/fields/templates.html.twig' %}
|
||||
|
||||
<div id="admin-field-app" class="container-fluid">
|
||||
<input type="hidden" name="current_sbas_id" value="{{ sbas_id }}">
|
||||
<div class="row-fluid" style="min-height:60px; border-bottom: 1px solid #000">
|
||||
<div class="span4">
|
||||
<button type="button" class="btn btn-large btn-success"><i class="icon-hdd icon-white"></i> {% trans %}Save all changes{% endtrans %}</button>
|
||||
</div>
|
||||
<div class="span8">
|
||||
<div class="block-alert well-small"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row-fluid">
|
||||
<div class="left-block span4">
|
||||
|
||||
</div>
|
||||
<div class="right-block span8" style="border-left: 1px dashed #000">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="/assets/requirejs/require.js"></script>
|
||||
<script src="/scripts/apps/admin/fields/main.js"></script>
|
201
templates/web/admin/fields/templates.html.twig
Normal file
201
templates/web/admin/fields/templates.html.twig
Normal file
@@ -0,0 +1,201 @@
|
||||
<script type="text/template" id="alert_template">
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
<%= msg %>
|
||||
</script>
|
||||
|
||||
<script type="text/template" id="modal_delete_confirm_template">
|
||||
<div class="modal-body">
|
||||
<p><%= msg %></p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" data-dismiss="modal" class="btn cancel">{% trans %}Close{% endtrans %}</button>
|
||||
<button type="button" class="btn btn-primary confirm">{% trans %}Ok{% endtrans %}</button>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<script type="text/template" id="item_list_view_template">
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
|
||||
<div style="margin:20px 0">
|
||||
<button type="button" class="btn btn-success btn-add-field"><i class="icon-plus icon-white"></i>{% trans %}Add new field{% endtrans %}</button>
|
||||
</div>
|
||||
|
||||
<div style="margin:20px 0">
|
||||
<input class="input-block-level" type="text" id="live_search" placeholder="{% trans %}Live search{% endtrans %}"/>
|
||||
</div>
|
||||
|
||||
<div class="well well-small add-field-block" style="display:none">
|
||||
<h3>{% trans %}Add a new field{% endtrans %}</h3>
|
||||
<form class="form-horizontal">
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="inputLabel">{% trans %}Label{% endtrans %}</label>
|
||||
<div class="controls">
|
||||
<input type="text" id="new-name" class="input-block-level" placeholder="">
|
||||
<span class="help-block"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="inputSource">{% trans %}Source{% endtrans %}</label>
|
||||
<div class="controls">
|
||||
<input type="text" id="new-source" class="input-block-level" placeholder="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<label class="checkbox">
|
||||
<input id="new-multivalued" type="checkbox">{% trans %}Multivalued{% endtrans %}
|
||||
</label>
|
||||
<button type="button" class="btn btn-success btn-submit-field"><i class="icon-ok icon-white"></i>{% trans %}Add{% endtrans %}</button>
|
||||
<button type="button" class="btn btn-cancel-field">{% trans %}Cancel{% endtrans %}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<ul id="collection-fields" class="unstyled" style="height:450px;overflow: auto;">
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<script type="text/template" id="edit_template">
|
||||
<div style="padding: 5px 20px">
|
||||
<table>
|
||||
<tr style="height: 50px;">
|
||||
<td>{% trans %}Order{% endtrans %}:</td>
|
||||
<td><%= field.sorter %></td>
|
||||
<td><button type="button" class="btn btn-danger delete-field pull-right"><i class="icon-trash icon-white"></i>delete</button></td>
|
||||
</tr>
|
||||
<tr style="height: 60px;">
|
||||
<td colspan="2"><input id="name" style="font-size:28px;color:#0080FF;height:42px;line-height:42px; font-weight:bold" value="<%= field.name %>" class="input-block-level"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{% trans %}Source{% endtrans %} : </td>
|
||||
<td><input id="tag" type="text" val="<%= field.tag %>" class="input-block-level"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{% trans %}DCES{% endtrans %} : </td>
|
||||
<td class="dc-fields-subview"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" class="dces-help-block"></td>
|
||||
</tr>
|
||||
<% if(field.multi == true) { %>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<i class='icon-ok'></i> {% trans %}Multivalued{% endtrans %}
|
||||
</td>
|
||||
</tr>
|
||||
<% } %>
|
||||
</table>
|
||||
|
||||
<div class="edit-form">
|
||||
<h4 style="padding: 10px 0;">{% trans %}Advanced field parameter{% endtrans %}</h4>
|
||||
<table>
|
||||
<tr>
|
||||
<td><label for="">{% trans %}Thesaurus branch{% endtrans %}</label></td>
|
||||
<td><input id="tbranch" type="text" value="<%= field.tbranch %>"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="">{% trans %}Vocabulary type{% endtrans %}</label></td>
|
||||
<td>
|
||||
<select id="vocabulary-type" class="input-block-level">
|
||||
<% _.each(vocabularyTypes, function(vocab) { %>
|
||||
<option value="<%= vocab.type %>"><%= vocab.name %></option>
|
||||
<% }); %>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="">{% trans %}Type{% endtrans %}</label></td>
|
||||
<td>
|
||||
<select id="type" class="input-block-level">
|
||||
<option value=""></option>
|
||||
<option <%= field.type == 'string' ? 'selected' : '' %> value="string">string</option>
|
||||
<option <%= field.type == 'text' ? 'selected' : '' %> value="text">text</option>
|
||||
<option <%= field.type == 'number' ? 'selected' : '' %> value="number">number</option>
|
||||
<option <%= field.type == 'date' ? 'selected' : '' %> value="date">date</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"><label for="" class="checkbox"><input id="business" type="checkbox" <%= field.business ? "checked='checked'" : "" %> />{% trans %}Business Fields{% endtrans %}</label></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"><label for="" class="checkbox"><input id="vocabulary-restricted" type="checkbox" <%= field["vocavulary-restricted"] ? "checked='checked'" : "" %> />{% trans %}Limited vocabulary{% endtrans %}</label></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="">{% trans %}Separator{% endtrans %}</label></td>
|
||||
<td><input id="separator" type="text" value="<%= field.separator %>" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
<h4 style="padding: 10px 0;">{% trans %}display & action settings{% endtrans %}</h4>
|
||||
<table>
|
||||
<tr>
|
||||
<td colspan="2"><label for="" class="checkbox"><input id="required" type="checkbox" <%= field.required ? "checked='checked'" : "" %> />{% trans %}Mandatory{% endtrans %}</label></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"><label for="" class="checkbox"><input id="indexable" type="checkbox" <%= field.indexable ? "checked='checked'" : "" %> />{% trans %}Indexable{% endtrans %}</label></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"><label for="" class="checkbox"><input id="readonly" type="checkbox" <%= field.readonly ? "checked='checked'" : "" %> />{% trans %}Read only{% endtrans %}</label></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"><label for="" class="checkbox"><input id="report" type="checkbox" <%= field.report ? "checked='checked'" : "" %> />{% trans %}Report{% endtrans %}</label></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="">{% trans %}Display thumbnails{% endtrans %}</label></td>
|
||||
<td>
|
||||
<select id="thumbtitle" class="input-block-level">
|
||||
<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 == " r" ? "selected" : "" %> >{% trans 'Arabe' %}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
|
||||
<script type="text/template" id="list_row_template">
|
||||
<table style="table-layout:fixed;width:100%;">
|
||||
<tr>
|
||||
<td class="handle" style="width: 10%; vertical-align:middle;text-align:center;cursor: move;">
|
||||
<i class="icon-move"></i>
|
||||
</td>
|
||||
<td rowspan="2" class="trigger-click" style="padding:10px">
|
||||
<div class="field-name"><%= name %></div>
|
||||
<div class="field-tag"><%= tag %></div>
|
||||
</td>
|
||||
<td rowspan="2" class="trigger-click" style="width: 10%;padding:10px;">
|
||||
<i class="icon-chevron-right"></i>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="position" style="width: 10%; vertical-align:bottom;text-align: center">
|
||||
<%= position %>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</script>
|
||||
|
||||
<script type="text/template" id="dc_fields_template">
|
||||
<select id="dces-element" val="" class="input-block-level">
|
||||
<% _.each(dces_elements, function(el) { %>
|
||||
<option value="<%= el.label %>">DC:<%= el.label %></option>
|
||||
<% }); %>
|
||||
</select>
|
||||
<div class="help-block"></div>
|
||||
</script>
|
Reference in New Issue
Block a user