diff --git a/colab/accounts/templates/accounts/user_search_preview.html b/colab/accounts/templates/accounts/user_search_preview.html deleted file mode 100644 index f84fc32..0000000 --- a/colab/accounts/templates/accounts/user_search_preview.html +++ /dev/null @@ -1,17 +0,0 @@ -{% load i18n tz highlight gravatar date_format %} - -
-
- - {% block gravatar_img %}{% gravatar result.email 100 %}{% endblock gravatar_img %} - -
-
- {{ result.name }}
- {% trans "Date joined" %}: {% date_format result.date_joined %}
- {% trans "Registred in" %}: {% trans "User" %}
-
-
-
-
-
\ No newline at end of file diff --git a/colab/accounts/templates/search/user_search_preview.html b/colab/accounts/templates/search/user_search_preview.html new file mode 100644 index 0000000..f84fc32 --- /dev/null +++ b/colab/accounts/templates/search/user_search_preview.html @@ -0,0 +1,17 @@ +{% load i18n tz highlight gravatar date_format %} + +
+
+ + {% block gravatar_img %}{% gravatar result.email 100 %}{% endblock gravatar_img %} + +
+
+ {{ result.name }}
+ {% trans "Date joined" %}: {% date_format result.date_joined %}
+ {% trans "Registred in" %}: {% trans "User" %}
+
+
+
+
+
\ No newline at end of file diff --git a/colab/search/templatetags/search_preview_templates.py b/colab/search/templatetags/search_preview_templates.py index d43c1c0..0c72484 100644 --- a/colab/search/templatetags/search_preview_templates.py +++ b/colab/search/templatetags/search_preview_templates.py @@ -7,13 +7,5 @@ register = template.Library() @register.assignment_tag def get_search_preview_templates(model_indexed): app_type = model_indexed.type - app_name = "" - if app_type in "user": - app_name = "accounts" - elif app_type in "thread": - app_name = "superarchives" - else: - app_name, app_type = app_type.split("_", 1) - - return "{}/{}_search_preview.html".format(app_name, app_type) + return "search/{}_search_preview.html".format(app_type) diff --git a/colab/super_archives/templates/search/thread_search_preview.html b/colab/super_archives/templates/search/thread_search_preview.html new file mode 100644 index 0000000..0c96e43 --- /dev/null +++ b/colab/super_archives/templates/search/thread_search_preview.html @@ -0,0 +1,11 @@ +{% load i18n tz highlight date_format %} + +
+ {% datetime_format result.modified %} - {{ result.modified_by }}
+

{{ result.title }}

+ {% with description as result.latest_description|truncatewords:"85" %} + {{description | default_if_none:"a"}}
+ {% endwith %} + {% trans "Registred in" %}: {% trans "Discussion" %} +
+
diff --git a/colab/super_archives/templates/superarchives/thread_search_preview.html b/colab/super_archives/templates/superarchives/thread_search_preview.html deleted file mode 100644 index 0c96e43..0000000 --- a/colab/super_archives/templates/superarchives/thread_search_preview.html +++ /dev/null @@ -1,11 +0,0 @@ -{% load i18n tz highlight date_format %} - -
- {% datetime_format result.modified %} - {{ result.modified_by }}
-

{{ result.title }}

- {% with description as result.latest_description|truncatewords:"85" %} - {{description | default_if_none:"a"}}
- {% endwith %} - {% trans "Registred in" %}: {% trans "Discussion" %} -
-
-- libgit2 0.21.2