ajout p_texts
This commit is contained in:
@@ -11,6 +11,10 @@
|
||||
<a href="${request.application_url}/rdf_causes_list"><span class="glyphicon glyphicon-tint logo-primary"></span></a>
|
||||
<h4>RDF : CAUSES</h4>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<a href="${request.application_url}/text_list"><span class="glyphicon glyphicon-list-alt logo-primary"></span></a>
|
||||
<h4>TEXTES EMAIL</h4>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="row text-center">
|
||||
|
||||
69
mondumas/templates/parametres/text_edit.pt
Normal file
69
mondumas/templates/parametres/text_edit.pt
Normal file
@@ -0,0 +1,69 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div class="alert alert-danger" tal:condition="message" tal:content="message" />
|
||||
|
||||
<div class="row">
|
||||
<form id="text_edit-form" action="${url}" method="post" class="form-horizontal">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="intitule">Intitulé</label>
|
||||
<div class="col-xs-8">
|
||||
<input class="form-control" type="text" id="intitule" name="intitule" value="${intitule}"
|
||||
placeholder="40 caractères maximum"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="L'intitule est obligatoire"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="40"
|
||||
data-fv-stringlength-message="40 caractères maximum" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="text-text">Texte</label>
|
||||
<div class="col-xs-8">
|
||||
<textarea class="form-control monospace-font" rows="15" cols="40" id="text-text" name="texte">${texte}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="theme">Thème</label>
|
||||
<div class="col-xs-4">
|
||||
<select class="form-control" id="theme" name="theme">
|
||||
<div tal:repeat="item themes">
|
||||
<option value="${item}" tal:attributes="selected theme==item and 'selected' or None">${item}</option>
|
||||
</div>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-8">
|
||||
<button class="btn btn-primary" type="submit" name="form.submitted">
|
||||
<span class="glyphicon glyphicon-ok"></span> Enregistrer</button>
|
||||
<a href="${request.application_url}/text_view/${text_id}" class="btn btn-default" role="button">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span> Annuler</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" tal:condition="text_id != '0'">
|
||||
<div class="col-sm-offset-2 col-sm-8">
|
||||
<button class="btn btn-warning" type="submit" name="form.deleted">
|
||||
<span class="glyphicon glyphicon-remove"></span> Supprimer</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<br />
|
||||
<br />
|
||||
</div> <!-- row -->
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#text_edit-form').formValidation();
|
||||
$('form input').on('keypress', function(e) {
|
||||
return e.which !== 13;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</metal:block>
|
||||
31
mondumas/templates/parametres/text_list.pt
Normal file
31
mondumas/templates/parametres/text_list.pt
Normal file
@@ -0,0 +1,31 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div class="row">
|
||||
<p>
|
||||
<a href="text_edit/0" class="btn btn-success" role="button">
|
||||
<span class="glyphicon glyphicon-plus"></span>
|
||||
Créer un nouveau texte</a>
|
||||
</p>
|
||||
<table class="table table-condensed table-striped table-bordered">
|
||||
<tr>
|
||||
<th>Intitulé</th>
|
||||
<th>Thème</th>
|
||||
<th>Dernière mise à jour</th>
|
||||
</tr>
|
||||
|
||||
<tr tal:repeat="ligne texts">
|
||||
<td><a href="text_view/${ligne.text_id}">${ligne.intitule}</a></td>
|
||||
<td>${ligne.theme}</td>
|
||||
<td><span tal:content="ligne.modif_le.strftime('%d/%m/%Y %H:%M')" /></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
</div>
|
||||
|
||||
</metal:block>
|
||||
|
||||
18
mondumas/templates/parametres/text_view.pt
Normal file
18
mondumas/templates/parametres/text_view.pt
Normal file
@@ -0,0 +1,18 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<br />
|
||||
<a href="${request.application_url}/text_list" class="btn btn-default" role="button">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span> Fermer</a>
|
||||
<a href="${request.application_url}/text_edit/${text_id}" class="btn btn-primary" role="button">
|
||||
<span class="glyphicon glyphicon-pencil"></span> Modifier</a>
|
||||
<br />
|
||||
<hr>
|
||||
<div tal:replace="structure texte">Page text goes here.</div>
|
||||
<hr>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
|
||||
</div>
|
||||
</metal:block>
|
||||
Reference in New Issue
Block a user