diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-06-23 20:47:22 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-06-23 20:47:22 +0400 |
commit | 2ed7cbfba4ff3c6a4cf3e72515a0375544998de0 (patch) | |
tree | ae6d7530745c80633cd993c99f7820e1452f3e1b /app/views/issues | |
parent | 95791316f4037273af7b747ce1851d5f4e46933f (diff) |
Move projects controllers/views in Projects module
Diffstat (limited to 'app/views/issues')
-rw-r--r-- | app/views/issues/_filter.html.haml | 23 | ||||
-rw-r--r-- | app/views/issues/_form.html.haml | 95 | ||||
-rw-r--r-- | app/views/issues/_head.html.haml | 10 | ||||
-rw-r--r-- | app/views/issues/_issue.html.haml | 44 | ||||
-rw-r--r-- | app/views/issues/_issues.html.haml | 94 | ||||
-rw-r--r-- | app/views/issues/edit.html.haml | 1 | ||||
-rw-r--r-- | app/views/issues/index.atom.builder | 23 | ||||
-rw-r--r-- | app/views/issues/index.html.haml | 25 | ||||
-rw-r--r-- | app/views/issues/index.js.haml | 4 | ||||
-rw-r--r-- | app/views/issues/new.html.haml | 1 | ||||
-rw-r--r-- | app/views/issues/show.html.haml | 68 | ||||
-rw-r--r-- | app/views/issues/update.js.haml | 4 |
12 files changed, 0 insertions, 392 deletions
diff --git a/app/views/issues/_filter.html.haml b/app/views/issues/_filter.html.haml deleted file mode 100644 index 8495c323cb8..00000000000 --- a/app/views/issues/_filter.html.haml +++ /dev/null @@ -1,23 +0,0 @@ -= form_tag project_issues_path(@project), method: 'get' do - %fieldset - %ul.nav.nav-pills.nav-stacked - %li{class: ("active" if !params[:status] || params[:status].blank?)} - = link_to project_issues_path(@project, status: nil) do - Open - %li{class: ("active" if params[:status] == 'assigned-to-me')} - = link_to project_issues_path(@project, status: 'assigned-to-me') do - Assigned to me - %li{class: ("active" if params[:status] == 'created-by-me')} - = link_to project_issues_path(@project, status: 'created-by-me') do - Created by 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 pull-right' - diff --git a/app/views/issues/_form.html.haml b/app/views/issues/_form.html.haml deleted file mode 100644 index 38aea6f06dc..00000000000 --- a/app/views/issues/_form.html.haml +++ /dev/null @@ -1,95 +0,0 @@ -%div.issue-form-holder - %h3.page_title= @issue.new_record? ? "New Issue" : "Edit Issue ##{@issue.id}" - = form_for [@project, @issue] do |f| - -if @issue.errors.any? - .alert.alert-error - - @issue.errors.full_messages.each do |msg| - %span= msg - %br - .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 - .ui-box-body - .clearfix - .issue_assignee.pull-left - = f.label :assignee_id do - %i.icon-user - Assign to - .input - .pull-left - = f.select(:assignee_id, @project.team.members.sort_by(&:name).map {|p| [ p.name, p.id ] }, { include_blank: "Select a user" }, {class: 'chosen'}) - .pull-right - - = link_to 'Assign to me', '#', class: 'btn btn-small assign-to-me-link' - .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'}) - - .ui-box-bottom - .clearfix - = f.label :label_list do - %i.icon-tag - Labels - .input - = f.text_field :label_list, maxlength: 2000, class: "xxlarge" - %p.hint Separate with comma. - - .clearfix - = f.label :description, "Details" - .input - = f.text_area :description, class: "xxlarge js-gfm-input", rows: 14 - %p.hint Issues are parsed with #{link_to "GitLab Flavored Markdown", help_markdown_path, target: '_blank'}. - - - .actions - - if @issue.new_record? - = f.submit 'Submit new issue', class: "btn btn-create" - -else - = f.submit 'Save changes', class: "btn-save btn" - - - cancel_path = @issue.new_record? ? project_issues_path(@project) : project_issue_path(@project, @issue) - = link_to "Cancel", cancel_path, class: 'btn btn-cancel' - - - - -:javascript - $("#issue_label_list") - .bind( "keydown", function( event ) { - if ( event.keyCode === $.ui.keyCode.TAB && - $( this ).data( "autocomplete" ).menu.active ) { - event.preventDefault(); - } - }) - .bind( "click", function( event ) { - $( this ).autocomplete("search", ""); - }) - .autocomplete({ - minLength: 0, - source: function( request, response ) { - response( $.ui.autocomplete.filter( - #{raw labels_autocomplete_source}, extractLast( request.term ) ) ); - }, - focus: function() { - return false; - }, - select: function(event, ui) { - var terms = split( this.value ); - terms.pop(); - terms.push( ui.item.value ); - terms.push( "" ); - this.value = terms.join( ", " ); - return false; - } - }); - - $('.assign-to-me-link').on('click', function(e){ - $('#issue_assignee_id').val("#{current_user.id}").trigger("liszt:updated"); - e.preventDefault(); - }); diff --git a/app/views/issues/_head.html.haml b/app/views/issues/_head.html.haml deleted file mode 100644 index 44d14d5cdf9..00000000000 --- a/app/views/issues/_head.html.haml +++ /dev/null @@ -1,10 +0,0 @@ -%ul.nav.nav-tabs - = nav_link(controller: :issues) do - = link_to 'Browse Issues', project_issues_path(@project), class: "tab" - = nav_link(controller: :milestones) do - = link_to 'Milestones', project_milestones_path(@project), class: "tab" - = nav_link(controller: :labels) do - = link_to 'Labels', project_labels_path(@project), class: "tab" - %li.pull-right - = link_to project_issues_path(@project, :atom, { private_token: current_user.private_token }) do - %i.icon-rss diff --git a/app/views/issues/_issue.html.haml b/app/views/issues/_issue.html.haml deleted file mode 100644 index f44c0a6c81f..00000000000 --- a/app/views/issues/_issue.html.haml +++ /dev/null @@ -1,44 +0,0 @@ -%li{ id: dom_id(issue), class: issue_css_classes(issue), url: project_issue_path(issue.project, issue) } - - if controller.controller_name == 'issues' - .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) - - .issue-title - %span.light= "##{issue.id}" - = link_to_gfm truncate(issue.title, length: 100), project_issue_path(issue.project, issue), class: "row_title" - - .issue-info - - if issue.assignee - assigned to #{link_to_member(@project, issue.assignee)} - - else - unassigned - - if issue.votes_count > 0 - = render 'votes/votes_inline', votable: issue - - if issue.notes.any? - %span - %i.icon-comments - = issue.notes.count - - if issue.milestone_id? - %span - %i.icon-time - = issue.milestone.title - .pull-right - %small updated #{time_ago_in_words(issue.updated_at)} ago - - .issue-labels - - issue.labels.each do |label| - %span{class: "label #{label_css_class(label.name)}"} - %i.icon-tag - = label.name - - .issue-actions - - if can? current_user, :modify_issue, issue - - if issue.closed? - = link_to 'Reopen', project_issue_path(issue.project, issue, issue: {state_event: :reopen }, status_only: true), method: :put, class: "btn btn-small grouped reopen_issue", remote: true - - else - = link_to 'Close', project_issue_path(issue.project, issue, issue: {state_event: :close }, status_only: true), method: :put, class: "btn btn-small grouped close_issue", remote: true - = link_to edit_project_issue_path(issue.project, issue), class: "btn btn-small edit-issue-link grouped" do - %i.icon-edit - Edit - - diff --git a/app/views/issues/_issues.html.haml b/app/views/issues/_issues.html.haml deleted file mode 100644 index 68598684f90..00000000000 --- a/app/views/issues/_issues.html.haml +++ /dev/null @@ -1,94 +0,0 @@ -.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.team.members, "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 - %span Filter by - .dropdown.inline.prepend-left-10 - %a.dropdown-toggle.btn.btn-small{href: '#', "data-toggle" => "dropdown"} - %i.icon-tags - %span.light labels: - - if params[:label_name].present? - %strong= params[:label_name] - - else - Any - %b.caret - %ul.dropdown-menu - %li - = link_to project_issues_with_filter_path(@project, label_name: nil) do - Any - - issue_label_names.each do |label_name| - %li - = link_to project_issues_with_filter_path(@project, label_name: label_name) do - %span{class: "label #{label_css_class(label_name)}"} - %i.icon-tag - = label_name - .dropdown.inline.prepend-left-10 - %a.dropdown-toggle.btn.btn-small{href: '#', "data-toggle" => "dropdown"} - %i.icon-user - %span.light assignee: - - if @assignee.present? - %strong= @assignee.name - - elsif params[:assignee_id] == "0" - Unassigned - - else - Any - %b.caret - %ul.dropdown-menu - %li - = link_to project_issues_with_filter_path(@project, assignee_id: nil) do - Any - = link_to project_issues_with_filter_path(@project, assignee_id: 0) do - Unassigned - - @project.team.members.sort_by(&:name).each do |user| - %li - = link_to project_issues_with_filter_path(@project, assignee_id: user.id) do - = image_tag gravatar_icon(user.email), class: "avatar s16" - = user.name - - .dropdown.inline.prepend-left-10 - %a.dropdown-toggle.btn.btn-small{href: '#', "data-toggle" => "dropdown"} - %i.icon-time - %span.light milestone: - - if @milestone.present? - %strong= @milestone.title - - elsif params[:milestone_id] == "0" - Unspecified - - else - Any - %b.caret - %ul.dropdown-menu - %li - = link_to project_issues_with_filter_path(@project, milestone_id: nil) do - Any - = link_to project_issues_with_filter_path(@project, milestone_id: 0) do - Unspecified - - issues_active_milestones.each do |milestone| - %li - = link_to project_issues_with_filter_path(@project, milestone_id: milestone.id) do - %strong= milestone.title - %small.light= milestone.expires_at - - - %ul.well-list.issues-list - = render @issues - - if @issues.blank? - %li - %h4.nothing_here_message Nothing to show here - -- if @issues.present? - .pull-right - %span.issue_counter #{@issues.total_count} - issues for this filter - - = paginate @issues, remote: true, theme: "gitlab" diff --git a/app/views/issues/edit.html.haml b/app/views/issues/edit.html.haml deleted file mode 100644 index b1bc3ba0eba..00000000000 --- a/app/views/issues/edit.html.haml +++ /dev/null @@ -1 +0,0 @@ -= render "form" diff --git a/app/views/issues/index.atom.builder b/app/views/issues/index.atom.builder deleted file mode 100644 index 00ddd4bf702..00000000000 --- a/app/views/issues/index.atom.builder +++ /dev/null @@ -1,23 +0,0 @@ -xml.instruct! -xml.feed "xmlns" => "http://www.w3.org/2005/Atom", "xmlns:media" => "http://search.yahoo.com/mrss/" do - xml.title "#{@project.name} issues" - xml.link :href => project_issues_url(@project, :atom), :rel => "self", :type => "application/atom+xml" - xml.link :href => project_issues_url(@project), :rel => "alternate", :type => "text/html" - xml.id project_issues_url(@project) - xml.updated @issues.first.created_at.strftime("%Y-%m-%dT%H:%M:%SZ") if @issues.any? - - @issues.each do |issue| - xml.entry do - xml.id project_issue_url(@project, issue) - xml.link :href => project_issue_url(@project, issue) - xml.title truncate(issue.title, :length => 80) - xml.updated issue.created_at.strftime("%Y-%m-%dT%H:%M:%SZ") - xml.media :thumbnail, :width => "40", :height => "40", :url => gravatar_icon(issue.author_email) - xml.author do |author| - xml.name issue.author_name - xml.email issue.author_email - end - xml.summary issue.title - end - end -end diff --git a/app/views/issues/index.html.haml b/app/views/issues/index.html.haml deleted file mode 100644 index bf33769349a..00000000000 --- a/app/views/issues/index.html.haml +++ /dev/null @@ -1,25 +0,0 @@ -= render "issues/head" -.issues_content - %h3.page_title - Issues - %span (<span class=issue_counter>#{@issues.total_count}</span>) - .pull-right - .span6 - - 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: "btn btn-primary pull-right", title: "New Issue", id: "new_issue_link" do - %i.icon-plus - New Issue - = form_tag project_issues_path(@project), method: :get, remote: true, id: "issue_search_form", class: 'pull-right' do - = hidden_field_tag :status, params[:status], id: 'search_status' - = hidden_field_tag :assignee_id, params[:assignee_id], id: 'search_assignee_id' - = hidden_field_tag :milestone_id, params[:milestone_id], id: 'search_milestone_id' - = hidden_field_tag :label_name, params[:label_name], id: 'search_label_name' - = search_field_tag :issue_search, nil, { placeholder: 'Search', class: 'issue_search input-xlarge append-right-10 search-text-input' } - - .clearfix - -.row - .span3 - = render 'filter', entity: 'issue' - .span9.issues-holder - = render "issues" diff --git a/app/views/issues/index.js.haml b/app/views/issues/index.js.haml deleted file mode 100644 index 1be6a64f535..00000000000 --- a/app/views/issues/index.js.haml +++ /dev/null @@ -1,4 +0,0 @@ -:plain - $('.issues-holder').html("#{escape_javascript(render('issues'))}"); - History.replaceState({path: "#{request.url}"}, document.title, "#{request.url}"); - Issues.reload(); diff --git a/app/views/issues/new.html.haml b/app/views/issues/new.html.haml deleted file mode 100644 index b1bc3ba0eba..00000000000 --- a/app/views/issues/new.html.haml +++ /dev/null @@ -1 +0,0 @@ -= render "form" diff --git a/app/views/issues/show.html.haml b/app/views/issues/show.html.haml deleted file mode 100644 index 2e204b8240d..00000000000 --- a/app/views/issues/show.html.haml +++ /dev/null @@ -1,68 +0,0 @@ -%h3.page_title - Issue ##{@issue.id} - - %small - created at - = @issue.created_at.stamp("Aug 21, 2011") - - %span.pull-right - = link_to new_project_issue_path(@project), class: "btn grouped", title: "New Issue", id: "new_issue_link" do - %i.icon-plus - New Issue - - if can?(current_user, :modify_issue, @issue) - - if @issue.closed? - = link_to 'Reopen', project_issue_path(@project, @issue, issue: {state_event: :reopen }, status_only: true), method: :put, class: "btn grouped reopen_issue" - - else - = link_to 'Close', project_issue_path(@project, @issue, issue: {state_event: :close }, status_only: true), method: :put, class: "btn grouped close_issue", title: "Close Issue" - - = link_to edit_project_issue_path(@project, @issue), class: "btn grouped" do - %i.icon-edit - Edit - -.pull-right - .span3#votes= render 'votes/votes_block', votable: @issue - -.back_link - = link_to project_issues_path(@project) do - ← To issues list - - -.ui-box.ui-box-show - .ui-box-head - %h4.box-title - - if @issue.closed? - .error.status_info Closed - = gfm escape_once(@issue.title) - - .ui-box-body - %cite.cgray - Created by #{link_to_member(@project, @issue.author)} - - if @issue.assignee - \ and currently assigned to #{link_to_member(@project, @issue.assignee)} - - - if @issue.milestone - - milestone = @issue.milestone - %cite.cgray and attached to milestone - %strong= link_to_gfm truncate(milestone.title, length: 20), project_milestone_path(milestone.project, milestone) - - .pull-right - - @issue.labels.each do |label| - %span{class: "label #{label_css_class(label.name)}"} - %i.icon-tag - = label.name - - - - if @issue.description.present? - .ui-box-bottom - .wiki - = preserve do - = markdown @issue.description - -- content_for :note_actions do - - if can?(current_user, :modify_issue, @issue) - - if @issue.closed? - = link_to 'Reopen Issue', project_issue_path(@project, @issue, issue: {state_event: :reopen }, status_only: true), method: :put, class: "btn grouped reopen_issue" - - else - = link_to 'Close Issue', project_issue_path(@project, @issue, issue: {state_event: :close }, status_only: true), method: :put, class: "btn grouped close_issue", title: "Close Issue" - -.voting_notes#notes= render "notes/notes_with_form" diff --git a/app/views/issues/update.js.haml b/app/views/issues/update.js.haml deleted file mode 100644 index 7f66022a2de..00000000000 --- a/app/views/issues/update.js.haml +++ /dev/null @@ -1,4 +0,0 @@ -- if params[:status_only] - - if @issue.valid? - :plain - $("##{dom_id(@issue)}").fadeOut(); |