{% if not object %}{% trans "New Resource" %}{% els
-
- {% if descriptor_list %}
- {% for descriptor in descriptor_list %}
+ {% if user_can_edit %}
+ {{ formset_descriptor.management_form }}
+
+ {% for form in formset_descriptor %}
+
+ {% for hidden in form.hidden_fields %}
+ {{ hidden }}
+ {% endfor %}
+ {% for field in form.visible_fields %}
+ {% if field.name == 'status' %}
+
+ {% elif field.name == 'code' %}
+ {{ field.as_hidden }}
+ {% elif field.name == 'text' %}
+
+ {{ field.as_hidden }}
+
+ {% spaceless %}
+ {% if field.value == None or field.value == '' %}
+ {% trans "Select by search" %}
+ {% else %}
+ {{ field.value}}
+ {% endif %}
+ {% endspaceless %}
+
+
+ {% elif field.name != 'DELETE' %}
+
+ {{ field }}
+ {{ field.errors }}
+
+ {% endif %}
+ {% endfor %}
+
+ {% if form.instance.pk %}{{ form.DELETE }}{% endif %}
+
+
+ {% endfor %}
+ {% else %}
+ {% for form in formset_descriptor %}
-
{{ descriptor.text }}
+ {% if form.instance.id %}
+ {% for field in form %}
+ {% if field.name == 'text' or field.name == 'primary' %}
+
+ {{field.value}}
+
+ {% endif %}
+ {% endfor %}
+ {% endif %}
{% endfor %}
{% endif %}
-
- {{ formset_descriptor.management_form }}
-
- {% for form in formset_descriptor %}
-
- {% for hidden in form.hidden_fields %}
- {{ hidden }}
- {% endfor %}
- {% for field in form.visible_fields %}
- {% if field.name == 'status' %}
-
- {% elif field.name == 'code' %}
- {{ field.as_hidden }}
- {% elif field.name == 'text' %}
-
- {{ field.as_hidden }}
-
- {% spaceless %}
- {% if field.value == None or field.value == '' %}
- {% trans "Select by search" %}
- {% else %}
- {{ field.value}}
- {% endif %}
- {% endspaceless %}
-
-
- {% elif field.name != 'DELETE' %}
-
- {{ field }}
- {{ field.errors }}
-
- {% endif %}
- {% endfor %}
-
- {% if form.instance.pk %}{{ form.DELETE }}{% endif %}
-
-
- {% endfor %}
@@ -208,39 +219,47 @@
{% if not object %}{% trans "New Resource" %}{% els
{% trans "Thematic area" %}
-
{% trans "Delete?" %}
+ {% if user_can_edit %}
+
{% trans "Delete?" %}
+ {% endif %}
- {% if thematic_list %}
- {% for thematic in thematic_list %}
-
-
{{ thematic }}
-
- {% endfor %}
- {% endif %}
-
- {{ formset_thematic.management_form }}
+ {% if user_can_edit %}
+ {{ formset_thematic.management_form }}
- {% for form in formset_thematic %}
- {% for hidden in form.hidden_fields %}
- {{ hidden }}
+ {% for form in formset_thematic %}
+ {% for hidden in form.hidden_fields %}
+ {{ hidden }}
+ {% endfor %}
+
+ {% for field in form.visible_fields %}
+ {% if role == 'doc' and field.name == 'status' %}
+
+ {% elif field.name != 'DELETE' %}
+
+ {{ field }}
+ {{ field.errors }}
+
+ {% endif %}
+ {% endfor %}
+
+ {% if form.instance.pk %}{{ form.DELETE }}{% endif %}
+
+
{% endfor %}
-
- {% for field in form.visible_fields %}
- {% if role == 'doc' and field.name == 'status' %}
-
- {% elif field.name != 'DELETE' %}
+ {% else %}
+ {% for form in formset_thematic %}
+
+ {% for field in form %}
+ {% if field.name == 'thematic_area' %}