diff options
author | Rémy Coutable <remy@rymai.me> | 2018-09-06 13:07:33 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2018-09-26 19:34:26 +0300 |
commit | d2afddfeff29c15cad737db4898664381ce0f985 (patch) | |
tree | 3fd5b7f6329bf4fe4ce9851e8bc16e92def8d205 /app/views/shared | |
parent | 65cf805278c1d865ee0543508de92d5f4ecae4f0 (diff) |
Refactor EventFilter and increase its test coverage
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'app/views/shared')
-rw-r--r-- | app/views/shared/_event_filter.html.haml | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/app/views/shared/_event_filter.html.haml b/app/views/shared/_event_filter.html.haml index 7afb7b3a93b..6612497e7e2 100644 --- a/app/views/shared/_event_filter.html.haml +++ b/app/views/shared/_event_filter.html.haml @@ -2,13 +2,13 @@ .fade-left= icon('angle-left') .fade-right= icon('angle-right') %ul.nav-links.event-filter.scrolling-tabs.nav.nav-tabs - = event_filter_link EventFilter.all, _('All'), s_('EventFilterBy|Filter by all') + = event_filter_link EventFilter::ALL, _('All'), s_('EventFilterBy|Filter by all') - if event_filter_visible(:repository) - = event_filter_link EventFilter.push, _('Push events'), s_('EventFilterBy|Filter by push events') + = event_filter_link EventFilter::PUSH, _('Push events'), s_('EventFilterBy|Filter by push events') - if event_filter_visible(:merge_requests) - = event_filter_link EventFilter.merged, _('Merge events'), s_('EventFilterBy|Filter by merge events') + = event_filter_link EventFilter::MERGED, _('Merge events'), s_('EventFilterBy|Filter by merge events') - if event_filter_visible(:issues) - = event_filter_link EventFilter.issue, _('Issue events'), s_('EventFilterBy|Filter by issue events') + = event_filter_link EventFilter::ISSUE, _('Issue events'), s_('EventFilterBy|Filter by issue events') - if comments_visible? - = event_filter_link EventFilter.comments, _('Comments'), s_('EventFilterBy|Filter by comments') - = event_filter_link EventFilter.team, _('Team'), s_('EventFilterBy|Filter by team') + = event_filter_link EventFilter::COMMENTS, _('Comments'), s_('EventFilterBy|Filter by comments') + = event_filter_link EventFilter::TEAM, _('Team'), s_('EventFilterBy|Filter by team') |