--- a/src/cm/templates/site/macros/text_tabs.html Mon Dec 14 10:05:21 2009 +0100
+++ b/src/cm/templates/site/macros/text_tabs.html Mon Dec 14 13:54:47 2009 +0100
@@ -19,7 +19,10 @@
<li><a id="settings_tab_link" class="cust_behav" href="#text_settings">{% blocktrans %}Settings{% endblocktrans %}</a></li>
{% endif %}
{% if user.is_authenticated %}
- <li><a id="notifications_tab_link" class="cust_behav" href="#notifications_settings">{% blocktrans %}Notifications{% endblocktrans %}</a></li>
+ <li><a id="followup_tab_link" class="cust_behav" href="#followup_settings">{% blocktrans %}Followup{% endblocktrans %}</a></li>
+ {% endif %}
+ {% if can_manage_text %}
+ <li><a id="embed_tab_link" class="cust_behav" href="#text_embed">{% blocktrans %}Embed{% endblocktrans %}</a></li>
{% endif %}
</ul>
</div>
@@ -39,7 +42,11 @@
{% endif %}
{% if user.is_authenticated %}
-tb_conf['notifications-view-url'] = "{% url text-notifications text.key %}";
+tb_conf['followup-view-url'] = "{% url text-followup text.key %}";
+{% endif %}
+
+{% if can_manage_text %}
+tb_conf['embed-view-url'] = "{% url text-embed text.key %}";
{% endif %}
renderTabs = function (current_tab) {
@@ -75,10 +82,16 @@
}
{% endif %}
{% if user.is_authenticated %}
- if (current_tab == 'notifications') {
+ if (current_tab == 'followup') {
tab_index = 2 + delta;
}
{% endif %}
+ {% if can_manage_text %}
+ if (current_tab == 'embed') {
+ tab_index = 3 + delta;
+ }
+ {% endif %}
+
$("#text-tabs").tabs({ ajaxOptions: { async: false }, selected: tab_index}) ;
@@ -91,7 +104,8 @@
$("#share_tab_link").attr("href", tb_conf['share-view-url']) ;
$("#history_tab_link").attr("href", tb_conf['history-view-url']) ;
$("#settings_tab_link").attr("href", tb_conf['settings-view-url']) ;
- $("#notifications_tab_link").attr("href", tb_conf['notifications-view-url']) ;
+ $("#followup_tab_link").attr("href", tb_conf['followup-view-url']) ;
+ $("#embed_tab_link").attr("href", tb_conf['embed-view-url']) ;
$("#text-tabs").trigger("tabs_ready");