Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hirayama-evolni
Copy link

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

@alexbevi
Copy link
Owner

@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

@hirayama-evolni
Copy link
Author

(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
Copy link
Author

I tried like this.

hirayama-evolni@8df554d

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants