Commit 6509f5e9844d01af05f9ea7505ed853147414d4f

Authored by Matheus Fernandes
Committed by Luiz Oliveira
1 parent 1c574f9f

Moving templates directory structure

Signed-off-by: Matheus Fernandes <matheus.souza.fernandes@gmail.com>
Signed-off-by: Lucas Kanashiro <kanashiro.duarte@gmail.com>
colab/accounts/templates/accounts/user_search_preview.html
... ... @@ -1,17 +0,0 @@
1   -{% load i18n tz highlight gravatar date_format %}
2   -
3   -<div class="row">
4   - <div class="col-md-2 center">
5   - <a href="{% url 'user_profile' username=result.username %}">
6   - {% block gravatar_img %}{% gravatar result.email 100 %}{% endblock gravatar_img %}
7   - </a>
8   - </div>
9   - <div class="col-md-10">
10   - <strong><a href="{% url 'user_profile' username=result.username %}">{{ result.name }}</a></strong><br>
11   - <strong>{% trans "Date joined" %}: {% date_format result.date_joined %}</strong><br>
12   - {% trans "Registred in" %}: <strong>{% trans "User" %}</strong><br>
13   - </div>
14   -</div>
15   -<div class="row">
16   - <hr>
17   -</div>
18 0 \ No newline at end of file
colab/accounts/templates/search/user_search_preview.html 0 → 100644
... ... @@ -0,0 +1,17 @@
  1 +{% load i18n tz highlight gravatar date_format %}
  2 +
  3 +<div class="row">
  4 + <div class="col-md-2 center">
  5 + <a href="{% url 'user_profile' username=result.username %}">
  6 + {% block gravatar_img %}{% gravatar result.email 100 %}{% endblock gravatar_img %}
  7 + </a>
  8 + </div>
  9 + <div class="col-md-10">
  10 + <strong><a href="{% url 'user_profile' username=result.username %}">{{ result.name }}</a></strong><br>
  11 + <strong>{% trans "Date joined" %}: {% date_format result.date_joined %}</strong><br>
  12 + {% trans "Registred in" %}: <strong>{% trans "User" %}</strong><br>
  13 + </div>
  14 +</div>
  15 +<div class="row">
  16 + <hr>
  17 +</div>
0 18 \ No newline at end of file
... ...
colab/search/templatetags/search_preview_templates.py
... ... @@ -7,13 +7,5 @@ register = template.Library()
7 7 @register.assignment_tag
8 8 def get_search_preview_templates(model_indexed):
9 9 app_type = model_indexed.type
10   - app_name = ""
11 10  
12   - if app_type in "user":
13   - app_name = "accounts"
14   - elif app_type in "thread":
15   - app_name = "superarchives"
16   - else:
17   - app_name, app_type = app_type.split("_", 1)
18   -
19   - return "{}/{}_search_preview.html".format(app_name, app_type)
  11 + return "search/{}_search_preview.html".format(app_type)
... ...
colab/super_archives/templates/search/thread_search_preview.html 0 → 100644
... ... @@ -0,0 +1,11 @@
  1 +{% load i18n tz highlight date_format %}
  2 +
  3 +<div class="row">
  4 + {% datetime_format result.modified %} - <a href="{{result.modified_by_url}}">{{ result.modified_by }}</a><br>
  5 + <h4><a href="{{result.url}}">{{ result.title }}</a></h4>
  6 + {% with description as result.latest_description|truncatewords:"85" %}
  7 + {{description | default_if_none:"a"}}<br>
  8 + {% endwith %}
  9 + {% trans "Registred in" %}: <strong>{% trans "Discussion" %}</strong>
  10 + <hr>
  11 +</div>
... ...
colab/super_archives/templates/superarchives/thread_search_preview.html
... ... @@ -1,11 +0,0 @@
1   -{% load i18n tz highlight date_format %}
2   -
3   -<div class="row">
4   - {% datetime_format result.modified %} - <a href="{{result.modified_by_url}}">{{ result.modified_by }}</a><br>
5   - <h4><a href="{{result.url}}">{{ result.title }}</a></h4>
6   - {% with description as result.latest_description|truncatewords:"85" %}
7   - {{description | default_if_none:"a"}}<br>
8   - {% endwith %}
9   - {% trans "Registred in" %}: <strong>{% trans "Discussion" %}</strong>
10   - <hr>
11   -</div>