diff options
author | Valery Sizov <vsv2711@gmail.com> | 2015-08-13 17:48:21 +0300 |
---|---|---|
committer | Valery Sizov <vsv2711@gmail.com> | 2015-08-24 13:59:01 +0300 |
commit | 56527b63e8a09e0fe4967eabf08638d853e6b2b5 (patch) | |
tree | 0ee484fe1bb0dbdae4333e30ad7c3c36251c1bcf /app/views/search | |
parent | 24b282aeeaf5ba41c6b73100051eb48428787770 (diff) |
Ability to search milestones
Diffstat (limited to 'app/views/search')
-rw-r--r-- | app/views/search/_category.html.haml | 14 | ||||
-rw-r--r-- | app/views/search/results/_milestone.html.haml | 9 |
2 files changed, 23 insertions, 0 deletions
diff --git a/app/views/search/_category.html.haml b/app/views/search/_category.html.haml index 154332cb9a9..a75cd7bd809 100644 --- a/app/views/search/_category.html.haml +++ b/app/views/search/_category.html.haml @@ -21,6 +21,13 @@ Merge requests %span.badge = @search_results.merge_requests_count + %li{class: ("active" if @scope == 'milestones')} + = link_to search_filter_path(scope: 'milestones') do + = icon('clock-o fw') + %span + Milestones + %span.badge + = @search_results.milestones_count %li{class: ("active" if @scope == 'notes')} = link_to search_filter_path(scope: 'notes') do = icon('comments fw') @@ -74,4 +81,11 @@ Merge requests %span.badge = @search_results.merge_requests_count + %li{class: ("active" if @scope == 'milestones')} + = link_to search_filter_path(scope: 'milestones') do + = icon('clock-o fw') + %span + Milestones + %span.badge + = @search_results.milestones_count diff --git a/app/views/search/results/_milestone.html.haml b/app/views/search/results/_milestone.html.haml new file mode 100644 index 00000000000..e0b18733d74 --- /dev/null +++ b/app/views/search/results/_milestone.html.haml @@ -0,0 +1,9 @@ +.search-result-row + %h4 + = link_to [milestone.project.namespace.becomes(Namespace), milestone.project, milestone] do + %span.term.str-truncated= milestone.title + + - if milestone.description.present? + .description.term + = preserve do + = search_md_sanitize(markdown(milestone.description))
\ No newline at end of file |