summaryrefslogtreecommitdiff
path: root/app/views/issues
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-04-06 22:32:23 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-04-06 22:32:23 +0300
commit9fddd5b440105376caf913e1c09756ec2aaf4431 (patch)
tree379737edf3ae01ccfcafadcc26feee7293f5e7c8 /app/views/issues
parent52ad34fd59273e1f65ab1726a97ead7f13095c84 (diff)
downloadgitlab-ce-9fddd5b440105376caf913e1c09756ec2aaf4431.tar.gz
Refactoring & restyle pagination:
- remove admin kaminari theme. Use gitlab theme everywhere - use bootstrap styled for gitlab admin themes - dont reload page when change issue filter
Diffstat (limited to 'app/views/issues')
-rw-r--r--app/views/issues/_issues.html.haml39
-rw-r--r--app/views/issues/index.html.haml26
-rw-r--r--app/views/issues/index.js.haml4
3 files changed, 35 insertions, 34 deletions
diff --git a/app/views/issues/_issues.html.haml b/app/views/issues/_issues.html.haml
index dc7db9061ac..217956d7284 100644
--- a/app/views/issues/_issues.html.haml
+++ b/app/views/issues/_issues.html.haml
@@ -1,12 +1,33 @@
-= render @issues
+.ui-box
+ .title
+ = check_box_tag "check_all_issues", nil, false, class: "check_all_issues left"
+ .clearfix
+ .issues_bulk_update.hide
+ = form_tag bulk_update_project_issues_path(@project), method: :post do
+ %span.update_issues_text Update selected issues with &nbsp;
+ .left
+ = select_tag('update[status]', options_for_select(['open', 'closed']), prompt: "Status")
+ = select_tag('update[assignee_id]', options_from_collection_for_select(@project.users.all, "id", "name", params[:assignee_id]), prompt: "Assignee")
+ = select_tag('update[milestone_id]', options_from_collection_for_select(issues_active_milestones, "id", "title", params[:milestone_id]), prompt: "Milestone")
+ = hidden_field_tag 'update[issues_ids]', []
+ = hidden_field_tag :status, params[:status]
+ = button_tag "Save", class: "btn update_selected_issues btn-small btn-save"
+ .issues_filters
+ = form_tag project_issues_path(@project), method: :get, remote: true do
+ = select_tag(:label_name, options_for_select(issue_tags, params[:label_name]), prompt: "Labels")
+ = select_tag(:assignee_id, options_from_collection_for_select([unassigned_filter] + @project.users.all, "id", "name", params[:assignee_id]), prompt: "Assignee")
+ = select_tag(:milestone_id, options_from_collection_for_select([unassigned_filter] + issues_active_milestones, "id", "title", params[:milestone_id]), prompt: "Milestone")
+ = hidden_field_tag :status, params[:status]
+
+ %ul.well-list.issues-list
+ = render @issues
+ - if @issues.blank?
+ %li
+ %h4.nothing_here_message Nothing to show here
- if @issues.present?
- %li.bottom
- .left= paginate @issues, remote: true, theme: "gitlab"
- .pull-right
- %span.issue_counter #{@issues.total_count}
- issues for this filter
-- else
- %li
- %h4.nothing_here_message Nothing to show here
+ .pull-right
+ %span.issue_counter #{@issues.total_count}
+ issues for this filter
+ = paginate @issues, remote: true, theme: "gitlab"
diff --git a/app/views/issues/index.html.haml b/app/views/issues/index.html.haml
index 2e26ee72281..78b677899d4 100644
--- a/app/views/issues/index.html.haml
+++ b/app/views/issues/index.html.haml
@@ -19,30 +19,8 @@
.row
.span3
= render 'filter', entity: 'issue'
- .span9
- %div#issues-table-holder.ui-box
- .title
- = check_box_tag "check_all_issues", nil, false, class: "check_all_issues left"
- .clearfix
- .issues_bulk_update.hide
- = form_tag bulk_update_project_issues_path(@project), method: :post do
- %span.update_issues_text Update selected issues with &nbsp;
- .left
- = select_tag('update[status]', options_for_select(['open', 'closed']), prompt: "Status")
- = select_tag('update[assignee_id]', options_from_collection_for_select(@project.users.all, "id", "name", params[:assignee_id]), prompt: "Assignee")
- = select_tag('update[milestone_id]', options_from_collection_for_select(issues_active_milestones, "id", "title", params[:milestone_id]), prompt: "Milestone")
- = hidden_field_tag 'update[issues_ids]', []
- = hidden_field_tag :status, params[:status]
- = button_tag "Save", class: "btn update_selected_issues btn-small btn-save"
- .issues_filters
- = form_tag project_issues_path(@project), method: :get do
- = select_tag(:label_name, options_for_select(issue_tags, params[:label_name]), prompt: "Labels")
- = select_tag(:assignee_id, options_from_collection_for_select([unassigned_filter] + @project.users.all, "id", "name", params[:assignee_id]), prompt: "Assignee")
- = select_tag(:milestone_id, options_from_collection_for_select([unassigned_filter] + issues_active_milestones, "id", "title", params[:milestone_id]), prompt: "Milestone")
- = hidden_field_tag :status, params[:status]
-
- %ul#issues-table.well-list.issues-list
- = render "issues"
+ .span9.issues-holder
+ = render "issues"
:javascript
$(function(){
diff --git a/app/views/issues/index.js.haml b/app/views/issues/index.js.haml
index 48d7f582be2..dc77be13f27 100644
--- a/app/views/issues/index.js.haml
+++ b/app/views/issues/index.js.haml
@@ -1,2 +1,4 @@
:plain
- $('#issues-table').html("#{escape_javascript(render('issues'))}");
+ $('.issues-holder').html("#{escape_javascript(render('issues'))}");
+ History.replaceState({path: "#{request.url}"}, document.title, "#{request.url}");
+ issuesPage();