Commit 666861f8ffdcea5c1a708c27aa2baf916ef80913

Authored by Dmitriy Zaporozhets
1 parent ec630ffc

More compact issues page

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
app/assets/stylesheets/sections/issues.scss
... ... @@ -109,3 +109,13 @@ input.check_all_issues {
109 109 text-shadow: none;
110 110 }
111 111 }
  112 +
  113 +.issue-search-form {
  114 + margin: 0;
  115 + height: 24px;
  116 +
  117 + .issue_search {
  118 + border: 1px solid #DDD !important;
  119 + background-color: #f4f4f4;
  120 + }
  121 +}
... ...
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)
... ...