diff --git a/app/views/articles/show.html.erb b/app/views/articles/show.html.erb index b4f8bdb..5d017d2 100644 --- a/app/views/articles/show.html.erb +++ b/app/views/articles/show.html.erb @@ -47,4 +47,21 @@ <div class="article-summary"><%= @article.summary %></div> <% end %> -<%= render_tabs article_tabs %> \ No newline at end of file +<%= render_tabs article_tabs %> + +<script type="text/javascript"> +$(function(){ + var el; + + el = $("#tab-comments"); + el.text(el.text()+"("+<%= @comments.length %>+")"); + + el = $("#tab-attachments"); + el.text(el.text()+"("+<%= @attachments.length %>+")"); + + el = $("#tab-history"); + el.text(el.text()+"("+<%= @versions.length %>+")"); + + displayTabsButtons(); +}); +</script> \ No newline at end of file