redmine_knowledgebase icon indicating copy to clipboard operation
redmine_knowledgebase copied to clipboard

Show the number of comments, attachments, versions on the tabs.

Open hirayama-evolni opened this issue 11 years ago • 3 comments

It's inconvenient that, the number of comments which the article has, is not shown. How's this?

hirayama-evolni avatar Apr 24 '14 01:04 hirayama-evolni

@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

alexbevi avatar Apr 24 '14 13:04 alexbevi

(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.

hirayama-evolni avatar Apr 24 '14 23:04 hirayama-evolni

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.

hirayama-evolni avatar Apr 28 '14 03:04 hirayama-evolni