summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ishtar_common/models.py14
-rw-r--r--ishtar_common/templates/blocks/bs_field_snippet.html2
-rw-r--r--scss/custom.scss5
3 files changed, 18 insertions, 3 deletions
diff --git a/ishtar_common/models.py b/ishtar_common/models.py
index 7798c722d..923d0bb31 100644
--- a/ishtar_common/models.py
+++ b/ishtar_common/models.py
@@ -516,8 +516,18 @@ class GeneralType(Cached, models.Model):
help_items = u"\n"
for item in cls.get_types(dct=dct, instances=True, exclude=exclude):
if hasattr(item, '__iter__'):
- # TODO: manage multiple levels
- continue
+ pk = item[0]
+ item = cls.objects.get(pk=pk)
+ item.rank = c_rank + 1
+ if hasattr(item, 'parent'):
+ c_item = item
+ parents = []
+ while c_item.parent:
+ parents.append(c_item.parent.label)
+ c_item = c_item.parent
+ parents.reverse()
+ parents.append(item.label)
+ item.label = u" / ".join(parents)
if not item.comment:
continue
if c_rank > item.rank:
diff --git a/ishtar_common/templates/blocks/bs_field_snippet.html b/ishtar_common/templates/blocks/bs_field_snippet.html
index f9cdeb68e..549550cef 100644
--- a/ishtar_common/templates/blocks/bs_field_snippet.html
+++ b/ishtar_common/templates/blocks/bs_field_snippet.html
@@ -18,7 +18,7 @@
</div>{% endif %}
</div>
<div class="collapse" id="{{field.auto_id}}_help">
- <div class="card card-body">
+ <div class="card card-body help-text">
{{field.help_text}}
</div>
</div>
diff --git a/scss/custom.scss b/scss/custom.scss
index 37cdaff26..469fa853a 100644
--- a/scss/custom.scss
+++ b/scss/custom.scss
@@ -299,6 +299,11 @@ div#foot a:hover {
list-style: none;
}
+.help-text{
+ max-height: 250px;
+ overflow: auto;
+}
+
/* ui-autocomplete - start */