summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
Diffstat (limited to 'app/views')
-rw-r--r--app/views/groups/_filter.html.haml33
-rw-r--r--app/views/groups/issues.html.haml33
-rw-r--r--app/views/groups/merge_requests.html.haml31
-rw-r--r--app/views/groups/search.html.haml68
-rw-r--r--app/views/groups/show.html.haml4
-rw-r--r--app/views/search/_result.html.haml84
-rw-r--r--app/views/search/show.html.haml85
7 files changed, 157 insertions, 181 deletions
diff --git a/app/views/groups/_filter.html.haml b/app/views/groups/_filter.html.haml
new file mode 100644
index 00000000000..c8b0ad0f433
--- /dev/null
+++ b/app/views/groups/_filter.html.haml
@@ -0,0 +1,33 @@
+= form_tag group_filter_path(entity), method: 'get' do
+ %fieldset.dashboard-search-filter
+ = search_field_tag "search", params[:search], { placeholder: 'Search', class: 'search-text-input' }
+ = button_tag type: 'submit', class: 'btn' do
+ %i.icon-search
+
+ %fieldset
+ %legend Status:
+ %ul.nav.nav-pills.nav-stacked
+ %li{class: ("active" if !params[:status])}
+ = link_to group_filter_path(entity, status: nil) do
+ Open
+ %li{class: ("active" if params[:status] == 'closed')}
+ = link_to group_filter_path(entity, status: 'closed') do
+ Closed
+ %li{class: ("active" if params[:status] == 'all')}
+ = link_to group_filter_path(entity, status: 'all') do
+ All
+
+ %fieldset
+ %legend Projects:
+ %ul.nav.nav-pills.nav-stacked
+ - @projects.each do |project|
+ - unless entities_per_project(project, entity).zero?
+ %li{class: ("active" if params[:project_id] == project.id.to_s)}
+ = link_to group_filter_path(entity, project_id: project.id) do
+ = project.name_with_namespace
+ %small.right= entities_per_project(project, entity)
+
+ %fieldset
+ %hr
+ = link_to "Reset", group_filter_path(entity), class: 'btn right'
+
diff --git a/app/views/groups/issues.html.haml b/app/views/groups/issues.html.haml
index ebbe4df14fb..ffca2dc75ea 100644
--- a/app/views/groups/issues.html.haml
+++ b/app/views/groups/issues.html.haml
@@ -3,18 +3,21 @@
%small (assigned to you)
%small.right #{@issues.total_count} issues
-%br
-.clearfix
-- if @issues.any?
- - @issues.group_by(&:project).each do |group|
- %div.ui-box
- - @project = group[0]
- %h5.title
- = @project.name
- %ul.well-list.issues_table
- - group[1].each do |issue|
- = render(partial: 'issues/show', locals: {issue: issue})
- %hr
- = paginate @issues, theme: "gitlab"
-- else
- %h3.nothing_here_message Nothing to show here
+%hr
+.row
+ .span3
+ = render 'filter', entity: 'issue'
+ .span9
+ - if @issues.any?
+ - @issues.group_by(&:project).each do |group|
+ %div.ui-box
+ - @project = group[0]
+ %h5.title
+ = link_to_project @project
+ %ul.well-list.issues_table
+ - group[1].each do |issue|
+ = render(partial: 'issues/show', locals: {issue: issue})
+ %hr
+ = paginate @issues, theme: "gitlab"
+ - else
+ %p.nothing_here_message Nothing to show here
diff --git a/app/views/groups/merge_requests.html.haml b/app/views/groups/merge_requests.html.haml
index 5fac4828526..c5245da731a 100644
--- a/app/views/groups/merge_requests.html.haml
+++ b/app/views/groups/merge_requests.html.haml
@@ -3,17 +3,22 @@
%small (authored by or assigned to you)
%small.right #{@merge_requests.total_count} merge requests
-%br
-- if @merge_requests.any?
- - @merge_requests.group_by(&:project).each do |group|
- %ul.well-list.ui-box
- - @project = group[0]
- %h5.title
- = @project.name
- - group[1].each do |merge_request|
- = render(partial: 'merge_requests/merge_request', locals: {merge_request: merge_request})
- %hr
- = paginate @merge_requests, theme: "gitlab"
+%hr
+.row
+ .span3
+ = render 'filter', entity: 'merge_request'
+ .span9
+ - if @merge_requests.any?
+ - @merge_requests.group_by(&:project).each do |group|
+ .ui-box
+ - @project = group[0]
+ %h5.title
+ = link_to_project @project
+ %ul.well-list
+ - group[1].each do |merge_request|
+ = render(partial: 'merge_requests/merge_request', locals: {merge_request: merge_request})
+ %hr
+ = paginate @merge_requests, theme: "gitlab"
-- else
- %h3.nothing_here_message Nothing to show here
+ - else
+ %h3.nothing_here_message Nothing to show here
diff --git a/app/views/groups/search.html.haml b/app/views/groups/search.html.haml
index 6ca5630f43d..1ba4707aa52 100644
--- a/app/views/groups/search.html.haml
+++ b/app/views/groups/search.html.haml
@@ -6,70 +6,4 @@
= search_field_tag :search, params[:search], placeholder: "issue 143", class: "input-xxlarge search-text-input", id: "dashboard_search"
= submit_tag 'Search', class: "btn primary wide"
- if params[:search].present?
- %br
- %h3
- Search results
- %small (#{@projects.count + @merge_requests.count + @issues.count})
- %hr
- .search_results
- .row
- .span6
- %table
- %thead
- %tr
- %th Projects
- %tbody
- - @projects.each do |project|
- %tr
- %td
- = link_to project do
- %strong.term= project.name
- %small.cgray
- last activity at
- = project.last_activity_date.stamp("Aug 25, 2011")
- - if @projects.blank?
- %tr
- %td
- %h4.nothing_here_message No Projects
- %br
- %table
- %thead
- %tr
- %th Merge Requests
- %tbody
- - @merge_requests.each do |merge_request|
- %tr
- %td
- = link_to [merge_request.project, merge_request] do
- %span.badge.badge-info ##{merge_request.id}
- –
- %strong.term= truncate merge_request.title, length: 50
- %strong.right
- %span.label= merge_request.project.name
- - if @merge_requests.blank?
- %tr
- %td
- %h4.nothing_here_message No Merge Requests
- .span6
- %table
- %thead
- %tr
- %th Issues
- %tbody
- - @issues.each do |issue|
- %tr
- %td
- = link_to [issue.project, issue] do
- %span.badge.badge-info ##{issue.id}
- –
- %strong.term= truncate issue.title, length: 40
- %strong.right
- %span.label= issue.project.name
- - if @issues.blank?
- %tr
- %td
- %h4.nothing_here_message No Issues
- :javascript
- $(function() {
- $(".search_results .term").highlight("#{params[:search]}");
- })
+ = render 'search/result'
diff --git a/app/views/groups/show.html.haml b/app/views/groups/show.html.haml
index 76bc2639d61..d7d3f869895 100644
--- a/app/views/groups/show.html.haml
+++ b/app/views/groups/show.html.haml
@@ -7,7 +7,7 @@
%span.cgray Events and projects are filtered in scope of group
%hr
- if @events.any?
- .content_list= render @events
+ .content_list
- else
%p.nothing_here_message Projects activity will be displayed here
.loading.hide
@@ -26,4 +26,4 @@
= link_to "@gitlabhq", "https://twitter.com/gitlabhq"
:javascript
- $(function(){ Pager.init(20); });
+ $(function(){ Pager.init(20, true); });
diff --git a/app/views/search/_result.html.haml b/app/views/search/_result.html.haml
index 8b137891791..79bed4f737c 100644
--- a/app/views/search/_result.html.haml
+++ b/app/views/search/_result.html.haml
@@ -1 +1,85 @@
+%br
+%h3.page_title
+ Search results
+ %span.cgray (#{@projects.count + @merge_requests.count + @issues.count + @wiki_pages.count})
+%hr
+.search_results
+ .row
+ .span6
+ %table
+ %thead
+ %tr
+ %th Projects
+ %tbody
+ - @projects.each do |project|
+ %tr
+ %td
+ = link_to project do
+ %strong.term= project.name_with_namespace
+ %small.cgray
+ last activity at
+ = project.last_activity_date.stamp("Aug 25, 2011")
+ - if @projects.blank?
+ %tr
+ %td
+ %h4.nothing_here_message No Projects
+ %br
+ %table
+ %thead
+ %tr
+ %th Merge Requests
+ %tbody
+ - @merge_requests.each do |merge_request|
+ %tr
+ %td
+ = link_to [merge_request.project, merge_request] do
+ %span.badge.badge-info ##{merge_request.id}
+ –
+ %strong.term= truncate merge_request.title, length: 50
+ %strong.right
+ %span.label= merge_request.project.name
+ - if @merge_requests.blank?
+ %tr
+ %td
+ %h4.nothing_here_message No Merge Requests
+ .span6
+ %table
+ %thead
+ %tr
+ %th Issues
+ %tbody
+ - @issues.each do |issue|
+ %tr
+ %td
+ = link_to [issue.project, issue] do
+ %span.badge.badge-info ##{issue.id}
+ –
+ %strong.term= truncate issue.title, length: 40
+ %strong.right
+ %span.label= issue.project.name
+ - if @issues.blank?
+ %tr
+ %td
+ %h4.nothing_here_message No Issues
+ .span6
+ %table
+ %thead
+ %tr
+ %th Wiki
+ %tbody
+ - @wiki_pages.each do |wiki_page|
+ %tr
+ %td
+ = link_to project_wiki_path(wiki_page.project, wiki_page) do
+ %strong.term= truncate wiki_page.title, length: 40
+ %strong.right
+ %span.label= wiki_page.project.name
+ - if @wiki_pages.blank?
+ %tr
+ %td
+ %h4.nothing_here_message No wiki pages
+:javascript
+ $(function() {
+ $(".search_results .term").highlight("#{escape_javascript(params[:search])}");
+ })
diff --git a/app/views/search/show.html.haml b/app/views/search/show.html.haml
index ddcef442490..aa0d6d700d9 100644
--- a/app/views/search/show.html.haml
+++ b/app/views/search/show.html.haml
@@ -6,87 +6,4 @@
= search_field_tag :search, params[:search], placeholder: "issue 143", class: "input-xxlarge search-text-input", id: "dashboard_search"
= submit_tag 'Search', class: "btn primary wide"
- if params[:search].present?
- %br
- %h3
- Search results
- %small (#{@projects.count + @merge_requests.count + @issues.count + @wiki_pages.count})
- %hr
- .search_results
- .row
- .span6
- %table
- %thead
- %tr
- %th Projects
- %tbody
- - @projects.each do |project|
- %tr
- %td
- = link_to project do
- %strong.term= project.name_with_namespace
- %small.cgray
- last activity at
- = project.last_activity_date.stamp("Aug 25, 2011")
- - if @projects.blank?
- %tr
- %td
- %h4.nothing_here_message No Projects
- %br
- %table
- %thead
- %tr
- %th Merge Requests
- %tbody
- - @merge_requests.each do |merge_request|
- %tr
- %td
- = link_to [merge_request.project, merge_request] do
- %span.badge.badge-info ##{merge_request.id}
- –
- %strong.term= truncate merge_request.title, length: 50
- %strong.right
- %span.label= merge_request.project.name
- - if @merge_requests.blank?
- %tr
- %td
- %h4.nothing_here_message No Merge Requests
- .span6
- %table
- %thead
- %tr
- %th Issues
- %tbody
- - @issues.each do |issue|
- %tr
- %td
- = link_to [issue.project, issue] do
- %span.badge.badge-info ##{issue.id}
- –
- %strong.term= truncate issue.title, length: 40
- %strong.right
- %span.label= issue.project.name
- - if @issues.blank?
- %tr
- %td
- %h4.nothing_here_message No Issues
- .span6
- %table
- %thead
- %tr
- %th Wiki
- %tbody
- - @wiki_pages.each do |wiki_page|
- %tr
- %td
- = link_to project_wiki_path(wiki_page.project, wiki_page) do
- %strong.term= truncate wiki_page.title, length: 40
- %strong.right
- %span.label= wiki_page.project.name
- - if @wiki_pages.blank?
- %tr
- %td
- %h4.nothing_here_message No wiki pages
- :javascript
- $(function() {
- $(".search_results .term").highlight("#{escape_javascript(params[:search])}");
- })
+ = render 'search/result'