Commit 666861f8ffdcea5c1a708c27aa2baf916ef80913
1 parent
ec630ffc
Exists in
master
and in
4 other branches
More compact issues page
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Showing
3 changed files
with
32 additions
and
21 deletions
Show diff stats
app/assets/stylesheets/sections/issues.scss
app/views/projects/issues/_head.html.haml
1 | 1 | %ul.nav.nav-tabs |
2 | 2 | = nav_link(controller: :issues) do |
3 | - = link_to 'Browse Issues', project_issues_path(@project), class: "tab" | |
3 | + = link_to project_issues_path(@project), class: "tab" do | |
4 | + Browse Issues | |
5 | + - if current_controller?(:issues) | |
6 | + %span.badge.issue_counter #{@issues.total_count} | |
4 | 7 | = nav_link(controller: :milestones) do |
5 | 8 | = link_to 'Milestones', project_milestones_path(@project), class: "tab" |
6 | 9 | = nav_link(controller: :labels) do |
7 | 10 | = link_to 'Labels', project_labels_path(@project), class: "tab" |
8 | - - if current_user | |
11 | + | |
12 | + - if current_controller?(:issues) | |
13 | + - if current_user | |
14 | + %li | |
15 | + = link_to project_issues_path(@project, :atom, { private_token: current_user.private_token }) do | |
16 | + %i.icon-rss | |
17 | + | |
9 | 18 | %li.pull-right |
10 | - = link_to project_issues_path(@project, :atom, { private_token: current_user.private_token }) do | |
11 | - %i.icon-rss | |
19 | + .pull-right | |
20 | + - if can? current_user, :write_issue, @project | |
21 | + = link_to new_project_issue_path(@project, issue: { assignee_id: params[:assignee_id], milestone_id: params[:milestone_id]}), class: "btn btn-new pull-right", title: "New Issue", id: "new_issue_link" do | |
22 | + %i.icon-plus | |
23 | + New Issue | |
24 | + = form_tag project_issues_path(@project), method: :get, remote: true, id: "issue_search_form", class: 'pull-right issue-search-form' do | |
25 | + = hidden_field_tag :status, params[:status], id: 'search_status' | |
26 | + = hidden_field_tag :assignee_id, params[:assignee_id], id: 'search_assignee_id' | |
27 | + = hidden_field_tag :milestone_id, params[:milestone_id], id: 'search_milestone_id' | |
28 | + = hidden_field_tag :label_name, params[:label_name], id: 'search_label_name' | |
29 | + = search_field_tag :issue_search, nil, { placeholder: 'Filter by title or description', class: 'input-xpadding issue_search input-xlarge append-right-10 search-text-input' } | ... | ... |
app/views/projects/issues/index.html.haml
1 | 1 | = render "head" |
2 | -.issues_content | |
3 | - %h3.page-title | |
4 | - Issues | |
5 | - %span (<span class=issue_counter>#{@issues.total_count}</span>) | |
6 | - .pull-right | |
7 | - .span6 | |
8 | - - if can? current_user, :write_issue, @project | |
9 | - = link_to new_project_issue_path(@project, issue: { assignee_id: params[:assignee_id], milestone_id: params[:milestone_id]}), class: "btn btn-new pull-right", title: "New Issue", id: "new_issue_link" do | |
10 | - %i.icon-plus | |
11 | - New Issue | |
12 | - = form_tag project_issues_path(@project), method: :get, remote: true, id: "issue_search_form", class: 'pull-right' do | |
13 | - = hidden_field_tag :status, params[:status], id: 'search_status' | |
14 | - = hidden_field_tag :assignee_id, params[:assignee_id], id: 'search_assignee_id' | |
15 | - = hidden_field_tag :milestone_id, params[:milestone_id], id: 'search_milestone_id' | |
16 | - = hidden_field_tag :label_name, params[:label_name], id: 'search_label_name' | |
17 | - = search_field_tag :issue_search, nil, { placeholder: 'Filter by title or description', class: 'input-xpadding issue_search input-xlarge append-right-10 search-text-input' } | |
18 | - | |
19 | 2 | .row |
20 | 3 | .span3 |
21 | 4 | = render 'shared/project_filter', project_entities_path: project_issues_path(@project) | ... | ... |