Commit 60f083ad619731e1c959aa5ec15a0469a557b0da
1 parent
c07d3dfc
Exists in
master
and in
4 other branches
issues table header
Showing
4 changed files
with
32 additions
and
53 deletions
Show diff stats
app/views/issues/_issues.html.haml
| 1 | -%table.round-borders#issues-table | ||
| 2 | - %thead | ||
| 3 | - %th Issues | 1 | +- @issues.critical.each do |issue| |
| 2 | + = render(:partial => 'show', :locals => {:issue => issue}) | ||
| 4 | 3 | ||
| 5 | - - @issues.critical.each do |issue| | ||
| 6 | - = render(:partial => 'show', :locals => {:issue => issue}) | ||
| 7 | - | ||
| 8 | - - @issues.non_critical.each do |issue| | ||
| 9 | - = render(:partial => 'show', :locals => {:issue => issue}) | 4 | +- @issues.non_critical.each do |issue| |
| 5 | + = render(:partial => 'show', :locals => {:issue => issue}) |
app/views/issues/_show.html.haml
| @@ -27,23 +27,3 @@ | @@ -27,23 +27,3 @@ | ||
| 27 | = link_to 'Edit', edit_project_issue_path(@project, issue), :class => "cgray", :remote => true | 27 | = link_to 'Edit', edit_project_issue_path(@project, issue), :class => "cgray", :remote => true |
| 28 | - if can?(current_user, :admin_issue, @project) || issue.author == current_user | 28 | - if can?(current_user, :admin_issue, @project) || issue.author == current_user |
| 29 | = link_to 'Destroy', [@project, issue], :confirm => 'Are you sure?', :method => :delete, :remote => true, :class => "cred delete-issue negative", :id => "destroy_issue_#{issue.id}" | 29 | = link_to 'Destroy', [@project, issue], :confirm => 'Are you sure?', :method => :delete, :remote => true, :class => "cred delete-issue negative", :id => "destroy_issue_#{issue.id}" |
| 30 | - -#%td ##{issue.id} | ||
| 31 | - -#%td | ||
| 32 | - = truncate(html_escape(issue.title), :length => 200) | ||
| 33 | - %br | ||
| 34 | - %br | ||
| 35 | - | ||
| 36 | - | ||
| 37 | - -#- if issue.author == current_user | ||
| 38 | - -#%span.tag.yours yours | ||
| 39 | - -#- if issue.notes.count > 0 | ||
| 40 | - -#%span.tag.notes | ||
| 41 | - -#= issue.notes.count | ||
| 42 | - -#notes | ||
| 43 | - -#%td | ||
| 44 | - - if can? current_user, :write_issue, @project | ||
| 45 | - = form_for([@project, issue], :remote => true) do |f| | ||
| 46 | - = f.check_box :closed, :onclick => "$(this).parent().submit();" | ||
| 47 | - = hidden_field_tag :status_only, true | ||
| 48 | - - else | ||
| 49 | - = check_box_tag "closed", 1, issue.closed, :disabled => true |
app/views/issues/index.html.haml
| 1 | -%div | ||
| 2 | - .top_panel_issues | ||
| 3 | - - if can? current_user, :write_issue, @project | ||
| 4 | - %div{:class => "left", :style => "margin-right: 10px;" } | ||
| 5 | - = link_to 'New Issue', new_project_issue_path(@project), :remote => true, :class => "lbutton vm" | ||
| 6 | - = form_tag search_project_issues_path(@project), :method => :get, :remote => true, :class => :left, :id => "issue_search_form" do | ||
| 7 | - = hidden_field_tag :project_id, @project.id, { :id => 'project_id' } | ||
| 8 | - = search_field_tag :issue_search, nil, { :placeholder => 'Search', :class => 'issue_search' } | 1 | +%div#issues-table-holder |
| 2 | + %table.round-borders#issues-table | ||
| 3 | + %thead | ||
| 4 | + %th | ||
| 5 | + .top_panel_issues | ||
| 6 | + - if can? current_user, :write_issue, @project | ||
| 7 | + %div{:class => "left", :style => "margin-right: 10px;" } | ||
| 8 | + = link_to 'New Issue', new_project_issue_path(@project), :remote => true, :class => "lbutton vm" | ||
| 9 | + = form_tag search_project_issues_path(@project), :method => :get, :remote => true, :class => :left, :id => "issue_search_form" do | ||
| 10 | + = hidden_field_tag :project_id, @project.id, { :id => 'project_id' } | ||
| 11 | + = search_field_tag :issue_search, nil, { :placeholder => 'Search', :class => 'issue_search' } | ||
| 9 | 12 | ||
| 10 | - .right.issues_filter | ||
| 11 | - = form_tag project_issues_path(@project), :method => :get do | ||
| 12 | - .left | ||
| 13 | - = radio_button_tag :f, 0, (params[:f] || "0") == "0", :onclick => "this.form.submit()", :id => "open_issues", :class => "status" | ||
| 14 | - = label_tag "open_issues","Open" | ||
| 15 | - .left | ||
| 16 | - = radio_button_tag :f, 2, params[:f] == "2", :onclick => "this.form.submit()", :id => "closed_issues", :class => "status" | ||
| 17 | - = label_tag "closed_issues","Closed" | ||
| 18 | - .left | ||
| 19 | - = radio_button_tag :f, 3, params[:f] == "3", :onclick => "this.form.submit()", :id => "my_issues", :class => "status" | ||
| 20 | - = label_tag "my_issues","To Me" | ||
| 21 | - .left | ||
| 22 | - = radio_button_tag :f, 1, params[:f] == "1", :onclick => "this.form.submit()", :id => "all_issues", :class => "status" | ||
| 23 | - = label_tag "all_issues","All" | 13 | + .right.issues_filter |
| 14 | + = form_tag project_issues_path(@project), :method => :get do | ||
| 15 | + .left | ||
| 16 | + = radio_button_tag :f, 0, (params[:f] || "0") == "0", :onclick => "this.form.submit()", :id => "open_issues", :class => "status" | ||
| 17 | + = label_tag "open_issues","Open" | ||
| 18 | + .left | ||
| 19 | + = radio_button_tag :f, 2, params[:f] == "2", :onclick => "this.form.submit()", :id => "closed_issues", :class => "status" | ||
| 20 | + = label_tag "closed_issues","Closed" | ||
| 21 | + .left | ||
| 22 | + = radio_button_tag :f, 3, params[:f] == "3", :onclick => "this.form.submit()", :id => "my_issues", :class => "status" | ||
| 23 | + = label_tag "my_issues","To Me" | ||
| 24 | + .left | ||
| 25 | + = radio_button_tag :f, 1, params[:f] == "1", :onclick => "this.form.submit()", :id => "all_issues", :class => "status" | ||
| 26 | + = label_tag "all_issues","All" | ||
| 24 | 27 | ||
| 25 | - #issues-table-holder= render "issues" | 28 | + = render "issues" |
| 26 | %br | 29 | %br |
| 27 | :javascript | 30 | :javascript |
| 28 | var href = $('.issue_search').parent().attr('action'); | 31 | var href = $('.issue_search').parent().attr('action'); |
| @@ -37,7 +40,7 @@ | @@ -37,7 +40,7 @@ | ||
| 37 | 40 | ||
| 38 | if (terms.length >= 2 || terms.length == 0) { | 41 | if (terms.length >= 2 || terms.length == 0) { |
| 39 | $.get(href, { 'status': status, 'terms': terms, project: project_id }, function(response) { | 42 | $.get(href, { 'status': status, 'terms': terms, project: project_id }, function(response) { |
| 40 | - $('#issues-table').html(response); | 43 | + $('#issues-table tbody').html(response); |
| 41 | setSortable(); | 44 | setSortable(); |
| 42 | }); | 45 | }); |
| 43 | } | 46 | } |
app/views/issues/index.js.haml