In the edit screen documentCode should have a lang field.
authorymh <ymh.work@gmail.com>
Tue, 08 Oct 2013 17:25:39 +0200
changeset 144 8c32ea1310de
parent 143 b74f0e14d50f
child 145 7c6fe1dab213
In the edit screen documentCode should have a lang field. correct bug #3 (https://github.com/IRI-Research/plan4learning/issues/3)
doc/evolution.rst
src/p4l/static/p4l/templates/documentCodeForm.html
src/p4l/templates/p4l/record_update_form.html
--- a/doc/evolution.rst	Tue Oct 08 09:54:44 2013 +0200
+++ b/doc/evolution.rst	Tue Oct 08 17:25:39 2013 +0200
@@ -284,4 +284,6 @@
 Pour les template ``form-template``, l'objet édité est dans la variable ``editedObj``.
 Pour les template ``disp-template``, l'objet édité est dans la variable ``obj``. 
 Les templates existant donneront des exemples d'utilisation et pourront servir de base pour l'ajout d'un nouveau champ.
+Attention, ce sont des ressources statiques pour l'application.
+Si ils sont modifiés, la commande ``collectstatic`` doit être lancée afin qu'ils soient correctement déployés et pris en compte par Angular.
 
--- a/src/p4l/static/p4l/templates/documentCodeForm.html	Tue Oct 08 09:54:44 2013 +0200
+++ b/src/p4l/static/p4l/templates/documentCodeForm.html	Tue Oct 08 17:25:39 2013 +0200
@@ -3,4 +3,8 @@
     <label for="document-code-{{$id}}">{{'document code'|translate}}</label>
      <input type="text" placeholder="{{'document code'|translate}}" ng_model="editedObj.documentCode" id="document-code-{{$id}}" class="form-control"/>
   </div>
+  <div class="form-group">
+    <label for="lang-{{$id}}">{{'lang'|translate}}</label>
+    <languages-list-input obj="editedObj.lang"></languages-list-input>
+  </div>
 </form>
\ No newline at end of file
--- a/src/p4l/templates/p4l/record_update_form.html	Tue Oct 08 09:54:44 2013 +0200
+++ b/src/p4l/templates/p4l/record_update_form.html	Tue Oct 08 17:25:39 2013 +0200
@@ -107,7 +107,7 @@
     <tr>
       <td>{{ 'document code' | translate }}</td>
       <td><object-list form-template="documentCodeForm" disp-template="" object-list="record.documentCodes" 
-                       object-fields='["documentCode"]' table="true" size-fields='[9]' label-fields='["Document code"]'></object-list></td>
+                       object-fields='["documentCode", "lang"]' table="true" size-fields='[7, 2]' label-fields='["Document code", "Language"]'></object-list></td>
     </tr>
     <tr>
       <td>{{ 'language' | translate }}</td>