remove now unused {% load url from future %}
[mygpo.git] / mygpo / share / templates / share / favorites.html
blob486c331be7eed3f0b9e78b9f4d6a09a8ec8bbf40
1 {% extends "base.html" %}
2 {% load i18n %}
3 {% load podcasts %}
4 {% load episodes %}
6 {% load menu %}
7 {% block mainmenu %}{{ "/share/"|main_menu }}{% endblock %}
8 {% block sectionmenu %}{{ "/share/favorites"|section_menu }}{% endblock %}
10 {% block title %}{% trans "Share your favorite episodes" %}{% endblock %}
12 {% block header %}
13 <h1>
14 {% trans "Share your favorite episodes" %}
15 </h1>
16 {% endblock %}
19 {% block content %}
21 <table>
23 <tr>
24 <td>
25 <i class="icon-rss icon-large"></i>
26 </td>
27 <td>
28 <a href="{% url "favorites-feed" user.username %}">
29 {% trans "Feed" %}
30 </a>
31 </td>
32 <td>
33 <input class="input-xxlarge" readonly="readonly" type="text" value="http://{% if feed_token %}{{ user.username }}:{{feed_token}}@{% endif %}{{ site.domain }}{% url "favorites-feed" user.username %}" />
34 </td>
35 </tr>
37 {% if not feed_token %}
39 <tr>
40 <td>
41 <i class="icon-link icon-large"></i>
42 </td>
44 <td>
45 {% if podcast %}
46 <a href="{% podcast_link_target podcast %}">{% trans "Directory Entry" %}</a>
47 {% else %}
48 {% trans "Directory Entry" %}
49 {% endif %}
50 </td>
51 <td>
52 {% if podcast %}
53 <input class="input-xxlarge" readonly="readonly" type="text" value="http://{{ site.domain }}{% podcast_link_target podcast %}" />
54 {% else %}
55 <form action="{% url "favorites-create-entry" %}" method="post">
56 {% csrf_token %}
57 <button class="btn" type="submit">{% trans "Create" %}</button>
58 </form>
59 {% endif %}
60 </td>
61 </tr>
63 {% endif %}
65 </table>
67 <h2>Permissions</h2>
68 {% if feed_token %}
69 <p>
70 {% blocktrans %}To keep your favorites private (from others and from the public pages of {{ site }}), you need to use HTTP-Authentication in your client. {% endblocktrans %}
71 <ul>
72 <li>{% trans "Username:" %} {{ user.username }}</li>
73 <li>{% trans "Password:" %} {{ feed_token }}</li>
74 </ul>
75 </p>
77 <div class="btn-group">
78 <button type="submit" class="btn" onclick="submitForm('public');">
79 <i class="icon-eye-open"></i> {% trans "Remove password" %}
80 </button>
81 <button type="submit" class="btn" onclick="submitForm('private');">
82 <i class="icon-eye-close"></i> {% trans "Generate new password" %}
83 </button>
84 </div>
87 <form id="private" class="form-inline" method="post" action="{% url "favorites_private" %}">
88 {% csrf_token %}
89 </form>
91 <form id="public" class="form-inline" method="post" action="{% url "favorites_public" %}">
92 {% csrf_token %}
93 </form>
96 {% else %}
97 <p>
98 {% blocktrans with site as sitename %}You've marked your favorites-feed as public and others can
99 subscribe to it. It will also be indexed by {{ sitename }}.{% endblocktrans %}
100 </p>
101 {% if podcast %}
102 <ul>
103 <li><a href="{% podcast_link_target podcast %}">public information about your favorites-feed</a></li>
104 </ul>
105 {% endif %}
107 <form class="form-inline" method="post" action="{% url "favorites_private" %}">
108 {% csrf_token %}
109 <button type="submit" class="btn">
110 <i class="icon-eye-close"></i> {% trans "Create password" %}
111 </button>
112 </form>
114 </ul>
115 {% endif %}
117 {% endblock %}
120 {% block javascript %}
122 <script language="javascript">
123 <!--
124 function submitForm(formid)
126 document.forms[formid].submit();
127 return true;
130 </script>
132 {% endblock %}