CSS
15 Nov 2009 HTML Text
 
 
 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
43
44
45
46
                {# DO NOT COPY THAT TO OTHER PLACES #}
                {# THAT BLOCK SHOULD BE MOVED IN SEPARATE TEMPLATE #}

                {# If connection exists then display it status #}
                {% if item.connection %}
                    {% ifequal item.connection.status Connection.STATUS_NEW %}
                        {% ifequal item.connection.originator Connection.SIDE_FROM %}
                        <a href="{% url connection-manage 'approve' item.connection.pk %}">Approve</a><br/>
                        <a href="{% url connection-manage 'exclude' item.connection.pk %}">Exclude</a><br/>
                        {% else %}
                        Pending
                        {% endifequal %}
                    {% endifequal %}
                    {% ifequal item.connection.status Connection.STATUS_APPROVED %}
                    Approved
                    {% endifequal %}
                    {% ifequal item.connection.status Connection.STATUS_EXCLUDED %}
                    Excluded
                    {% endifequal %}

                {# If connection does not exist then display then display link #}
                {# to create connection if site has owner else #}
                {# display link to invite site owner #}
                {% else %}
                    {% if item.src_site.payee %}
					<a href="{% url connections_create "in" item.src_site.pk %}">Request connection</a>
                    {% else %}
					<a href="{% url owner_invite request.website.pk item.src_site.pk "owner_incoming" %}?connection=1">Invite and connect</a>
                    {% endif %}
                {% endif %}
            </td>
            <td>
                Reward (todo)
                {% comment %}
                {% ifequal item.connection.status Connection.STATUS_APPROVED %}
                    <a href="{% url connection-manage 'reward' item.connection.pk %}">Reward</a>
                {% endifequal %}
                {% endcomment %}

                <div class="popmenu">
                    <img class="trigger" src="{{ MEDIA_URL }}images/asc.gif">

                    <div class="popup">
                        <a href="{% url messages_compose %}{% for u in item.src_site.owner.all %}{{ u.username}}/{% endfor %}">Send message</a><br/>
                    </div>
                </div>