12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- {% extends "cranefly/profiles/profile.html" %}
- {% load i18n %}
- {% load humanize %}
- {% load url from future %}
- {% import "cranefly/macros.html" as macros with context %}
- {% block title %}{{ macros.page_title(_('Your News Feed')) }}{% endblock %}
- {% block content %}
- <div class="page-header">
- <h1>{% trans %}Your News Feed{% endtrans %}</h1>
- </div>
- {% if follows %}
- <p class="lead">{% trans count=follows|length -%}
- You are following one member, find out what he posted recently:
- {%- pluralize -%}
- You are following {{ count }} members, find out what they posted recently:
- {%- endtrans %}</p>
- {% if posts %}
- <ul class="unstyled shorts-list">
- {% for item in posts %}
- <li>
- <img src="{{ item.user.get_avatar(36) }}" class="avatar">
- <p class="message"><a href="{% url 'thread_find' thread=item.thread.pk, slug=item.thread.slug, post=item.pk %}">{{ item.post_preparsed|markdown_short(300) }}</a></p>
- <p class="location">{% if item.thread.start_post_id == item.pk -%}
- {% trans thread=thread(item), forum=forum(item.forum), user=username(item.user), date=item.date|reldate|low %}Thread {{ thread }} posted in {{ forum }} by {{ user }} {{ date }}{% endtrans %}
- {%- else -%}
- {% trans thread=thread(item), forum=forum(item.forum), user=username(item.user), date=item.date|reldate|low %}Reply to {{ thread }} posted in {{ forum }} by {{ user }} {{ date }}{% endtrans %}
- {%- endif %}</p>
- </li>
- {% endfor %}
- </ul>
- {% else %}
- <p class="lead">{% trans username=user.username %}{{ username }}, there is nothing to display in your news feed... yet!{% endtrans %}</p>
- {% endif %}
- {% else %}
- <p class="lead">{% trans username=user.username %}{{ username }}, you have to follow other users in order to fill your news feed.{% endtrans %}</p>
- {% endif %}
- {% endblock %}
- {% macro thread(item) -%}
- <a href="{% url 'thread_find' thread=item.thread.pk, slug=item.thread.slug, post=item.pk %}">{{ item.thread.name }}</a>
- {%- endmacro %}
- {% macro forum(forum) -%}
- <a href="{% url 'forum' forum=forum.pk, slug=forum.slug %}">{{ forum.name }}</a>
- {%- endmacro %}
- {% macro username(user) -%}
- <a href="{% url 'user' user=user.pk, username=user.username_slug %}">{{ user.username }}</a>
- {%- endmacro %}
|