add Flattr and auto-flattr support
[mygpo.git] / mygpo / web / templates / dashboard.html
blobe05be2639a4e81a22a63d6336c75ae491b4f8d46
1 {% extends "base.html" %}
2 {% load url from future %}
3 {% load i18n %}
4 {% load devices %}
5 {% load episodes %}
6 {% load podcasts %}
7 {% load humanize %}
8 {% load cache %}
9 {% load utils %}
11 {% load menu %}
12 {% block mainmenu %}{{ "/"|main_menu }}{% endblock %}
13 {% block sectionmenu %}{{ "/"|section_menu }}{% endblock %}
15 {% block title %}{% trans "Overview" %}{% endblock %}
17 {% block header %}
18 <h1>{% trans "Hi, " %}{{ user.username }}</h1>
19 {% endblock %}
22 {% block content %}
23 {% cache 600 newest_episodes user.username %}
24 {% if newest_episodes %}
25 <h2>{% trans "Newest Episodes" %}</h2>
26 <table class="list">
27 {% for episode in newest_episodes %}
28 <tr>
29 <td class="logo">{{ episode.podcast|podcast_logo }}</td>
30 <td>
31 {% episode_link episode episode.podcast %}<br/>
32 <span class="from_podcast">{% podcast_group_link episode.podcast %}</span>
33 </td>
34 <td>{{ episode.released|naturalday|nbsp }}</td>
35 </tr>
36 {% endfor %}
37 </table>
38 {% else %}
39 <p>
40 {% blocktrans %}Welcome to {{ site }}! If this is your first visit, you should set up your <a href="http://wiki.gpodder.org/wiki/Web_Services/Clients">podcast client</a> and try to check as many <em>Explore</em> boxes as you can.{% endblocktrans %}
41 </p>
43 <p>
44 {% url "help" as help %}
45 {% blocktrans %}If you have problems, have a look at the <a href="{{ help }}">docs</a> or ask questions on the <a href="http://wiki.gpodder.org/wiki/Mailing_List">mailing list</a> or <a href="https://getsatisfaction.com/gpoddernet">forum</a>.{% endblocktrans %}
46 </p>
48 {% endif %}
49 {% endcache %}
50 {% endblock %}
52 {% block sidebar %}
53 {% if sponsored_podcast %}
54 <div class="well">
55 <h4>{{ sponsored_podcast.title }} <small>(Supporting Podcast)</small></h4>
56 <div>{{ sponsored_podcast.podcast|podcast_logo }}</div>
57 <div style="margin-left: 40px">{{ sponsored_podcast.text|truncatewords:"20"}}</div>
58 <br style="clear: left;"/>
59 <small><a href="{% url "advertise" %}">advertise here</a></small>
60 </div>
61 {% endif %}
64 {% cache 3600 random_podcast %}
65 {% for random_podcast in random_podcasts %}
66 <div class="well">
68 <h4><small>{% trans "Random" %}</small></h4>
71 <a href="{% podcast_link_target random_podcast %}">
72 <div id="podcastlogo">{{ random_podcast|podcast_logo_medium }}</div>
73 </a>
75 <h4>{{ random_podcast.title }}</h4>
77 <p class="description">
78 {{ random_podcast.description|default:""|truncatewords:"50" }}
79 </p>
81 <p>
82 <a href="{% podcast_link_target random_podcast %}">{% trans "more..." %}</a>
83 </p>
85 </div>
86 {% endfor %}
87 {% endcache %}
89 <div class="well">
90 <h4>{% blocktrans %}Explore {{ site }}{% endblocktrans %}</h4>
91 <ul>
92 <li class="icon-check">
93 <a href="{% url "home" %}">
94 {% blocktrans %}Sign up to {{ site }}{% endblocktrans %}
95 </a>
96 </li>
97 <li class="icon-check{% if not "devices" in checklist %}-empty{% endif %}">
98 <a href="{% url "devices" %}">
99 {% trans "Connect your Podcast Clients" %}
100 </a>
101 </li>
102 <li class="icon-check{% if not "subscriptions" in checklist %}-empty{% endif %}">
103 <a href="{% url "subscriptions" %}">
104 {% trans "Subscribe to Podcasts" %}
105 </a>
106 </li>
107 <li class="icon-check{% if not "favorites" in checklist %}-empty{% endif %}">
108 <a href="{% url "favorites" %}">
109 {% trans "Mark your Favorite Episodes" %}
110 </a>
111 </li>
112 <li class="icon-check{% if not "share" in checklist %}-empty{% endif %}">
113 <a href="{% url "share" %}">
114 {% trans "Share your Subscriptions" %}
115 </a>
116 </li>
117 <li class="icon-check{% if not "share-favorites" in checklist %}-empty{% endif %}">
118 <a href="{% url "share" %}">
119 {% trans "Share your Favorite Episodes" %}
120 </a>
121 </li>
122 <li class="icon-check{% if not "userpage" in checklist %}-empty{% endif %}">
123 <a href="{% url "share" %}">
124 {% trans "Share your Userpage" %}
125 </a>
126 </li>
127 <li class="icon-check{% if not "tags" in checklist %}-empty{% endif %}">
128 <a href="{% url "tags" %}">
129 {% trans "Tag Podcasts" %}
130 </a>
131 </li>
132 <li class="icon-check{% if not "lists" in checklist %}-empty{% endif %}">
133 <a href="{% url "lists-overview" %}">
134 {% trans "Create Podcast Lists" %}
135 </a>
136 </li>
137 <li class="icon-check{% if not "flattr" in checklist %}-empty{% endif %}">
138 <a href="{% url "account" %}#flattr">
139 {% trans "Connect to Flattr" %}
140 </a>
141 </li>
142 <li class="icon-check{% if not "auto-flattr" in checklist %}-empty{% endif %}">
143 <a href="{% url "account" %}#flattr">
144 {% trans "Auto-Flattr Podcasts" %}
145 </a>
146 </li>
147 <li class="icon-check{% if not "publish" in checklist %}-empty{% endif %}">
148 <a href="{% url "publisher" %}">
149 {% trans "Publish your own Podcast" %}
150 </a>
151 </li>
152 </ul>
153 </p>
155 </div>
157 {% if show_install_reader %}
158 <div class="well">
159 <h4>{% trans "Subscribe in Your Browser" %}</h4>
161 {% blocktrans %}Register {{ site.domain }} as a feed reader, and subscribe to podcasts directly from your browser{% endblocktrans %}
162 </p>
163 <a class="btn btn-primary" href="#" onclick="registerHandler();">
164 {% trans "Install" %}
165 </a>
167 </div>
168 {% endif %}
170 {% endblock %}
173 {% block javascript %}
174 <script type="text/javascript">
175 function registerHandler()
177 navigator.registerContentHandler("application/vnd.mozilla.maybe.feed",
178 document.location.protocol + "//{{ site.domain }}/subscribe?url=%s",
179 "{{ site.domain }}");
181 </script>
182 {% endblock %}