redmine_knowledgebase
redmine_knowledgebase copied to clipboard
Show the number of comments, attachments, versions on the tabs.
It's inconvenient that, the number of comments which the article has, is not shown. How's this?
@hirayama-evolni looks good. Just wondering if maybe we should have included this as part of the actual tab renderer (https://github.com/alexbevi/redmine_knowledgebase/blob/master/app/helpers/knowledgebase_helper.rb#L96) so we could pass the counts in when we render the labels, and thereby allow translation of the label + count
(I'm not so good at Ruby and Rails...)
I too think it's better to do it in the Ruby world.
Although maybe I just don't know how, I looked into render_tabs' code in application_helper.rb and view/common/_tabs.html.erb, I couldn't find the easy way to pass the label + count with i18n enabled.
Thanks.
I tried like this.
https://github.com/hirayama-evolni/redmine_knowledgebase/commit/8df554dbf967c207f01d8b4955695e6d83d48176
I think copy-and-edit _tabs.html.erb is not a good idea, but I counldn't find other solutions.
I'll resend another pull request if you prefer this.
Thanks.