Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-08-08 13:22:09 +0400
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-08-08 13:22:09 +0400
commit4537623d12fb7372262267be5d6ec3b41f3f476c (patch)
treeccd0494b1112c388114e032f994505a2344123be /app/views/shared
parentc7e490ebd5ab69fe043cd39145bd6ef3850a6921 (diff)
parent1a83fea711961844adc7ddb21ce007143fefc144 (diff)
Merge branch 'master' into karlhungus-mr-on-fork
Conflicts: app/contexts/filter_context.rb app/contexts/search_context.rb app/models/merge_request.rb app/models/note.rb app/views/shared/_merge_requests.html.haml spec/controllers/commit_controller_spec.rb spec/services/notification_service_spec.rb
Diffstat (limited to 'app/views/shared')
-rw-r--r--app/views/shared/_filter.html.haml29
-rw-r--r--app/views/shared/_issues.html.haml15
-rw-r--r--app/views/shared/_merge_requests.html.haml3
3 files changed, 45 insertions, 2 deletions
diff --git a/app/views/shared/_filter.html.haml b/app/views/shared/_filter.html.haml
new file mode 100644
index 00000000000..fc3232e0e0e
--- /dev/null
+++ b/app/views/shared/_filter.html.haml
@@ -0,0 +1,29 @@
+= form_tag filter_path(entity), method: 'get' do
+ %fieldset
+ %ul.nav.nav-pills.nav-stacked
+ %li{class: ("active" if params[:status].blank?)}
+ = link_to filter_path(entity, status: nil) do
+ Open
+ %li{class: ("active" if params[:status] == 'closed')}
+ = link_to filter_path(entity, status: 'closed') do
+ Closed
+ %li{class: ("active" if params[:status] == 'all')}
+ = link_to filter_path(entity, status: 'all') do
+ All
+
+ %fieldset
+ %legend Projects:
+ %ul.nav.nav-pills.nav-pills-small.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 filter_path(entity, project_id: project.id) do
+ = project.name_with_namespace
+ %small.pull-right= entities_per_project(project, entity)
+
+ %fieldset
+ - if params[:status].present? || params[:project_id].present?
+ = link_to filter_path(entity, status: nil, project_id: nil), class: 'pull-right cgray' do
+ %i.icon-remove
+ Clear filter
+
diff --git a/app/views/shared/_issues.html.haml b/app/views/shared/_issues.html.haml
new file mode 100644
index 00000000000..6f4852d8785
--- /dev/null
+++ b/app/views/shared/_issues.html.haml
@@ -0,0 +1,15 @@
+- if @issues.any?
+ - @issues.group_by(&:project).each do |group|
+ .ui-box.small-box
+ - project = group[0]
+ .title
+ = link_to_project project
+ = link_to 'show all', project_issues_path(project), class: 'pull-right'
+
+ %ul.well-list.issues-list
+ - group[1].each do |issue|
+ = render 'projects/issues/issue', issue: issue
+ = paginate @issues, theme: "gitlab"
+- else
+ %p.nothing_here_message Nothing to show here
+
diff --git a/app/views/shared/_merge_requests.html.haml b/app/views/shared/_merge_requests.html.haml
index 5276f4bae31..4be445e6a32 100644
--- a/app/views/shared/_merge_requests.html.haml
+++ b/app/views/shared/_merge_requests.html.haml
@@ -1,13 +1,12 @@
- if @merge_requests.any?
- @merge_requests.group_by(&:target_project).each do |group|
- .ui-box
+ .ui-box.small-box
- project = group[0]
.title
= link_to_project project
%ul.well-list.mr-list
- group[1].each do |merge_request|
= render 'projects/merge_requests/merge_request', merge_request: merge_request
- %hr
= paginate @merge_requests, theme: "gitlab"
- else