summaryrefslogtreecommitdiffstats
path: root/askbot/skins/default/templates/user_profile/user_recent.html
blob: cbd592025d80fb2886271eac981ecd5871fbacc7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
{% extends "user_profile/user.html" %}
<!-- user_recent.html -->
{% block profilesection %}
    {% trans %}activity{% endtrans %}
{% endblock %}
{% block usercontent %}
        <div style="padding-top:5px;font-size:13px;">
        {% for act in activities %}
            <div style="clear:both;line-height:20px" >
                <div style="width:180px;float:left">{{ act.time|diff_date(True) }}</div>
                <div style="width:150px;float:left">
                <span class="user-action-{{ act.type_id }}">{{ act.type }}</span>
                </div>
                <div style="float:left;overflow:hidden;">
                    {% if act.is_badge %}
                    <a href="{{act.badge.get_absolute_url()}}" title="{{ act.badge.get_type_display() }} : {% trans description=act.badge.description %}{{description}}{% endtrans %}" class="medal"><span class="{{ act.badge.css_class }}">&#9679;</span>&nbsp;{% trans name=act.badge.name %}{{name}}{% endtrans %}</a>
                        {% if act.related_object_type == 'question' %}{# question #}
                            {% for question in questions %}{# could also create a new dict #}
                                {% if question.question_id == act.obj %}
                                    (<a title="{{question.summary|collapse}}" 
                                      href="{% url question question.question_id %}{{question.title|slugify}}">{% trans %}source{% endtrans %}</a>)
                                {% endif %}   
                            {% endfor %}   
                        {% elif act.related_object_type == 'answer' %}{# answer #}
                            {% for answer in answers %}{# could also create a new dict #}
                                {% if answer.answer_id == act.obj %}
                                        (<a title="{{answer.text|collapse}}" 
                                            href="{% url question answer.question_id %}{{answer.question_title|slugify}}#{{answer.answer_id}}">{% trans %}source{% endtrans %}</a>)
                                {% endif %}   
                            {% endfor %}
                        {% endif %} 
                    {% else %}
                    <span class="post-type-{{ act.type_id }}"><a href="{{ act.title_link }}">{{ act.title|escape }}</a></span>
                    {% if act.summary %}<span class="revision-summary">{{ act.summary|escape }}</span>{% endif %}
                    {% endif %}
                    <div style="height:5px"></div>
                </div>
            </div>
        {% endfor %}
        </div>
{% endblock %}
<!-- end user_recent.html -->