remove now unused {% load url from future %}
[mygpo.git] / mygpo / web / templates / dashboard.html
blob1d61db0c48901f48154cd8e5dfd775555bea22c9
1 {% extends "base.html" %}
2 {% load i18n %}
3 {% load devices %}
4 {% load episodes %}
5 {% load podcasts %}
6 {% load humanize %}
7 {% load cache %}
8 {% load utils %}
10 {% load menu %}
11 {% block mainmenu %}{{ "/"|main_menu }}{% endblock %}
12 {% block sectionmenu %}{{ "/"|section_menu }}{% endblock %}
14 {% block title %}{% trans "Overview" %}{% endblock %}
16 {% block header %}
17 <h1>{% trans "Hi, " %}{{ user.username }}</h1>
18 {% endblock %}
21 {% block content %}
22 {% cache 600 newest_episodes user.username %}
23 {% if newest_episodes %}
24 <h2>{% trans "Newest Episodes" %}</h2>
25 <table class="list">
26 {% for episode in newest_episodes %}
27 <tr>
28 <td class="logo">{{ episode.podcast|podcast_logo }}</td>
29 <td>
30 {% episode_link episode episode.podcast %}<br/>
31 <span class="from_podcast">{% podcast_group_link episode.podcast %}</span>
32 </td>
33 <td>{{ episode.released|naturalday|nbsp }}</td>
34 </tr>
35 {% endfor %}
36 </table>
37 {% else %}
38 <p>
39 {% 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 %}
40 </p>
42 <p>
43 {% url "help" as help %}
44 {% 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 %}
45 </p>
47 {% endif %}
48 {% endcache %}
49 {% endblock %}
51 {% block sidebar %}
52 {% if sponsored_podcast %}
53 <div class="well">
54 <h4>{{ sponsored_podcast.title }} <small>(Supporting Podcast)</small></h4>
55 <div>{{ sponsored_podcast.podcast|podcast_logo }}</div>
56 <div style="margin-left: 40px">{{ sponsored_podcast.text|truncatewords:"20"}}</div>
57 <br style="clear: left;"/>
58 <small><a href="{% url "advertise" %}">advertise here</a></small>
59 </div>
60 {% endif %}
63 {% cache 3600 random_podcast %}
64 {% for random_podcast in random_podcasts %}
65 <div class="well">
67 <h4><small>{% trans "Random" %}</small></h4>
70 <a href="{% podcast_link_target random_podcast %}">
71 <div id="podcastlogo">{{ random_podcast|podcast_logo_medium }}</div>
72 </a>
74 <h4>{{ random_podcast.title }}</h4>
76 <p class="description">
77 {{ random_podcast.description|default:""|truncatewords:"50" }}
78 </p>
80 <p>
81 <a href="{% podcast_link_target random_podcast %}">{% trans "more..." %}</a>
82 </p>
84 </div>
85 {% endfor %}
86 {% endcache %}
88 <div class="well">
89 <h4>{% blocktrans %}Explore {{ site }}{% endblocktrans %}</h4>
90 <ul>
91 <li class="icon-check">
92 <a href="{% url "home" %}">
93 {% blocktrans %}Sign up to {{ site }}{% endblocktrans %}
94 </a>
95 </li>
96 <li class="icon-check{% if not "devices" in checklist %}-empty{% endif %}">
97 <a href="{% url "devices" %}">
98 {% trans "Connect your Podcast Clients" %}
99 </a>
100 </li>
101 <li class="icon-check{% if not "subscriptions" in checklist %}-empty{% endif %}">
102 <a href="{% url "subscriptions" %}">
103 {% trans "Subscribe to Podcasts" %}
104 </a>
105 </li>
106 <li class="icon-check{% if not "favorites" in checklist %}-empty{% endif %}">
107 <a href="{% url "favorites" %}">
108 {% trans "Mark your Favorite Episodes" %}
109 </a>
110 </li>
111 <li class="icon-check{% if not "share" in checklist %}-empty{% endif %}">
112 <a href="{% url "share" %}">
113 {% trans "Share your Subscriptions" %}
114 </a>
115 </li>
116 <li class="icon-check{% if not "share-favorites" in checklist %}-empty{% endif %}">
117 <a href="{% url "share" %}">
118 {% trans "Share your Favorite Episodes" %}
119 </a>
120 </li>
121 <li class="icon-check{% if not "userpage" in checklist %}-empty{% endif %}">
122 <a href="{% url "share" %}">
123 {% trans "Share your Userpage" %}
124 </a>
125 </li>
126 <li class="icon-check{% if not "tags" in checklist %}-empty{% endif %}">
127 <a href="{% url "tags" %}">
128 {% trans "Tag Podcasts" %}
129 </a>
130 </li>
131 <li class="icon-check{% if not "lists" in checklist %}-empty{% endif %}">
132 <a href="{% url "lists-overview" %}">
133 {% trans "Create Podcast Lists" %}
134 </a>
135 </li>
136 <li class="icon-check{% if not "flattr" in checklist %}-empty{% endif %}">
137 <a href="{% url "account" %}#flattr">
138 {% trans "Connect to Flattr" %}
139 </a>
140 </li>
141 <li class="icon-check{% if not "auto-flattr" in checklist %}-empty{% endif %}">
142 <a href="{% url "account" %}#flattr">
143 {% trans "Auto-Flattr Podcasts" %}
144 </a>
145 </li>
146 <li class="icon-check{% if not "publish" in checklist %}-empty{% endif %}">
147 <a href="{% url "publisher" %}">
148 {% trans "Publish your own Podcast" %}
149 </a>
150 </li>
151 </ul>
152 </p>
154 </div>
156 {% if show_install_reader %}
157 <div class="well">
158 <h4>{% trans "Subscribe in Your Browser" %}</h4>
160 {% blocktrans %}Register {{ site.domain }} as a feed reader, and subscribe to podcasts directly from your browser{% endblocktrans %}
161 </p>
162 <a class="btn btn-primary" href="#" onclick="registerHandler();">
163 {% trans "Install" %}
164 </a>
166 </div>
167 {% endif %}
169 {% endblock %}
172 {% block javascript %}
173 <script type="text/javascript">
174 function registerHandler()
176 navigator.registerContentHandler("application/vnd.mozilla.maybe.feed",
177 document.location.protocol + "//{{ site.domain }}/subscribe?url=%s",
178 "{{ site.domain }}");
180 </script>
181 {% endblock %}