diff options
author | Riyad Preukschas <riyad@informatik.uni-bremen.de> | 2013-01-15 03:52:25 +0400 |
---|---|---|
committer | Riyad Preukschas <riyad@informatik.uni-bremen.de> | 2013-01-15 03:52:25 +0400 |
commit | 30227869482bbbdbfea153f2b45ef3bb9a9fd218 (patch) | |
tree | aff64071116447092751770d2896998f62d1b44a /app/views/issues | |
parent | 8ee5fce9d64b70d8981896457484fae622d142c9 (diff) | |
parent | aca0caa8cc1a6bd481f87dd810284e69d3747050 (diff) |
Merge commit 'master' into discussions
Conflicts:
app/assets/stylesheets/sections/notes.scss
app/contexts/notes/load_context.rb
app/models/project.rb
app/observers/note_observer.rb
app/roles/votes.rb
app/views/commit/show.html.haml
app/views/merge_requests/_show.html.haml
app/views/merge_requests/diffs.js.haml
app/views/merge_requests/show.js.haml
app/views/notes/_note.html.haml
features/steps/project/project_merge_requests.rb
spec/models/note_spec.rb
Diffstat (limited to 'app/views/issues')
-rw-r--r-- | app/views/issues/_filter.html.haml | 20 | ||||
-rw-r--r-- | app/views/issues/_form.html.haml | 31 | ||||
-rw-r--r-- | app/views/issues/_issues.html.haml | 10 | ||||
-rw-r--r-- | app/views/issues/_show.html.haml | 9 | ||||
-rw-r--r-- | app/views/issues/index.html.haml | 70 | ||||
-rw-r--r-- | app/views/issues/show.html.haml | 10 |
6 files changed, 78 insertions, 72 deletions
diff --git a/app/views/issues/_filter.html.haml b/app/views/issues/_filter.html.haml new file mode 100644 index 00000000000..9b710a71772 --- /dev/null +++ b/app/views/issues/_filter.html.haml @@ -0,0 +1,20 @@ += form_tag project_issues_path(@project), method: 'get' do + %fieldset + %ul.nav.nav-pills.nav-stacked + %li{class: ("active" if !params[:status])} + = link_to project_issues_path(@project, status: nil) do + Open + %li{class: ("active" if params[:status] == 'to_me')} + = link_to project_issues_path(@project, status: 'to_me') do + Assigned To Me + %li{class: ("active" if params[:status] == 'closed')} + = link_to project_issues_path(@project, status: 'closed') do + Closed + %li{class: ("active" if params[:status] == 'all')} + = link_to project_issues_path(@project, status: 'all') do + All + + %fieldset + %hr + = link_to "Reset", project_issues_path(@project), class: 'btn right' + diff --git a/app/views/issues/_form.html.haml b/app/views/issues/_form.html.haml index 030f797c088..bef235f2dea 100644 --- a/app/views/issues/_form.html.haml +++ b/app/views/issues/_form.html.haml @@ -6,26 +6,27 @@ - @issue.errors.full_messages.each do |msg| %span= msg %br - .issue_form_box - .issue_title + .ui-box.ui-box-show + .ui-box-head .clearfix = f.label :title do %strong= "Subject *" .input = f.text_field :title, maxlength: 255, class: "xxlarge js-gfm-input", autofocus: true, required: true - .issue_middle_block - .issue_assignee - = f.label :assignee_id do - %i.icon-user - Assign to - .input= f.select(:assignee_id, @project.users.all.collect {|p| [ p.name, p.id ] }, { include_blank: "Select a user" }, {class: 'chosen'}) - .issue_milestone - = f.label :milestone_id do - %i.icon-time - Milestone - .input= f.select(:milestone_id, @project.milestones.active.all.collect {|p| [ p.title, p.id ] }, { include_blank: "Select milestone" }, {class: 'chosen'}) + .ui-box-body + .clearfix + .issue_assignee.pull-left + = f.label :assignee_id do + %i.icon-user + Assign to + .input= f.select(:assignee_id, @project.users.all.collect {|p| [ p.name, p.id ] }, { include_blank: "Select a user" }, {class: 'chosen'}) + .issue_milestone.pull-left + = f.label :milestone_id do + %i.icon-time + Milestone + .input= f.select(:milestone_id, @project.milestones.active.all.collect {|p| [ p.title, p.id ] }, { include_blank: "Select milestone" }, {class: 'chosen'}) - .issue_description + .ui-box-bottom .clearfix = f.label :label_list do %i.icon-tag @@ -43,7 +44,7 @@ .actions - if @issue.new_record? - = f.submit 'Submit new issue', class: "btn save-btn" + = f.submit 'Submit new issue', class: "btn success" -else = f.submit 'Save changes', class: "save-btn btn" diff --git a/app/views/issues/_issues.html.haml b/app/views/issues/_issues.html.haml index d7ba4300ce7..8821dbb8d98 100644 --- a/app/views/issues/_issues.html.haml +++ b/app/views/issues/_issues.html.haml @@ -3,12 +3,10 @@ - if @issues.present? %li.bottom - .row - .span7= paginate @issues, remote: true, theme: "gitlab" - .span3.right - %span.cgray.right - %span.issue_counter #{@issues.total_count} - issues for this filter + .left= paginate @issues, remote: true, theme: "gitlab" + .right + %span.issue_counter #{@issues.total_count} + issues for this filter - else %li %h4.nothing_here_message Nothing to show here diff --git a/app/views/issues/_show.html.haml b/app/views/issues/_show.html.haml index 4641e8bdc63..dcef901c15f 100644 --- a/app/views/issues/_show.html.haml +++ b/app/views/issues/_show.html.haml @@ -3,10 +3,6 @@ .issue_check = check_box_tag dom_id(issue,"selected"), nil, false, 'data-id' => issue.id, class: "selected_issue", disabled: !can?(current_user, :modify_issue, issue) .right - - issue.labels.each do |label| - %span.label.label-tag.grouped - %i.icon-tag - = label.name - if issue.notes.any? %span.btn.small.disabled.grouped %i.icon-comment @@ -36,3 +32,8 @@ - if issue.votes_count > 0 = render 'votes/votes_inline', votable: issue + %span + - issue.labels.each do |label| + %span.label + %i.icon-tag + = label.name diff --git a/app/views/issues/index.html.haml b/app/views/issues/index.html.haml index 08d4393b201..d5c29c780ce 100644 --- a/app/views/issues/index.html.haml +++ b/app/views/issues/index.html.haml @@ -2,61 +2,47 @@ .issues_content %h3.page_title Issues - %small (<span class=issue_counter>#{@issues.total_count}</span>) + %span (<span class=issue_counter>#{@issues.total_count}</span>) .right .span5 - if can? current_user, :write_issue, @project - = link_to new_project_issue_path(@project, issue: { assignee_id: params[:assignee_id], milestone_id: params[:milestone_id]}), class: "right btn", title: "New Issue", id: "new_issue_link" do + = link_to new_project_issue_path(@project, issue: { assignee_id: params[:assignee_id], milestone_id: params[:milestone_id]}), class: "right btn primary", title: "New Issue", id: "new_issue_link" do %i.icon-plus New Issue = form_tag search_project_issues_path(@project), method: :get, remote: true, id: "issue_search_form", class: :right do = hidden_field_tag :project_id, @project.id, { id: 'project_id' } - = hidden_field_tag :status, params[:f] + = hidden_field_tag :status, params[:status] = search_field_tag :issue_search, nil, { placeholder: 'Search', class: 'issue_search span3 right neib search-text-input' } .clearfix - %div#issues-table-holder.ui-box - .title - = check_box_tag "check_all_issues", nil, false, class: "check_all_issues left" - - - .issues_bulk_update.hide - = form_tag bulk_update_project_issues_path(@project), method: :post do - %span.update_issues_text Update selected issues with - .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 :f, params[:f] - = button_tag "Save", class: "btn update_selected_issues" - .issues_filters - .left - %ul.nav.nav-pills.left - %li{class: ("active" if (params[:f] == issues_filter[:open] || !params[:f]))} - = link_to project_issues_path(@project, f: issues_filter[:open], milestone_id: params[:milestone_id]) do - Open - %li{class: ("active" if params[:f] == issues_filter[:closed])} - = link_to project_issues_path(@project, f: issues_filter[:closed], milestone_id: params[:milestone_id]) do - Closed - %li{class: ("active" if params[:f] == issues_filter[:to_me])} - = link_to project_issues_path(@project, f: issues_filter[:to_me], milestone_id: params[:milestone_id]) do - To Me - %li{class: ("active" if params[:f] == issues_filter[:all])} - = link_to project_issues_path(@project, f: issues_filter[:all], milestone_id: params[:milestone_id]) do - All - - .right - = form_tag project_issues_path(@project), method: :get, class: :right 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 :f, params[:f] +.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 + .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 save-btn" + .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_table - = render "issues" + %ul#issues-table.well-list.issues_table + = render "issues" :javascript $(function(){ diff --git a/app/views/issues/show.html.haml b/app/views/issues/show.html.haml index b1014edc6c5..55fc0aee0df 100644 --- a/app/views/issues/show.html.haml +++ b/app/views/issues/show.html.haml @@ -24,14 +24,14 @@ ← To issues list -.main_box - .top_box_content +.ui-box.ui-box-show + .ui-box-head %h4.box-title - if @issue.closed .error.status_info Closed = gfm escape_once(@issue.title) - .middle_box_content + .ui-box-body %cite.cgray Created by #{link_to_member(@project, @issue.author)} - if @issue.assignee @@ -44,13 +44,13 @@ .right - @issue.labels.each do |label| - %span.label.label-issue + %span.label %i.icon-tag = label.name - if @issue.description.present? - .bottom_box_content + .ui-box-bottom = preserve do = markdown @issue.description |