}
div#subscription_list {
- width: 500px;
- float:left;
+ width: 100%;
+ /*float:left;*/
}
div.subscription_summary {
padding: 3px 0px 5px 0;
position: relative;
width:100%;
- margin-bottom:30px;
+ margin-top: 5px;
}
div.subscription_title {
- float:left;
-
- width:350px;
-
- line-height:30px;
-
- font-size: 25px;
+ /*float:left;
+ line-height:30px;*/
+ margin-top: 5px;
+ font-size: 16px;
font-weight:bold;
- font-family: Arial;
}
a.subscription_unsubscribe_button {
float:left;
- font-size: 15px;
+ font-size: 11px;
font-weight:bold;
margin-right:15px;
- margin-top:5px;
+ margin-top: 5px;
}
div.subscription_userinfo {
-
-
-
{% load i18n humanize extra_filters extra_tags user_tags %}
<div class="subscription_summary">
- <div style="height:100%"><a class="sidebar_button subscription_unsubscribe_button" href="{% url subscribe id=question.id %}">
+ <div style="height:100%"><a class="sidebar_button subscription_unsubscribe_button" href="{% url subscribe id=subscription.question.id %}">
{% trans "Unsubscribe" %}
</a></div>
<div class="subscription_title"><a title="{{ question.summary }}" href="{{ question.get_absolute_url }}">{{question.headline}}</a></div>
+ <div class="subscription_details"><span class="relativetime" title="{{subscription.last_view}}">{% trans "Last checked" %} {% diff_date subscription.last_view %}</span></div>
</div>
\ No newline at end of file
$("div#subscriptions_settings").show();
$("div#subscriptions_management").hide();
- $("div#subscriptions_settings_button").context.activeElement.className = 'on';
- $("div#subscriptions_management_button").context.activeElement.className = '';
+ $("a#subscriptions_settings_button").addClass('on');
+ $("a#subscriptions_management_button").removeClass("on");
//location.reload(true);
}
$("div#subscriptions_settings").hide();
$("div#subscriptions_management").show();
- $("div#subscriptions_settings_button").context.activeElement.className = '';
- $("div#subscriptions_management_button").context.activeElement.className = 'on';
+ $("a#subscriptions_settings_button").removeClass('on');
+ $("a#subscriptions_management_button").addClass('on');
//location.reload(true);
}
<br/>
<div id="navBar"><div class="tabsA">
- <a HREF="javascript:enableSettings()" id="subscriptions_settings_button">Settings</a>
- <a HREF="javascript:enableManagement()" id="subscriptions_management_button">Remove</a>
+ <a HREF="javascript:enableSettings()" {% if not manage_open %}class="on"{% endif %} id="subscriptions_settings_button">Settings</a>
+ <a HREF="javascript:enableManagement()" {% if manage_open %}class="on"{% endif %} id="subscriptions_management_button">Manage</a>
</div></div>
<br/>
{% load i18n %}
{% load question_list_tags %}
-<br />
-<br />
-
<div id="subscription_list" align="left">
<h2>
- {% trans "Notifications and subscription settings" %}
+ {% trans "Manage your current subscriptions" %}
<span style="font-size:11px">
{% if auto %}
<a href='{% url user_subscriptions id=view_user.id slug=view_user.username|slugify %}?auto=False'>{% trans "don't show auto-subscribe" %}</a>
</h2>
{% for subscription in subscriptions.paginator.page %}
- {% subscription_list_item subscription %}
+ {% subscription_list_item subscription subscription.question %}
{% endfor %}
<div class="pager">{{ subscriptions.paginator.page_numbers }}</div>
class SubscriptionItemNode(template.Node):\r
template = template.loader.get_template('question_list/subscription_item.html')\r
\r
- def __init__(self, question, options):\r
+ def __init__(self, subscription, question, options):\r
self.question = template.Variable(question)\r
+ self.subscription = template.Variable(subscription)\r
self.options = options\r
\r
def render(self, context):\r
return self.template.render(template.Context({\r
'question': self.question.resolve(context),\r
+ 'subscription': self.subscription.resolve(context),\r
'signature_type': self.options.get('signature_type', 'lite'),\r
}))\r
\r
@register.tag\r
def subscription_list_item(parser, token):\r
tokens = token.split_contents()[1:]\r
- return SubscriptionItemNode(tokens[0], argument_parser(tokens[1:]))\r
+ return SubscriptionItemNode(tokens[0], tokens[1], argument_parser(tokens[2:]))\r
\r
@register.inclusion_tag('question_list/sort_tabs.html')\r
def question_sort_tabs(sort_context):\r
\r
if auto == 'True':\r
show_auto = True\r
- subscriptions = user.subscriptions.all().order_by('-questionsubscription__last_view')\r
+ subscriptions = QuestionSubscription.objects.filter(user=user).order_by('-last_view') \r
+ #subscriptions = user.subscriptions.all().order_by('-questionsubscription__last_view')\r
else:\r
show_auto = False\r
- subscriptions = user.subscriptions.filter(questionsubscription__auto_subscription=False).order_by('-questionsubscription__last_view')\r
+ subscriptions = QuestionSubscription.objects.filter(user=user, auto_subscription=False).order_by('-last_view')\r
+ #subscriptions = user.subscriptions.filter(questionsubscription__auto_subscription=False).order_by('-questionsubscription__last_view')\r
\r
if request.method == 'POST':\r
manage_open = False\r