diff -r 381538cb3a8b -r 0a610af4033f src/cm/templates/site/macros/text_tabs.html --- 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 @@
  • {% blocktrans %}Settings{% endblocktrans %}
  • {% endif %} {% if user.is_authenticated %} -
  • {% blocktrans %}Notifications{% endblocktrans %}
  • +
  • {% blocktrans %}Followup{% endblocktrans %}
  • + {% endif %} + {% if can_manage_text %} +
  • {% blocktrans %}Embed{% endblocktrans %}
  • {% endif %} @@ -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");