~widelands-dev/widelands-website/trunk

« back to all changes in this revision

Viewing changes to templates/left_boxes.html

  • Committer: Holger Rapp
  • Date: 2009-02-25 16:55:36 UTC
  • Revision ID: sirver@kallisto.local-20090225165536-3abfhjx8qsgtzyru
- Added my hacked version of pybb. Remerging new versions is very difficult at this point :(

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
 
4
4
 This file is included by mainpage and contains all the left menu boxes
5
5
 on the site
 
6
 
6
7
{% endcomment %}
7
 
{% load inbox %}
8
 
{% load i18n %}
9
 
{% load wlprofile wlpoll wlevents%}
10
 
{% load pybb_extras secure_login %}
11
 
 
12
 
      <!-- Search Box -->
13
 
      <h3 class="box_title">Search</h3>
14
 
      <div class="box_content" align="center">
15
 
         <form method="post" action="/search/">
16
 
            <input id="id_search" type="text" name="search" maxlength="200" />
17
 
            <input id="id_incl_wiki" type="hidden" name="incl_wiki" value="1" />
18
 
            <input id="id_incl_news" type="hidden" name="incl_news" value="1" />
19
 
            <input id="id_incl_maps" type="hidden" name="incl_maps" value="1" />
20
 
            <input id="id_incl_help" type="hidden" name="incl_help" value="1" />
21
 
            <input id="id_incl_forum" type="hidden" name="incl_forum" value="1" />
22
 
         {% csrf_token %}
23
 
         </form>
24
 
      </div>
25
 
 
26
 
        <!-- Donation Box -->
27
 
 
 
8
         <!-- Donation Box -->
28
9
         <h3 class="box_title">Donation</h3>
29
10
         <div class="box_content" align="center">
30
 
            Help us to pay our Server!<br/>(: Consider a donation :) <br/><br/>
31
 
         <div>
32
 
            <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
33
 
            <input type="hidden" name="cmd" value="_s-xclick" />
34
 
            <input type="hidden" name="lc" value="GB">
35
 
            <input type="hidden" name="hosted_button_id" value="JH5R7YHSVRMRG" />
36
 
            <input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donate_SM.gif" name="submit" alt="PayPal - The safer, easier way to pay online!" />
37
 
            <img alt="" src="https://www.paypal.com/de_DE/i/scr/pixel.gif" width="1" height="1" />
38
 
            </form>
39
 
         </div>
 
11
            Help us to pay our Server!<br/>(: Consider a donation :) <br/>
 
12
            <a href="http://sourceforge.net/donate/index.php?group_id=40163">
 
13
               <img src="http://images.sourceforge.net/images/project-support.jpg"
 
14
               align="center" alt="Donation pic" border="0" vspace=5 /> 
 
15
            </a>
 
16
            <br/>
 
17
            <a href="http://sourceforge.net/project/project_donations.php?group_id=40163">Donators</a>
40
18
         </div>
41
19
 
42
 
         <!-- Login Block / User informations -->
43
 
         {% if user.is_authenticated %}
44
 
         <h3 class="box_title">Account</h3>
45
 
         <div class="box_content"> 
46
 
            <p align="center">
47
 
            Welcome <b>{{ user|user_link }}</b>,<br />
48
 
            you've <a href="{% url messages_inbox %}">{% inbox_count %}</a> new messages
49
 
            </p>
50
 
            <ul>
51
 
                <li>
52
 
                    <a href="{% url profile_edit %}">Edit Profile</a>
53
 
                </li>
54
 
                <li>
55
 
                    <a href="{% url notification_notices %} ">Notifications</a>
56
 
                </li>
57
 
                <li>
58
 
                    <a href="/accounts/logout/next={{ request.path }}">Logout</a>
59
 
                </li>
 
20
         <!-- Navigation Box -->
 
21
         <h3 class="box_title">Main Menu</h3>
 
22
         <div class="box_content">
 
23
            <ul id="mainmenu">
 
24
               <li><a class="menuMain" href="/">Home</a></li>
 
25
               <li><a class="menuMain" href="{% url news_index %}">News</a> </li>
 
26
                  {% comment %}
 
27
                  <a class="menuMain" href="http://xoops.widelands.org/modules/wfdownloads/">Downloads</a>
 
28
                     <li class="sub"><a href="t=hit">Popular</a></li>
 
29
                     <li class="sub"><a href="rate">Top Rated</a></li>
 
30
                  <a class="menuMain" href="http://xoops.widelands.org/modules/smartfaq/">FAQ</a>
 
31
                  <a class="menuMain" href="http://xoops.widelands.org/modules/xcgal/">Screenshots</a>
 
32
                  {% endcomment %}
 
33
            <li><a class="menuMain" href="{% url wiki_index %}">Wiki (Help & Docu.)</a></li>
 
34
            <li><a class="menuMain" href="{% url pybb_index %}">Forum</a></li>
 
35
                  {% comment %}
 
36
                  <a class="menuMain" href="http://xoops.widelands.org/modules/xpjirc/">IRC Chat</a>
 
37
                  <a class="menuMain" href="http://xoops.widelands.org/modules/Contentview/">SVN-View</a>
 
38
                  <a class="menuMain" href="http://xoops.widelands.org/modules/Tracker/">Bug-Tracker & Feature Requests</a>
 
39
                  <a class="menuMain" href="http://xoops.widelands.org/modules/poll/">Polls</a>
 
40
                  {% endcomment %}
60
41
            </ul>
61
42
         </div>
62
 
         {% else %}
63
 
         <h3 class="box_title">Login</h3>
64
 
         <div class="box_content"> 
65
 
         <center>
66
 
            <a href="/accounts/login/?next={{ request.path }}">Click here to login</a><br/><br/>
67
 
            <a href="/accounts/password/reset/">Lost password?</a><br/>
68
 
            <a href="/accounts/register">Register now!</a><br/>
69
 
         </center>
70
 
         </div>
71
 
         {% endif %}
72
 
         <!-- Current polls if any -->
73
 
         {% get_open_polls as polls %}
74
 
         {% if polls %}
75
 
         <center>
76
 
            <h3 class="box_title">Polls</h3>
77
 
            <div class="box_content" align="center">
78
 
            {% for p in polls %}
79
 
            <div class="sub_content">
80
 
               <h4>{{p.name}}</h4>
81
 
            {% if not user.is_anonymous %}
82
 
               {% if p.user_has_voted %}
83
 
                  <p>You already voted on this!</p>
84
 
               {% else %}
85
 
               <form method="post" action="{% url wlpoll_vote p.id %}">
86
 
                  <table class="poll_vote">
87
 
                     {% for c in p.choices.all %}
88
 
                     <tr>
89
 
                        <td><input type="radio" name="choice_id" value="{{ c.id }}" /></td>
90
 
                        <td>{{ c.choice }}</td>
91
 
                     </tr>
92
 
                     {% endfor %}
93
 
                  </table>
94
 
                     <input type="submit" value="Vote" />
95
 
                     {% csrf_token %}
96
 
               </form>
97
 
               {% endif %}
98
 
            {% else %}
99
 
               <p>Log in to vote!</p>
100
 
            {% endif %}
101
 
               <input type="button" value="Results" onclick="location='{% url wlpoll_detail p.id %}'" />
102
 
            </div>
103
 
            {% endfor %}
104
 
            <a href="{% url wlpoll_archive %}">Archive</a>
105
 
            </div>
106
 
         </center>
107
 
         {% endif %}
108
 
 
109
 
         <!-- Future Events if any -->
110
 
         {% get_future_events as events %}
111
 
         {% if events.count %}
112
 
         <h3 class="box_title">Important Dates</h3>
113
 
         <div class="box_content" align="center">
114
 
         {% for e in events %}
115
 
            <div class="event">
116
 
               <a href="{{e.link}}" class="link">{{e.name}}</a><br />
117
 
               <div class="date">
118
 
               {{e.start_date|date:"d M"}}
119
 
               {% ifnotequal e.start_date e.end_date %}
120
 
                  - {{e.end_date|date:"d M"}}
121
 
               {% endifnotequal %}
122
 
               </div>
123
 
            </div>
124
 
         {% endfor %}
125
 
         </div>
126
 
         {% endif %}
127
 
 
128
 
         <!-- Logged in users -->
129
 
         {%load online_users %}
130
 
         {% online_users 10 %}
131
 
         <h3 class="box_title">Most recently posted</h3>
132
 
         <div class="box_content">
133
 
         {% pybb_last_posts %}
134
 
         </div>
135