diff --git a/colab/accounts/templates/accounts/user_search_preview.html b/colab/accounts/templates/accounts/user_search_preview.html new file mode 100644 index 0000000..de4d161 --- /dev/null +++ b/colab/accounts/templates/accounts/user_search_preview.html @@ -0,0 +1,7 @@ +{% load i18n tz highlight gravatar %} + +
{% gravatar user.email 50 %} {{ user.name }} +Data joined: {{ user.date_joined }} +Registred in: link
+
+ diff --git a/colab/super_archives/templates/message-preview.html b/colab/super_archives/templates/message-preview.html index feba65e..b46860b 100644 --- a/colab/super_archives/templates/message-preview.html +++ b/colab/super_archives/templates/message-preview.html @@ -1,69 +1,18 @@ {% load i18n tz highlight %} -
  • - - -{% if result.tag %} - - {{ result.tag }} - +{% if result.type in "user" %} + {% include "accounts/user_search_preview.html" with user=result %} {% endif %} -{% if result.title %} - - - - {% if query %} - {% highlight result.title with query max_length "1000" %} - {% else %} - {{ result.title }} - {% endif %} - - -{% endif %} +{% if result.type in "thread" %} + {% include "superarchives/thread_search_preview.html" with thread=result %} +{% endif%} -{% if result.description %} - - - {% if query %} - {% highlight result.description with query max_length "150" %} - {% else %} - {% if result.latest_description %} - {{ result.latest_description|striptags|escape|truncatechars:150 }} - {% elif result.description %} - {{ result.description|striptags|escape|truncatechars:150 }} - {% endif %} - {% endif %} - -{% endif %} +{% if result.type in "noosfero_community"%} + {% include "noosfero/community_search_preview.html" with community=result %} +{% endif%} -{% if result.fullname or result.modified or result.modified_by %} -
    - {% if result.modified_by %} - {% trans "by" %} - {% if result.modified_by_url %} - - {% else %} - - {% endif %} +{% if result.type in "noosfero_article"%} + {% include "noosfero/article_search_preview.html" with article=result %} +{% endif%} - {% if query %} - {% highlight result.modified_by with query %} - {% else %} - {{ result.modified_by }} - {% endif %} - - {% if result.modified_by_url %} - - {% else %} - - {% endif %} - - {% else %} - {% trans "by" %} {% trans "Anonymous" %} - {% endif %} - {% if result.modified %} - {{ result.modified|localtime|timesince }} {% trans "ago" %} - {% endif %} -
    -{% endif %} -
  • diff --git a/colab/super_archives/templates/superarchives/thread_search_preview.html b/colab/super_archives/templates/superarchives/thread_search_preview.html new file mode 100644 index 0000000..62a7cb7 --- /dev/null +++ b/colab/super_archives/templates/superarchives/thread_search_preview.html @@ -0,0 +1,9 @@ +{% load i18n tz highlight %} + +
    +

    {{ thread.title }}

    +{{ thread.latest_description }} +
    +{{ thread.modified_by }} - {{ thread.modified |date:"d \d\e F \d\e Y" }} +
    +
    -- libgit2 0.21.2