fix template for /share
[mygpo.git] / mygpo / share / templates / share / overview.html
blob84028ceb050dab55542cac8301e14e5d77a01f46
1 {% extends "base.html" %}
2 {% load url from future %}
3 {% load i18n %}
4 {% load podcasts %}
6 {% load menu %}
7 {% block mainmenu %}{{ "/share/"|main_menu }}{% endblock %}
8 {% block sectionmenu %}{{ "/share/"|section_menu }}{% endblock %}
10 {% block title %}{% trans "Sharing" %}{% endblock %}
12 {% block header %}
13 <h1>{% trans "Share" %}</h1>
14 {% endblock %}
17 {% block content %}
19 <table class="list">
21 <tr>
22 <td><i class="icon-rss icon-large"></i> {% trans "Subscriptions" %}</td>
23 <td>
24 <div class="btn-group">
25 <button class="btn btn-small {% if not subscriptions_token %}disabled btn-primary{% endif %}" onclick="submitForm('subscriptions_public');">{% trans "Public" %}</button>
26 <button class="btn btn-small {% if subscriptions_token %}disabled btn-primary{% endif %}" onclick="submitForm('subscriptions_private');">{% trans "Private" %}</button>
27 </div>
28 </td>
29 <td>
30 <a href="{% url "shared-subscriptions" user.username %}{% if subscriptions_token %}?token={{ subscriptions_token }}{% endif %}">
31 <img src="/media/22x22/internet-web-browser.png" class="action-button" /></a>
32 <a href="{% url "shared-subscriptions-rss" user.username %}{% if subscriptions_token %}?token={{ subscriptions_token }}{% endif %}">
33 <img height="22" width="22" src="/media/28x28/feed-icon.png" class="action-button" /></a>
34 <a href="{% url "shared-subscriptions-opml" user.username %}{% if subscriptions_token %}?token={{ subscriptions_token }}{% endif %}">
35 <img src="/media/22x22/opml-icon.png" class="action-button" /></a>
36 </td>
37 <td>
38 <button class="btn btn-small btn-link {% if not subscriptions_token %}disabled{% endif %}" {% if subscriptions_token %}type="submit" onclick="submitForm('subscriptions_private');"{% endif %}>{% trans "New Token" %}</button>
39 <a class="btn btn-small btn-link" href="{% url "privacy" %}">Privacy Settings</a>
40 </td>
41 </tr>
43 <tr>
44 <td><i class="icon-user icon-large"></i> {% trans "User Page" %}</td>
45 <td>
46 <div class="btn-group">
47 <button class="btn btn-small {% if not userpage_token %}disabled btn-primary{% endif %}" onclick="submitForm('userpage_public');">{% trans "Public" %}</button>
48 <button class="btn btn-small {% if userpage_token %}disabled btn-primary{% endif %}" onclick="submitForm('userpage_private');">{% trans "Private" %}</button>
49 </div>
50 <td>
51 <a href="{% url "user" user.username %}{% if userpage_token %}?token={{ userpage_token }}{% endif %}">
52 <img src="/media/22x22/internet-web-browser.png" class="action-button" />
53 </a>
54 </td>
55 <td>
56 <button class="btn btn-small btn-link {% if not userpage_token %}disabled{% endif %}" {% if userpage_token %}type="submit" onclick="submitForm('userpage_private');"{% endif %}>{% trans "New Token" %}</button>
57 </td>
58 </tr>
60 <tr>
61 <td><i class="icon-star icon-large"></i> {% trans "Favorites Feed" %}</td>
62 <td>
63 <div class="btn-group">
64 <button class="btn btn-small {% if not favfeed_token %}disabled btn-primary{% endif %}" onclick="submitForm('favfeed_public');">{% trans "Public" %}</button>
65 <button class="btn btn-small {% if favfeed_token %}disabled btn-primary{% endif %}" onclick="submitForm('favfeed_private');">{% trans "Private" %}</button>
66 </div>
67 </td>
68 <td>
69 {% if favfeed_podcast %}
70 <a href="{% podcast_link_target favfeed_podcast %}"><img src="/media/22x22/internet-web-browser.png" class="action-button" /></a>
71 {% endif %}
72 {% if favfeed_token %}
73 <a href="https://{{ user.username }}:{{ favfeed_token }}@{{ site.domain }}{% url "favorites-feed" user.username %}">
74 <img height="22" width="22" src="/media/28x28/feed-icon.png" class="action-button" />
75 </a>
76 {% else %}
77 <a href="{% url "favorites-feed" user.username %}">
78 <img height="22" width="22" src="/media/28x28/feed-icon.png" class="action-button" />
79 </a>
80 {% endif %}
81 </td>
82 <td>
83 <button class="btn btn-small btn-link {% if not favfeed_token %}disabled{% endif %}" {% if favfeed_token %}type="submit" onclick="submitForm('favfeed_private');"{% endif %}>{% trans "New Token" %}</button>
84 <a class="btn btn-small btn-link" href="{% url "favorites" %}">Edit Favorites</a>
85 </td>
86 </tr>
88 </table>
92 <form id="subscriptions_public" method="post" action="{% url "subscriptions-public" %}">
93 {% csrf_token %}
94 </form>
96 <form id="subscriptions_private" method="post" action="{% url "subscriptions-private" %}">
97 {% csrf_token %}
98 </form>
100 <form id="userpage_public" method="post" action="{% url "userpage-public" %}">
101 {% csrf_token %}
102 </form>
104 <form id="userpage_private" method="post" action="{% url "userpage-private" %}">
105 {% csrf_token %}
106 </form>
108 <form id="favfeed_public" method="post" action="{% url "favfeed-public" %}">
109 {% csrf_token %}
110 </form>
112 <form id="favfeed_private" method="post" action="{% url "favfeed-private" %}">
113 {% csrf_token %}
114 </form>
116 {% endblock %}
119 {% block javascript %}
120 <script language="javascript">
121 <!--
122 function submitForm(formid)
124 document.forms[formid].submit();
125 return true;
128 </script>
129 {% endblock %}
133 {% block sidebar %}
135 <div class="well">
136 <h4>{% trans "Private Items" %}</h4>
137 <p>{% trans "Private items are protected by a special token. Only those who know the exact link can access your content" %}</p>
138 </div>
140 {% endblock %}