Explorar el Código

Still interface

prieto hace 8 años
padre
commit
bb1b48a964

+ 1
- 1
lodel/leapi/lefactory.py Ver fichero

@@ -134,7 +134,7 @@ def generate_classes(model):
134 134
         # Determine parent for inheritance
135 135
         if len(em_class.parents) > 0:
136 136
             for parent in em_class.parents:
137
-               parents.append(LeObject.name2objname(parent.uid))
137
+                parents.append(LeObject.name2objname(parent.uid))
138 138
         else:
139 139
             parents.append('LeObject')
140 140
         datasource_name = em_class.datasource

+ 1
- 1
lodel/plugins/webui/interface/controllers/base.py Ver fichero

@@ -28,7 +28,7 @@ def get_component_html(type='text', params={}):
28 28
     return template_loader.render_to_html(template_file='components/components.html', template_vars=params)
29 29
 
30 30
 def index(request):
31
-    return get_response('index/index.html')
31
+    return get_response('listing/collections')
32 32
 
33 33
 
34 34
 def not_found(request):

+ 32
- 4
lodel/plugins/webui/templates/listing/issue.html Ver fichero

@@ -24,12 +24,12 @@
24 24
               <h4>{{ text.data('subtitle') }}</h4>
25 25
               {% set authors = my_classes.Person.get(("%s in (%s)") % (person_class.uid_fieldname()[0], text.data('linked_persons')|join(','))) %}
26 26
               <p>Authors : {% for author in authors %} {{ author.data('firstname')}} {{ author.data('lastname')}} ; {% endfor %} </p>
27
-              <div style="margin-left:20px; text-align:justify">{{ text.data('text') }}</div>
28 27
             </li>
29 28
     {% endfor %}
30 29
 </ul>
31 30
 {% endif %}
32
-
31
+<h2>Parties</h2>
32
+<div style="margin-left:20px;">
33 33
 {% if parts is not none: %}
34 34
 <ul>
35 35
      {% for part in parts %}
@@ -40,20 +40,48 @@
40 40
               <p>Directors : {% for director in directors %} {{ director.data('firstname')}} {{ director.data('lastname')}} ; {% endfor %} </p>
41 41
               {% set p_texts=my_classes.Text.get(("%s in (%s)") % (my_classes.Text.uid_fieldname()[0], part.data('linked_texts')|join(','))) %}
42 42
               {% if texts is not none: %}
43
+              <ul style="margin-left:20px">
43 44
                  {% for text in p_texts %}
44 45
                       <li>
45 46
                           <h3><a href="/{{ root_url }}/show_object?classname={{ text.data('classname') }}&lodel_id={{ text.uid() }}"  target="_blank"> {{ text.data('title') }}</a></h3>
46 47
                           <h4>{{ text.data('subtitle') }}</h4>
47 48
                           {% set authors = my_classes.Person.get(("%s in (%s)") % (person_class.uid_fieldname()[0], text.data('linked_persons')|join(','))) %}
48 49
                           <p>Authors : {% for author in authors %} {{ author.data('firstname')}} {{ author.data('lastname')}} ; {% endfor %} </p>
49
-                          <div style="margin-left:20px; text-align:justify">{{ text.data('text') }}</div>
50 50
                         </li>
51 51
                 {% endfor %}
52
+              </ul>
53
+              {% endif %}
54
+              <h4>Sous-parties</h4>
55
+              {% set ss_parts=my_classes.Part.get(("%s in (%s)") % (my_classes.Part.uid_fieldname()[0], part.data('linked_parts')|join(','))) %}
56
+               {% if parts is not none: %}
57
+                <ul>
58
+                     {% for part in ss_parts %}
59
+                          <li>
60
+                              <h3><a href="/{{ root_url }}/show_object?classname{{ part.data('classname') }}=&lodel_id={{ part.uid() }}" target="_blank"> {{ part.data('title') }}</a></h3>
61
+                              <h4>{{ part.data('subtitle') }}</h4>
62
+                              {% set directors = my_classes.Person.get(("%s in (%s)") % (person_class.uid_fieldname()[0], part.data('linked_directors')|join(','))) %}
63
+                              <p>Directors : {% for director in directors %} {{ director.data('firstname')}} {{ director.data('lastname')}} ; {% endfor %} </p>
64
+                              {% set sp_texts=my_classes.Text.get(("%s in (%s)") % (my_classes.Text.uid_fieldname()[0], part.data('linked_texts')|join(','))) %}
65
+                              {% if texts is not none: %}
66
+                              <ul style="margin-left:20px">
67
+                                 {% for text in sp_texts %}
68
+                                      <li>
69
+                                          <h3><a href="/{{ root_url }}/show_object?classname={{ text.data('classname') }}&lodel_id={{ text.uid() }}"  target="_blank"> {{ text.data('title') }}</a></h3>
70
+                                          <h4>{{ text.data('subtitle') }}</h4>
71
+                                          {% set authors = my_classes.Person.get(("%s in (%s)") % (person_class.uid_fieldname()[0], text.data('linked_persons')|join(','))) %}
72
+                                          <p>Authors : {% for author in authors %} {{ author.data('firstname')}} {{ author.data('lastname')}} ; {% endfor %} </p>
73
+                                        </li>
74
+                                {% endfor %}
75
+                              </ul>
76
+                              {% endif %}
77
+                    </li>
78
+                    {% endfor %}
79
+              </ul>
52 80
               {% endif %}
53 81
           </li>
54 82
     {% endfor %}
55 83
 </ul>
56 84
 {% endif %}
57
-
85
+</div>
58 86
 
59 87
 {% endblock %} 

Loading…
Cancelar
Guardar