diff options
author | Riyad Preukschas <riyad@informatik.uni-bremen.de> | 2013-01-15 00:52:25 +0100 |
---|---|---|
committer | Riyad Preukschas <riyad@informatik.uni-bremen.de> | 2013-01-15 00:52:25 +0100 |
commit | 30227869482bbbdbfea153f2b45ef3bb9a9fd218 (patch) | |
tree | aff64071116447092751770d2896998f62d1b44a /app/views | |
parent | 8ee5fce9d64b70d8981896457484fae622d142c9 (diff) | |
parent | aca0caa8cc1a6bd481f87dd810284e69d3747050 (diff) | |
download | gitlab-ce-30227869482bbbdbfea153f2b45ef3bb9a9fd218.tar.gz |
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')
88 files changed, 828 insertions, 737 deletions
diff --git a/app/views/admin/dashboard/index.html.haml b/app/views/admin/dashboard/index.html.haml index 4320bda4999..2e572aaba79 100644 --- a/app/views/admin/dashboard/index.html.haml +++ b/app/views/admin/dashboard/index.html.haml @@ -1,47 +1,28 @@ .admin_dash.row - .span3 + .span4 .ui-box - %h5 Projects + %h5.title Projects .data.padded = link_to admin_projects_path do %h1= Project.count %hr = link_to 'New Project', new_project_path, class: "btn small" - .span3 + .span4 .ui-box - %h5 Groups + %h5.title Groups .data.padded = link_to admin_groups_path do %h1= Group.count %hr = link_to 'New Group', new_admin_group_path, class: "btn small" - .span3 + .span4 .ui-box - %h5 Users + %h5.title Users .data.padded = link_to admin_users_path do %h1= User.count %hr = link_to 'New User', new_admin_user_path, class: "btn small" - .span3 - .ui-box - %h5 - Resque Workers - .data.padded - - if @resque_accessible - = link_to admin_resque_path do - %h1{class: @workers.present? ? "cgreen" : "cred"} - = @workers.count - %hr - %p - %strong{class: @pending_jobs > 0 ? "cred" : "cgreen"} - #{@pending_jobs} post receive jobs waiting - - else - = link_to admin_resque_path do - %h1.cdark ? - %hr - %p - %strong Resque status unknown .row .span6 diff --git a/app/views/admin/groups/show.html.haml b/app/views/admin/groups/show.html.haml index 41f6d9b3516..0a25b125905 100644 --- a/app/views/admin/groups/show.html.haml +++ b/app/views/admin/groups/show.html.haml @@ -44,25 +44,57 @@ %div = f.submit 'Change Owner', class: "btn danger" = link_to "Cancel", "#", class: "btn change-owner-cancel-link" -%fieldset - %legend Projects (#{@group.projects.count}) - %table - %thead + +- if @group.projects.any? + %fieldset + %legend Projects (#{@group.projects.count}) + %table + %thead + %tr + %th Project name + %th Path + %th Users + %th.cred Danger Zone! + - @group.projects.each do |project| + %tr + %td + = link_to project.name_with_namespace, [:admin, project] + %td + %span.monospace= project.path_with_namespace + ".git" + %td= project.users.count + %td.bgred + = link_to 'Transfer project to global namespace', remove_project_admin_group_path(@group, project_id: project.id), confirm: 'Remove project from group and move to global namespace. Are you sure?', method: :delete, class: "btn danger small" + + = form_tag project_teams_update_admin_group_path(@group), id: "new_team_member", class: "bulk_import", method: :put do + %table.zebra-striped + %thead + %tr + %th Users + %th Project Access: + + - @group.users.each do |u| + %tr{class: "user_#{u.id}"} + %td.name= link_to u.name, admin_user_path(u) + %td.projects_access + - u.authorized_projects.in_namespace(@group).each do |project| + - u_p = u.users_projects.in_project(project).first + - next unless u_p + %span + = project.name + = link_to "(#{ u_p.project_access_human })", edit_admin_team_member_path(u_p) %tr - %th Project name - %th Path - %th Users - %th.cred Danger Zone! - - @group.projects.each do |project| + %td.input= select_tag :user_ids, options_from_collection_for_select(@users , :id, :name), multiple: true, data: {placeholder: 'Select users'}, class: 'chosen span5' + %td= select_tag :project_access, options_for_select(Project.access_options), {class: "project-access-select chosen span3"} + %tr + %td= submit_tag 'Add user to projects in group', class: "btn primary" %td - = link_to project.name_with_namespace, [:admin, project] - %td - %span.monospace= project.path_with_namespace + ".git" - %td= project.users.count - %td.bgred - = link_to 'Transfer project to global namespace', remove_project_admin_group_path(@group, project_id: project.id), confirm: 'Remove project from group and move to global namespace. Are you sure?', method: :delete, class: "btn danger small" + Read more about project permissions + %strong= link_to "here", help_permissions_path, class: "vlink" +- else + %fieldset + %legend Group is empty = form_tag project_update_admin_group_path(@group), class: "bulk_import", method: :put do %fieldset diff --git a/app/views/admin/projects/_form.html.haml b/app/views/admin/projects/_form.html.haml index 27c22872d50..36c0c655cae 100644 --- a/app/views/admin/projects/_form.html.haml +++ b/app/views/admin/projects/_form.html.haml @@ -11,18 +11,18 @@ .input = f.text_field :name, placeholder: "Example Project", class: "xxlarge" - %fieldset.adv_settings - %legend Advanced settings: - .clearfix - = f.label :path do - Path - .input - = text_field_tag :ppath, @project.path_to_repo, class: "xlarge", disabled: true + - if project.repo_exists? + %fieldset.adv_settings + %legend Advanced settings: + .clearfix + = f.label :path do + Path + .input + = text_field_tag :ppath, @project.repository.path_to_repo, class: "xlarge", disabled: true - - if project.repo_exists? .clearfix = f.label :default_branch, "Default Branch" - .input= f.select(:default_branch, project.heads.map(&:name), {}, style: "width:210px;") + .input= f.select(:default_branch, @project.repository.heads.map(&:name), {}, style: "width:210px;") %fieldset.adv_settings %legend Features: diff --git a/app/views/admin/projects/index.html.haml b/app/views/admin/projects/index.html.haml index 310cfa53890..1f5b31eca5f 100644 --- a/app/views/admin/projects/index.html.haml +++ b/app/views/admin/projects/index.html.haml @@ -1,5 +1,5 @@ %h3.page_title - Projects (#{@projects.count}) + Projects (#{Project.count}) = link_to 'New Project', new_project_path, class: "btn small right" %br = form_tag admin_projects_path, method: :get, class: 'form-inline' do @@ -15,6 +15,7 @@ %i.icon-sort-down %th Path %th Team Members + %th Owner %th Last Commit %th Edit %th.cred Danger Zone! @@ -26,6 +27,11 @@ %td %span.monospace= project.path_with_namespace + ".git" %td= project.users_projects.count + %td + - if project.owner + = link_to project.owner.name, [:admin, project.owner] + - else + (deleted) %td= last_commit(project) %td= link_to 'Edit', edit_admin_project_path(project), id: "edit_#{dom_id(project)}", class: "btn small" %td.bgred= link_to 'Destroy', [:admin, project], confirm: "REMOVE #{project.name}? Are you sure?", method: :delete, class: "btn small danger" diff --git a/app/views/admin/projects/show.html.haml b/app/views/admin/projects/show.html.haml index 634b1836754..5a745f58fe3 100644 --- a/app/views/admin/projects/show.html.haml +++ b/app/views/admin/projects/show.html.haml @@ -4,15 +4,15 @@ %i.icon-edit Edit -- if @project.has_commits? - - if !@project.has_post_receive_file? +- if @repository && @repository.has_commits? + - if !@repository.has_post_receive_file? %br .alert.alert-error %span %strong Project has commits but missing post-receive file. %br If you exported project manually - make a link of post-receive hook file from gitolite to project repository - - elsif !@project.valid_post_receive_file? + - elsif !@repository.valid_post_receive_file? %br .alert.alert-error %span @@ -49,8 +49,8 @@ %b Owned by: %td - - if @project.chief - = link_to @project.chief.name, admin_user_path(@project.chief) + - if @project.owner + = link_to @project.owner_name, admin_user_path(@project.owner) - else (deleted) %tr @@ -58,49 +58,50 @@ %b Created by: %td - = @project.owner_name || '(deleted)' + = @project.creator.try(:name) || '(deleted)' %tr %td %b Created at: %td = @project.created_at.stamp("March 1, 1999") + %tr + %td + %b + Smart HTTP: + %td + = link_to @project.http_url_to_repo + %tr + %td + %b + SSH: + %td + = link_to @project.ssh_url_to_repo -%table.zebra-striped - %thead +- if @repository + %table.zebra-striped + %thead + %tr + %th Repository + %th %tr - %th Repository - %th - %tr - %td - %b - FS Path: - %td - %code= @project.path_to_repo - %tr - %td - %b - Smart HTTP: - %td - = link_to @project.http_url_to_repo - %tr - %td - %b - SSH: - %td - = link_to @project.ssh_url_to_repo - %tr - %td - %b - Last commit at: - %td - = last_commit(@project) - %tr - %td - %b - Post Receive File: - %td - = check_box_tag :post_receive_file, 1, @project.has_post_receive_file?, disabled: true + %td + %b + FS Path: + %td + %code= @repository.path_to_repo + %tr + %td + %b + Last commit at: + %td + = last_commit(@project) + %tr + %td + %b + Post Receive File: + %td + = check_box_tag :post_receive_file, 1, @repository.has_post_receive_file?, disabled: true %br %h5 diff --git a/app/views/admin/resque/show.html.haml b/app/views/admin/resque/show.html.haml index 41254a6b6c2..499738f9a06 100644 --- a/app/views/admin/resque/show.html.haml +++ b/app/views/admin/resque/show.html.haml @@ -1,4 +1,4 @@ -%h3.page_title Resque +%h3.page_title Background Jobs %br .ui-box - %iframe{src: resque_path, width: '100%', height: 600, style: "border: none"} + %iframe{src: sidekiq_path, width: '100%', height: 900, style: "border: none"} diff --git a/app/views/admin/users/index.html.haml b/app/views/admin/users/index.html.haml index 1df4f590bcb..87290abe7a6 100644 --- a/app/views/admin/users/index.html.haml +++ b/app/views/admin/users/index.html.haml @@ -1,5 +1,5 @@ %h3.page_title - Users (#{@admin_users.count}) + Users = link_to 'New User', new_admin_user_path, class: "btn small right" %br @@ -8,16 +8,21 @@ = submit_tag "Search", class: "btn submit primary" %ul.nav.nav-tabs %li{class: "#{'active' unless params[:filter]}"} - = link_to "Active", admin_users_path + = link_to admin_users_path do + Active + %span.badge= User.active.count %li{class: "#{'active' if params[:filter] == "admins"}"} = link_to admin_users_path(filter: "admins") do Admins + %span.badge= User.admins.count %li{class: "#{'active' if params[:filter] == "blocked"}"} = link_to admin_users_path(filter: "blocked") do Blocked + %span.badge= User.blocked.count %li{class: "#{'active' if params[:filter] == "wop"}"} = link_to admin_users_path(filter: "wop") do Without projects + %span.badge= User.without_projects.count %table %thead diff --git a/app/views/admin/users/show.html.haml b/app/views/admin/users/show.html.haml index 852aead79e2..db132359c7f 100644 --- a/app/views/admin/users/show.html.haml +++ b/app/views/admin/users/show.html.haml @@ -106,8 +106,8 @@ %td= link_to group.name, admin_group_path(group) -- if @admin_user.projects.present? - %h5 Projects: +- if @admin_user.personal_projects.present? + %h5 Personal Projects: %br %table.zebra-striped @@ -118,7 +118,7 @@ %th %th - - @admin_user.users_projects.each do |tm| + - @admin_user.tm_in_personal_projects.each do |tm| - project = tm.project %tr %td= link_to project.name_with_namespace, admin_project_path(project) diff --git a/app/views/commit/show.html.haml b/app/views/commit/show.html.haml index 5ba43f951dc..f920534e03a 100644 --- a/app/views/commit/show.html.haml +++ b/app/views/commit/show.html.haml @@ -1,4 +1,11 @@ = render "commits/commit_box" + +%p.right.cgray + This commit has + %span.cgreen #{@commit.stats.additions} additions + and + %span.cred #{@commit.stats.deletions} deletions + = render "commits/diffs", diffs: @commit.diffs = render "notes/notes_with_form" @@ -16,5 +23,7 @@ , h = event.currentTarget.naturalHeight; $('.image.diff_added .image-info', this).append(' | <b>W:</b> ' + w + 'px | <b>H:</b> ' + h + 'px'); }, this)); + }); + }); diff --git a/app/views/commits/_commit.html.haml b/app/views/commits/_commit.html.haml index 156ff1e9d85..eb0312d01e1 100644 --- a/app/views/commits/_commit.html.haml +++ b/app/views/commits/_commit.html.haml @@ -14,8 +14,8 @@ %span.notes_count - - notes = @project.commit_notes(commit) + @project.commit_line_notes(commit) + - notes = @project.notes.for_commit_id(commit.id) - if notes.any? - %span.btn.small.disabled.grouped + %span.btn.disabled.grouped %i.icon-comment = notes.count diff --git a/app/views/commits/_commit_box.html.haml b/app/views/commits/_commit_box.html.haml index 8f7826e0c8d..0544a1d10fe 100644 --- a/app/views/commits/_commit_box.html.haml +++ b/app/views/commits/_commit_box.html.haml @@ -1,47 +1,50 @@ -.commit-box{class: @commit.parents_count > 1 ? "merge-commit" : ""} - .commit-head +.ui-box.ui-box-show + .ui-box-head .right - if @notes_count > 0 %span.btn.disabled.grouped %i.icon-comment = @notes_count .left.btn-group - %a.btn.small.grouped.dropdown-toggle{ data: {toggle: :dropdown} } + %a.btn.grouped.dropdown-toggle{ data: {toggle: :dropdown} } %i.icon-download-alt Download as %span.caret %ul.dropdown-menu %li= link_to "Email Patches", project_commit_path(@project, @commit, format: :patch) %li= link_to "Plain Diff", project_commit_path(@project, @commit, format: :diff) - = link_to project_tree_path(@project, @commit), class: "browse-button primary grouped" do - %strong Browse Code » + = link_to project_tree_path(@project, @commit), class: "btn primary grouped" do + %span Browse Code » %h3.commit-title.page_title = gfm escape_once(@commit.title) - if @commit.description.present? %pre.commit-description = gfm escape_once(@commit.description) - .commit-info + .ui-box-body .row .span5 .author - %strong= @commit.author_link avatar: true, size: 40 + = @commit.author_link avatar: true, size: 32 authored %time{title: @commit.authored_date.stamp("Aug 21, 2011 9:23pm")} #{time_ago_in_words(@commit.authored_date)} ago - if @commit.different_committer? .committer → - %strong= @commit.committer_link + = @commit.committer_link committed %time{title: @commit.committed_date.stamp("Aug 21, 2011 9:23pm")} #{time_ago_in_words(@commit.committed_date)} ago - .span6.right - .sha-block - %span.cgray commit - %code.label_commit= @commit.id - .sha-block - %span.cgray= pluralize(@commit.parents.count, "parent") - - @commit.parents.each do |parent| - = link_to parent.id[0...10], project_commit_path(@project, parent) + .span6.pull-right + .pull-right + .sha-block + %span.cgray commit + %span.label_commit= @commit.id + .clearfix + .pull-right + .sha-block + %span.cgray= pluralize(@commit.parents.count, "parent") + - @commit.parents.each do |parent| + = link_to parent.id[0...10], project_commit_path(@project, parent) diff --git a/app/views/commits/_commits.html.haml b/app/views/commits/_commits.html.haml index c9217989884..0dc6664c1d6 100644 --- a/app/views/commits/_commits.html.haml +++ b/app/views/commits/_commits.html.haml @@ -1,6 +1,6 @@ - @commits.group_by { |c| c.committed_date.to_date }.each do |day, commits| %div.ui-box - %h5.small + %h5.title %i.icon-calendar = day.stamp("28 Aug, 2010") %ul.well-list= render commits diff --git a/app/views/commits/_head.html.haml b/app/views/commits/_head.html.haml index 2ec1d24bbef..a5f3fdf5c5e 100644 --- a/app/views/commits/_head.html.haml +++ b/app/views/commits/_head.html.haml @@ -2,19 +2,19 @@ %li= render partial: 'shared/ref_switcher', locals: {destination: 'commits'} = nav_link(controller: [:commit, :commits]) do - = link_to 'Commits', project_commits_path(@project, @project.root_ref) + = link_to 'Commits', project_commits_path(@project, @repository.root_ref) = nav_link(controller: :compare) do = link_to 'Compare', project_compare_index_path(@project) = nav_link(html_options: {class: branches_tab_class}) do = link_to project_repository_path(@project) do Branches - %span.badge= @project.branches.length + %span.badge= @repository.branches.length = nav_link(controller: :repositories, action: :tags) do = link_to tags_project_repository_path(@project) do Tags - %span.badge= @project.tags.length + %span.badge= @repository.tags.length = nav_link(controller: :repositories, action: :stats) do = link_to stats_project_repository_path(@project) do diff --git a/app/views/commits/_text_diff.html.haml b/app/views/commits/_text_diff.html.haml index f5784dea511..ce07b87d548 100644 --- a/app/views/commits/_text_diff.html.haml +++ b/app/views/commits/_text_diff.html.haml @@ -15,7 +15,7 @@ - if @comments_allowed = render "notes/diff_note_link", line_code: line_code %td.new_line= link_to raw(type == "old" ? " " : line_new) , "##{line_code}", id: line_code - %td.line_content{class: "noteable_line #{type} #{line_code}", "line_code" => line_code}= raw "#{line} " + %td.line_content{class: "noteable_line #{type} #{line_code}", "line_code" => line_code}= raw diff_line_content(line) - if @reply_allowed - comments = @line_notes.select { |n| n.line_code == line_code }.sort_by(&:created_at) diff --git a/app/views/compare/_form.html.haml b/app/views/compare/_form.html.haml index 7e3a2a0e1f5..0915782dddc 100644 --- a/app/views/compare/_form.html.haml +++ b/app/views/compare/_form.html.haml @@ -28,7 +28,7 @@ :javascript $(function() { - var availableTags = #{@project.ref_names.to_json}; + var availableTags = #{@project.repository.ref_names.to_json}; $("#from, #to").autocomplete({ source: availableTags, diff --git a/app/views/compare/show.html.haml b/app/views/compare/show.html.haml index 2abbd3fc0ee..d8ea3727d57 100644 --- a/app/views/compare/show.html.haml +++ b/app/views/compare/show.html.haml @@ -8,7 +8,8 @@ - if @commits.present? %div.ui-box - %h5.small Commits (#{@commits.count}) + %h5.title + Commits (#{@commits.count}) %ul.well-list= render @commits - unless @diffs.empty? diff --git a/app/views/dashboard/_activities.html.haml b/app/views/dashboard/_activities.html.haml index c63ef24fca5..2b7d23c225d 100644 --- a/app/views/dashboard/_activities.html.haml +++ b/app/views/dashboard/_activities.html.haml @@ -7,7 +7,7 @@ = event_filter_link EventFilter.team, 'Team' - if @events.any? - .content_list= render @events + .content_list - else %p.nothing_here_message Projects activity will be displayed here .loading.hide diff --git a/app/views/dashboard/_groups.html.haml b/app/views/dashboard/_groups.html.haml index 9e3401e51b8..7f544406761 100644 --- a/app/views/dashboard/_groups.html.haml +++ b/app/views/dashboard/_groups.html.haml @@ -1,5 +1,5 @@ .groups_box - %h5 + %h5.title Groups %small (#{groups.count}) @@ -17,4 +17,4 @@ → %span.last_activity %strong Projects: - %span= group.projects.authorized_for(current_user).count + %span= current_user.authorized_projects.where(namespace_id: group.id).count diff --git a/app/views/dashboard/_projects.html.haml b/app/views/dashboard/_projects.html.haml index cffafb5445c..6c1304ee4a8 100644 --- a/app/views/dashboard/_projects.html.haml +++ b/app/views/dashboard/_projects.html.haml @@ -1,5 +1,5 @@ .projects_box - %h5 + %h5.title Projects %small (#{projects.total_count}) diff --git a/app/views/dashboard/index.html.haml b/app/views/dashboard/index.html.haml index b64aa86cf73..abbe3101fc3 100644 --- a/app/views/dashboard/index.html.haml +++ b/app/views/dashboard/index.html.haml @@ -7,5 +7,3 @@ - else = render "zero_authorized_projects" -:javascript - $(function(){ Pager.init(20); }); diff --git a/app/views/dashboard/issues.html.haml b/app/views/dashboard/issues.html.haml index 52863229644..68e3b3dcaf5 100644 --- a/app/views/dashboard/issues.html.haml +++ b/app/views/dashboard/issues.html.haml @@ -13,7 +13,8 @@ - @issues.group_by(&:project).each do |group| %div.ui-box - @project = group[0] - %h5= link_to_project @project + %h5.title + = link_to_project @project %ul.well-list.issues_table - group[1].each do |issue| = render(partial: 'issues/show', locals: {issue: issue}) diff --git a/app/views/dashboard/merge_requests.html.haml b/app/views/dashboard/merge_requests.html.haml index ea7c8c9a3d5..c5245da731a 100644 --- a/app/views/dashboard/merge_requests.html.haml +++ b/app/views/dashboard/merge_requests.html.haml @@ -12,7 +12,8 @@ - @merge_requests.group_by(&:project).each do |group| .ui-box - @project = group[0] - %h5= link_to_project @project + %h5.title + = link_to_project @project %ul.well-list - group[1].each do |merge_request| = render(partial: 'merge_requests/merge_request', locals: {merge_request: merge_request}) diff --git a/app/views/events/event/_note.html.haml b/app/views/events/event/_note.html.haml index 8c12969345f..7b57f424d61 100644 --- a/app/views/events/event/_note.html.haml +++ b/app/views/events/event/_note.html.haml @@ -19,7 +19,6 @@ = event.project_name .event-body - %span.hint - - %i.icon-comment + %span.event-note + %i.icon-comment-alt = truncate event.target.note, length: 70 diff --git a/app/views/groups/_filter.html.haml b/app/views/groups/_filter.html.haml new file mode 100644 index 00000000000..c8b0ad0f433 --- /dev/null +++ b/app/views/groups/_filter.html.haml @@ -0,0 +1,33 @@ += form_tag group_filter_path(entity), method: 'get' do + %fieldset.dashboard-search-filter + = search_field_tag "search", params[:search], { placeholder: 'Search', class: 'search-text-input' } + = button_tag type: 'submit', class: 'btn' do + %i.icon-search + + %fieldset + %legend Status: + %ul.nav.nav-pills.nav-stacked + %li{class: ("active" if !params[:status])} + = link_to group_filter_path(entity, status: nil) do + Open + %li{class: ("active" if params[:status] == 'closed')} + = link_to group_filter_path(entity, status: 'closed') do + Closed + %li{class: ("active" if params[:status] == 'all')} + = link_to group_filter_path(entity, status: 'all') do + All + + %fieldset + %legend Projects: + %ul.nav.nav-pills.nav-stacked + - @projects.each do |project| + - unless entities_per_project(project, entity).zero? + %li{class: ("active" if params[:project_id] == project.id.to_s)} + = link_to group_filter_path(entity, project_id: project.id) do + = project.name_with_namespace + %small.right= entities_per_project(project, entity) + + %fieldset + %hr + = link_to "Reset", group_filter_path(entity), class: 'btn right' + diff --git a/app/views/groups/_new_group_member.html.haml b/app/views/groups/_new_group_member.html.haml new file mode 100644 index 00000000000..2d599816e2a --- /dev/null +++ b/app/views/groups/_new_group_member.html.haml @@ -0,0 +1,18 @@ += form_for @team_member, as: :team_member, url: team_members_group_path(@group) do |f| + %fieldset + %legend= "New Team member(s) for projects in #{@group.name}" + + %h6 1. Choose people you want in the team + .clearfix + = f.label :user_ids, "People" + .input= select_tag(:user_ids, options_from_collection_for_select(User.active.alphabetically, :id, :name), {data: {placeholder: "Select users"}, class: "chosen xxlarge", multiple: true}) + + %h6 2. Set access level for them + .clearfix + = f.label :project_access, "Project Access" + .input= select_tag :project_access, options_for_select(Project.access_options, @team_member.project_access), class: "project-access-select chosen" + + .form-actions + = hidden_field_tag :redirect_to, people_group_path(@group) + = f.submit 'Add', class: "btn save-btn" + diff --git a/app/views/groups/_new_member.html.haml b/app/views/groups/_new_member.html.haml index f48c2c23d83..89ac05e774e 100644 --- a/app/views/groups/_new_member.html.haml +++ b/app/views/groups/_new_member.html.haml @@ -5,7 +5,7 @@ %h6 1. Choose people you want in the team .clearfix = f.label :user_ids, "People" - .input= select_tag(:user_ids, options_from_collection_for_select(User.not_in_project(@project).all, :id, :name), {data: {placeholder: "Select users"}, class: "chosen xxlarge", multiple: true}) + .input= select_tag(:user_ids, options_from_collection_for_select(User.not_in_project(@project).alphabetically, :id, :name), {data: {placeholder: "Select users"}, class: "chosen xxlarge", multiple: true}) %h6 2. Set access level for them .clearfix diff --git a/app/views/groups/_projects.html.haml b/app/views/groups/_projects.html.haml index 0b491879fe0..040d1ae94aa 100644 --- a/app/views/groups/_projects.html.haml +++ b/app/views/groups/_projects.html.haml @@ -1,5 +1,5 @@ .projects_box - %h5 + %h5.title Projects %small (#{projects.count}) diff --git a/app/views/groups/issues.html.haml b/app/views/groups/issues.html.haml index 0daf4d752a8..ffca2dc75ea 100644 --- a/app/views/groups/issues.html.haml +++ b/app/views/groups/issues.html.haml @@ -3,17 +3,21 @@ %small (assigned to you) %small.right #{@issues.total_count} issues -%br -.clearfix -- if @issues.any? - - @issues.group_by(&:project).each do |group| - %div.ui-box - - @project = group[0] - %h5= @project.name - %ul.well-list.issues_table - - group[1].each do |issue| - = render(partial: 'issues/show', locals: {issue: issue}) - %hr - = paginate @issues, theme: "gitlab" -- else - %h3.nothing_here_message Nothing to show here +%hr +.row + .span3 + = render 'filter', entity: 'issue' + .span9 + - if @issues.any? + - @issues.group_by(&:project).each do |group| + %div.ui-box + - @project = group[0] + %h5.title + = link_to_project @project + %ul.well-list.issues_table + - group[1].each do |issue| + = render(partial: 'issues/show', locals: {issue: issue}) + %hr + = paginate @issues, theme: "gitlab" + - else + %p.nothing_here_message Nothing to show here diff --git a/app/views/groups/merge_requests.html.haml b/app/views/groups/merge_requests.html.haml index 72aa4ad11e1..c5245da731a 100644 --- a/app/views/groups/merge_requests.html.haml +++ b/app/views/groups/merge_requests.html.haml @@ -3,16 +3,22 @@ %small (authored by or assigned to you) %small.right #{@merge_requests.total_count} merge requests -%br -- if @merge_requests.any? - - @merge_requests.group_by(&:project).each do |group| - %ul.well-list.ui-box - - @project = group[0] - %h5= @project.name - - group[1].each do |merge_request| - = render(partial: 'merge_requests/merge_request', locals: {merge_request: merge_request}) - %hr - = paginate @merge_requests, theme: "gitlab" +%hr +.row + .span3 + = render 'filter', entity: 'merge_request' + .span9 + - if @merge_requests.any? + - @merge_requests.group_by(&:project).each do |group| + .ui-box + - @project = group[0] + %h5.title + = link_to_project @project + %ul.well-list + - group[1].each do |merge_request| + = render(partial: 'merge_requests/merge_request', locals: {merge_request: merge_request}) + %hr + = paginate @merge_requests, theme: "gitlab" -- else - %h3.nothing_here_message Nothing to show here + - else + %h3.nothing_here_message Nothing to show here diff --git a/app/views/groups/people.html.haml b/app/views/groups/people.html.haml index be3dd7a4d78..0bceeaa3ceb 100644 --- a/app/views/groups/people.html.haml +++ b/app/views/groups/people.html.haml @@ -2,10 +2,10 @@ .span3 = render 'people_filter' .span9 - - if @project && can?(current_user, :manage_group, @group) - = render "new_member" + - if can?(current_user, :manage_group, @group) + = render (@project ? "new_member" : "new_group_member") .ui-box - %h5 + %h5.title Team %small (#{@users.size}) diff --git a/app/views/groups/search.html.haml b/app/views/groups/search.html.haml index 6ca5630f43d..1ba4707aa52 100644 --- a/app/views/groups/search.html.haml +++ b/app/views/groups/search.html.haml @@ -6,70 +6,4 @@ = search_field_tag :search, params[:search], placeholder: "issue 143", class: "input-xxlarge search-text-input", id: "dashboard_search" = submit_tag 'Search', class: "btn primary wide" - if params[:search].present? - %br - %h3 - Search results - %small (#{@projects.count + @merge_requests.count + @issues.count}) - %hr - .search_results - .row - .span6 - %table - %thead - %tr - %th Projects - %tbody - - @projects.each do |project| - %tr - %td - = link_to project do - %strong.term= project.name - %small.cgray - last activity at - = project.last_activity_date.stamp("Aug 25, 2011") - - if @projects.blank? - %tr - %td - %h4.nothing_here_message No Projects - %br - %table - %thead - %tr - %th Merge Requests - %tbody - - @merge_requests.each do |merge_request| - %tr - %td - = link_to [merge_request.project, merge_request] do - %span.badge.badge-info ##{merge_request.id} - – - %strong.term= truncate merge_request.title, length: 50 - %strong.right - %span.label= merge_request.project.name - - if @merge_requests.blank? - %tr - %td - %h4.nothing_here_message No Merge Requests - .span6 - %table - %thead - %tr - %th Issues - %tbody - - @issues.each do |issue| - %tr - %td - = link_to [issue.project, issue] do - %span.badge.badge-info ##{issue.id} - – - %strong.term= truncate issue.title, length: 40 - %strong.right - %span.label= issue.project.name - - if @issues.blank? - %tr - %td - %h4.nothing_here_message No Issues - :javascript - $(function() { - $(".search_results .term").highlight("#{params[:search]}"); - }) + = render 'search/result' diff --git a/app/views/groups/show.html.haml b/app/views/groups/show.html.haml index 76bc2639d61..d7d3f869895 100644 --- a/app/views/groups/show.html.haml +++ b/app/views/groups/show.html.haml @@ -7,7 +7,7 @@ %span.cgray Events and projects are filtered in scope of group %hr - if @events.any? - .content_list= render @events + .content_list - else %p.nothing_here_message Projects activity will be displayed here .loading.hide @@ -26,4 +26,4 @@ = link_to "@gitlabhq", "https://twitter.com/gitlabhq" :javascript - $(function(){ Pager.init(20); }); + $(function(){ Pager.init(20, true); }); diff --git a/app/views/help/index.html.haml b/app/views/help/index.html.haml index ebd499c05e0..dc22b672cb7 100644 --- a/app/views/help/index.html.haml +++ b/app/views/help/index.html.haml @@ -9,31 +9,41 @@ %br Fast, secure and stable solution based on Ruby on Rails & Gitolite. -%hr +%br + +.row + .span6 + .ui-box + .title + %h5 Help + %ul.well-list + %li + %span= link_to "Workflow", help_workflow_path -%h3 Help + %li + %span= link_to "Permissions", help_permissions_path -%ol - %li - %h5= link_to "Workflow", help_workflow_path + %li + %span= link_to "Web Hooks", help_web_hooks_path - %li - %h5= link_to "Permissions", help_permissions_path + %li + %span= link_to "API", help_api_path - %li - %h5= link_to "Web Hooks", help_web_hooks_path + %li + %span= link_to "GitLab Markdown", help_markdown_path - %li - %h5= link_to "System Hooks", help_system_hooks_path + %li + %span= link_to "SSH keys", help_ssh_path - %li - %h5= link_to "API", help_api_path + .span6 + .ui-box + .title + %h5 Admin Guide + %ul.well-list - %li - %h5= link_to "GitLab Markdown", help_markdown_path + %li + %span= link_to "GitLab Rake Tasks", help_raketasks_path - %li - %h5= link_to "SSH keys", help_ssh_path + %li + %span= link_to "System Hooks", help_system_hooks_path - %li - %h5= link_to "GitLab Rake Tasks", help_raketasks_path diff --git a/app/views/help/markdown.html.haml b/app/views/help/markdown.html.haml index aa608ed6d9a..0419f7c131a 100644 --- a/app/views/help/markdown.html.haml +++ b/app/views/help/markdown.html.haml @@ -1,6 +1,6 @@ %h3.page_title GitLab Flavored Markdown .back_link - = link_to help_path do + = link_to help_path do ← to index %hr @@ -120,7 +120,7 @@ for commits -# this example will only be shown if the user has a project with at least one issue - - if @project = current_user.projects.first + - if @project = current_user.authorized_projects.first - if issue = @project.issues.first %p For example in your #{link_to @project.name, project_path(@project)} project, writing: %pre= "This is related to ##{issue.id}. @#{current_user.name} is working on solving it." diff --git a/app/views/help/raketasks.html.haml b/app/views/help/raketasks.html.haml index 62cfa1521a7..f015451a673 100644 --- a/app/views/help/raketasks.html.haml +++ b/app/views/help/raketasks.html.haml @@ -16,6 +16,8 @@ = link_to "User Management", "#user_management", 'data-toggle' => 'tab' %li = link_to "Backup & Restore", "#backup_restore", 'data-toggle' => 'tab' + %li + = link_to "Cleanup", "#cleanup", 'data-toggle' => 'tab' .tab-content .tab-pane.active#features @@ -45,6 +47,15 @@ = preserve do = markdown File.read(Rails.root.join("doc", "raketasks", "user_management.md")) + .tab-pane#cleanup + .file_holder + .file_title + %i.icon-file + Cleanup + .file_content.wiki + = preserve do + = markdown File.read(Rails.root.join("doc", "raketasks", "cleanup.md")) + .tab-pane#backup_restore .file_holder .file_title diff --git a/app/views/hooks/_data_ex.html.erb b/app/views/hooks/_data_ex.html.erb index 7dd6b9e0750..b4281fa18c7 100644 --- a/app/views/hooks/_data_ex.html.erb +++ b/app/views/hooks/_data_ex.html.erb @@ -1,45 +1,43 @@ <% data_ex_str = <<eos { - :before => "95790bf891e76fee5e1747ab589903a6a1f80f22", - :after => "da1560886d4f094c3e6c9ef40349f7d38b5d27d7", - :ref => "refs/heads/master", - :user_id => 4, - :user_name => "John Smith", - :repository => { - :name => "Diaspora", - :url => "localhost/diaspora", - :description => "", - :homepage => "localhost/diaspora", - :private => true + "before": "95790bf891e76fee5e1747ab589903a6a1f80f22", + "after": "da1560886d4f094c3e6c9ef40349f7d38b5d27d7", + "ref": "refs/heads/master", + "user_id": 4, + "user_name": "John Smith", + "repository": { + "name": "Diaspora", + "url": "git@localhost:diaspora.git", + "description": "", + "homepage": "http://localhost/diaspora", + }, + "commits": [ + { + "id": "b6568db1bc1dcd7f8b4d5a946b0b91f9dacd7327", + "message": "Update Catalan translation to e38cb41.", + "timestamp": "2011-12-12T14:27:31+02:00", + "url": "http://localhost/diaspora/commits/b6568db1bc1dcd7f8b4d5a946b0b91f9dacd7327", + "author": { + "name": "Jordi Mallach", + "email": "jordi@softcatala.org", + } }, - :commits => [ - [0] { - :id => "450d0de7532f8b663b9c5cce183b...", - :message => "Update Catalan translation to e38cb41.", - :timestamp => "2011-12-12T14:27:31+02:00", - :url => "http://localhost/diaspora/commits/450d0de7532f...", - :author => { - :name => "Jordi Mallach", - :email => "jordi@softcatala.org" - } - }, - - .... - - [3] { - :id => "da1560886d4f094c3e6c9ef40349...", - :message => "fixed readme", - :timestamp => "2012-01-03T23:36:29+02:00", - :url => "http://localhost/diaspora/commits/da1560886d...", - :author => { - :name => "GitLab dev user", - :email => "gitlabdev@dv6700.(none)" - } - } - ], - total_commits_count => 4 -} + // ... + { + "id": "da1560886d4f094c3e6c9ef40349f7d38b5d27d7", + "message": "fixed readme", + "timestamp": "2012-01-03T23:36:29+02:00", + "url": "http://localhost/diaspora/commits/da1560886d4f094c3e6c9ef40349f7d38b5d27d7", + "author": { + "name": "GitLab dev user", + "email": "gitlabdev@dv6700.(none)", + }, + }, + ], + "total_commits_count": 4, +}; eos %> -<% js_lexer = Pygments::Lexer[:js] %> -<%= raw js_lexer.highlight(data_ex_str) %> +<div class="<%= user_color_scheme_class%>"> + <%= raw Pygments::Lexer[:js].highlight(data_ex_str) %> +</div> 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 diff --git a/app/views/layouts/_head.html.haml b/app/views/layouts/_head.html.haml index 4a0f60d36c2..9d035f0e012 100644 --- a/app/views/layouts/_head.html.haml +++ b/app/views/layouts/_head.html.haml @@ -1,8 +1,8 @@ %head %meta{charset: "utf-8"} %title + = "#{title} | " if defined?(title) GitLab - = " > #{title}" if defined?(title) = favicon_link_tag 'favicon.ico' = stylesheet_link_tag "application" = javascript_include_tag "application" diff --git a/app/views/layouts/_head_panel.html.haml b/app/views/layouts/_head_panel.html.haml index 8fbec43f4a1..f4b2228a41b 100644 --- a/app/views/layouts/_head_panel.html.haml +++ b/app/views/layouts/_head_panel.html.haml @@ -2,7 +2,8 @@ .navbar-inner .container %div.app_logo - = link_to root_path, class: "home", title: "Home" do + %span.separator + = link_to root_path, class: "home has_bottom_tooltip", title: "Dashboard" do %h1 GITLAB %span.separator %h1.project_name= title diff --git a/app/views/layouts/admin.html.haml b/app/views/layouts/admin.html.haml index 6b643ec8ccb..a60e7febe76 100644 --- a/app/views/layouts/admin.html.haml +++ b/app/views/layouts/admin.html.haml @@ -19,6 +19,6 @@ = nav_link(controller: :hooks) do = link_to "Hooks", admin_hooks_path = nav_link(controller: :resque) do - = link_to "Resque", admin_resque_path + = link_to "Background Jobs", admin_resque_path .content= yield diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index a41de538436..a197de38749 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -15,7 +15,7 @@ = nav_link(path: 'dashboard#merge_requests') do = link_to dashboard_merge_requests_path do Merge Requests - %span.count= current_user.cared_merge_requests.count + %span.count= current_user.cared_merge_requests.opened.count = nav_link(path: 'search#show') do = link_to "Search", search_path = nav_link(path: 'help#index') do diff --git a/app/views/layouts/group.html.haml b/app/views/layouts/group.html.haml index d40d9525bb8..f47e8b3e9ff 100644 --- a/app/views/layouts/group.html.haml +++ b/app/views/layouts/group.html.haml @@ -15,7 +15,7 @@ = nav_link(path: 'groups#merge_requests') do = link_to merge_requests_group_path(@group) do Merge Requests - %span.count= current_user.cared_merge_requests.of_group(@group).count + %span.count= current_user.cared_merge_requests.opened.of_group(@group).count = nav_link(path: 'groups#search') do = link_to "Search", search_group_path(@group) = nav_link(path: 'groups#people') do diff --git a/app/views/layouts/notify.html.haml b/app/views/layouts/notify.html.haml index c418e1dbc68..3db1f59b54d 100644 --- a/app/views/layouts/notify.html.haml +++ b/app/views/layouts/notify.html.haml @@ -13,10 +13,10 @@ %td{style: "font-size: 0px;", width: "20"} \ %td{align: "left", style: "padding: 10px 0", width: "580"} - %h1{style: "font-size: 24px; color: #BBBBBB; font: normal 22px Helvetica, Arial, sans-serif; margin: 0; padding: 0; line-height: 32px;"} + %h1{style: "color: #BBBBBB; font: normal 20px Helvetica, Arial, sans-serif; margin: 0; padding: 0; line-height: 32px;"} GITLAB - if @project - → #{@project.name_with_namespace} + \/ #{@project.name_with_namespace} %table{align: "center", bgcolor: "#fff", border: "0", cellpadding: "0", cellspacing: "0", style: "font-family: Helvetica, Arial, sans-serif; background: #fff;", width: "600"} %tr= yield %tr diff --git a/app/views/layouts/project_resource.html.haml b/app/views/layouts/project_resource.html.haml index 709807456c8..e00f96a7723 100644 --- a/app/views/layouts/project_resource.html.haml +++ b/app/views/layouts/project_resource.html.haml @@ -14,9 +14,9 @@ - if @project.repo_exists? - if can? current_user, :download_code, @project = nav_link(controller: %w(tree blob blame)) do - = link_to 'Files', project_tree_path(@project, @ref || @project.root_ref) + = link_to 'Files', project_tree_path(@project, @ref || @repository.root_ref) = nav_link(controller: %w(commit commits compare repositories protected_branches)) do - = link_to "Commits", project_commits_path(@project, @ref || @project.root_ref) + = link_to "Commits", project_commits_path(@project, @ref || @repository.root_ref) = nav_link(path: 'projects#graph') do = link_to "Network", graph_project_path(@project) diff --git a/app/views/merge_requests/_filter.html.haml b/app/views/merge_requests/_filter.html.haml new file mode 100644 index 00000000000..86148fbcfee --- /dev/null +++ b/app/views/merge_requests/_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[:f] == 'open' || !params[:f]))} + = link_to project_merge_requests_path(@project, f: 'open', milestone_id: params[:milestone_id]) do + Open + %li{class: ("active" if params[:f] == "closed")} + = link_to project_merge_requests_path(@project, f: "closed", milestone_id: params[:milestone_id]) do + Closed + %li{class: ("active" if params[:f] == 'assigned-to-me')} + = link_to project_merge_requests_path(@project, f: 'assigned-to-me', milestone_id: params[:milestone_id]) do + Assigned To Me + %li{class: ("active" if params[:f] == 'all')} + = link_to project_merge_requests_path(@project, f: 'all', milestone_id: params[:milestone_id]) do + All + + %fieldset + %hr + = link_to "Reset", project_merge_requests_path(@project), class: 'btn right' + diff --git a/app/views/merge_requests/_form.html.haml b/app/views/merge_requests/_form.html.haml index 9606e2e53b3..9a4f0617a3a 100644 --- a/app/views/merge_requests/_form.html.haml +++ b/app/views/merge_requests/_form.html.haml @@ -1,54 +1,59 @@ -= form_for [@project, @merge_request], html: { class: "new_merge_request form-horizontal" } do |f| += form_for [@project, @merge_request], html: { class: "#{controller.action_name}-merge-request form-horizontal" } do |f| -if @merge_request.errors.any? .alert-message.block-message.error %ul - @merge_request.errors.full_messages.each do |msg| %li= msg - %h4.cdark 1. Select Branches - %br + %fieldset + %legend 1. Select Branches - .row - .span5 - .mr_branch_box - %h5 From (Head Branch) - .body - .padded= f.select(:source_branch, @project.heads.map(&:name), { include_blank: "Select branch" }, {class: 'chosen span4'}) - .mr_source_commit + .row + .span5 + .mr_branch_box + %h5.cgray From (Head Branch) + .body + .padded= f.select(:source_branch, @repository.heads.map(&:name), { include_blank: "Select branch" }, {class: 'chosen span4'}) + .mr_source_commit - .span2 - %center= image_tag "merge.png", class: 'mr_direction_tip' - .span5 - .mr_branch_box - %h5 To (Base Branch) - .body - .padded= f.select(:target_branch, @project.heads.map(&:name), { include_blank: "Select branch" }, {class: 'chosen span4'}) - .mr_target_commit + .span2 + %center= image_tag "merge.png", class: 'mr_direction_tip' + .span5 + .mr_branch_box + %h5.cgray To (Base Branch) + .body + .padded= f.select(:target_branch, @repository.heads.map(&:name), { include_blank: "Select branch" }, {class: 'chosen span4'}) + .mr_target_commit - %h4.cdark 2. Fill info + %fieldset + %legend 2. Fill info - .clearfix - .merge_requests_form_box - .top_box_content - = f.label :title do - %strong= "Title *" - .input= f.text_field :title, class: "input-xxlarge pad js-gfm-input", maxlength: 255, rows: 5, required: true - .merge_requests_middle_box - .merge_requests_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 user" }, {class: 'chosen span3'}) - .merge_requests_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.ui-box-show + .ui-box-head + .clearfix + = f.label :title do + %strong= "Title *" + .input= f.text_field :title, class: "input-xxlarge pad js-gfm-input", maxlength: 255, rows: 5, required: true + .ui-box-body + .clearfix + .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 user" }, {class: 'chosen span3'}) + .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'}) .control-group .form-actions - = f.submit 'Save', class: "btn save-btn" + - if @merge_request.new_record? + = f.submit 'Submit merge request', class: "btn success" + -else + = f.submit 'Save changes', class: "save-btn btn" - if @merge_request.new_record? = link_to project_merge_requests_path(@project), class: "btn cancel-btn" do Cancel @@ -59,8 +64,9 @@ :javascript $(function(){ disableButtonIfEmptyField("#merge_request_title", ".save-btn"); - var source_branch = $("#merge_request_source_branch"); - var target_branch = $("#merge_request_target_branch"); + + var source_branch = $("#merge_request_source_branch") + , target_branch = $("#merge_request_target_branch"); $.get("#{branch_from_project_merge_requests_path(@project)}", {ref: source_branch.val() }); $.get("#{branch_to_project_merge_requests_path(@project)}", {ref: target_branch.val() }); diff --git a/app/views/merge_requests/_show.html.haml b/app/views/merge_requests/_show.html.haml index 8285a56d184..cefd33c0cdf 100644 --- a/app/views/merge_requests/_show.html.haml +++ b/app/views/merge_requests/_show.html.haml @@ -1,31 +1,33 @@ -= render "merge_requests/show/mr_title" -= render "merge_requests/show/how_to_merge" -= render "merge_requests/show/mr_box" -= render "merge_requests/show/mr_accept" -- if @project.gitlab_ci? - = render "merge_requests/show/mr_ci" -= render "merge_requests/show/commits" +.merge-request + = render "merge_requests/show/mr_title" + = render "merge_requests/show/how_to_merge" + = render "merge_requests/show/mr_box" + = render "merge_requests/show/mr_accept" + - if @project.gitlab_ci? + = render "merge_requests/show/mr_ci" + = render "merge_requests/show/commits" -- if @commits.present? - %ul.nav.nav-tabs.mr_nav_tabs - %li - = link_to "#notes", title: "Discussion", "data-url" => project_merge_request_path(@project, @merge_request), class: "merge-notes-tab tab" do - %i.icon-comments - Discussion - %li - = link_to "#diffs", title: "Diff", "data-url" => diffs_project_merge_request_path(@project, @merge_request), class: "merge-diffs-tab tab" do - %i.icon-list-alt - Diff + - if @commits.present? + %ul.nav.nav-tabs + %li.notes-tab{data: {action: 'notes'}} + = link_to project_merge_request_path(@project, @merge_request) do + %i.icon-comment + Discussion + %li.diffs-tab{data: {action: 'diffs'}} + = link_to diffs_project_merge_request_path(@project, @merge_request) do + %i.icon-list-alt + Diff -.merge_request_notes.voting_notes#notes{ class: (controller.action_name == 'show') ? "" : "hide" } - = render "notes/notes_with_form" -.merge-request-diffs - = render "merge_requests/show/diffs" if @diffs -.status + .notes.tab-content.voting_notes#notes{ class: (controller.action_name == 'show') ? "" : "hide" } + = render "notes/notes_with_form" + .diffs.tab-content + = render "merge_requests/show/diffs" if @diffs + .status :javascript + var merge_request; $(function(){ - MergeRequest.init({ + merge_request = new MergeRequest({ url_to_automerge_check: "#{automerge_check_project_merge_request_path(@project, @merge_request)}", check_enable: #{@merge_request.state == MergeRequest::UNCHECKED ? "true" : "false"}, url_to_ci_check: "#{ci_status_project_merge_request_path(@project, @merge_request)}", @@ -33,10 +35,5 @@ current_state: "#{@merge_request.human_state}", action: "#{controller.action_name}" }); - - $(".edit_merge_request").live("ajax:beforeSend", function() { - $('.can_be_merged').hide(); - $('.merge_in_progress').show(); - }) - }) + }); diff --git a/app/views/merge_requests/automerge.js.haml b/app/views/merge_requests/automerge.js.haml index 93e184455af..e01ff662e7d 100644 --- a/app/views/merge_requests/automerge.js.haml +++ b/app/views/merge_requests/automerge.js.haml @@ -3,5 +3,5 @@ location.reload(); -else :plain - MergeRequest.already_cannot_be_merged() + merge_request.alreadyOrCannotBeMerged() diff --git a/app/views/merge_requests/commits.js.haml b/app/views/merge_requests/commits.js.haml index 76322bdb210..923b1ea032f 100644 --- a/app/views/merge_requests/commits.js.haml +++ b/app/views/merge_requests/commits.js.haml @@ -1,4 +1,4 @@ :plain - $(".merge-request-commits").html("#{escape_javascript(render(partial: "commits"))}"); + merge_request.$(".commits").html("#{escape_javascript(render(partial: "commits"))}"); diff --git a/app/views/merge_requests/diffs.js.haml b/app/views/merge_requests/diffs.js.haml index c758cf69015..266892c01ef 100644 --- a/app/views/merge_requests/diffs.js.haml +++ b/app/views/merge_requests/diffs.js.haml @@ -1,3 +1,2 @@ :plain - $(".merge-request-diffs").html("#{escape_javascript(render(partial: "merge_requests/show/diffs"))}"); - + merge_request.$(".diffs").html("#{escape_javascript(render(partial: "merge_requests/show/diffs"))}"); diff --git a/app/views/merge_requests/index.html.haml b/app/views/merge_requests/index.html.haml index 5b234bfbe02..43651a5ca15 100644 --- a/app/views/merge_requests/index.html.haml +++ b/app/views/merge_requests/index.html.haml @@ -1,48 +1,35 @@ +- if can? current_user, :write_issue, @project + = link_to new_project_merge_request_path(@project), class: "right btn primary", title: "New Merge Request" do + %i.icon-plus + New Merge Request %h3.page_title Merge Requests - - if can? current_user, :write_issue, @project - = link_to new_project_merge_request_path(@project), class: "right btn", title: "New Merge Request" do - New Merge Request %br -.ui-box - .title - .left - %ul.nav.nav-pills - %li{class: ("active" if (params[:f] == 'open' || !params[:f]))} - = link_to project_merge_requests_path(@project, f: 'open', milestone_id: params[:milestone_id]) do - Open - %li{class: ("active" if params[:f] == "closed")} - = link_to project_merge_requests_path(@project, f: "closed", milestone_id: params[:milestone_id]) do - Closed - %li{class: ("active" if params[:f] == 'assigned-to-me')} - = link_to project_merge_requests_path(@project, f: 'assigned-to-me', milestone_id: params[:milestone_id]) do - To Me - %li{class: ("active" if params[:f] == 'all')} - = link_to project_merge_requests_path(@project, f: 'all', milestone_id: params[:milestone_id]) do - All - .right - = form_tag project_merge_requests_path(@project), id: "merge_requests_search_form", method: :get, class: :right do - = 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] + @project.milestones.order("id desc").all, "id", "title", params[:milestone_id]), prompt: "Milestone") - = hidden_field_tag :f, params[:f] - .clearfix +.row + .span3 + = render 'filter', entity: 'issue' + .span9 + .ui-box + .title + = form_tag project_merge_requests_path(@project), id: "merge_requests_search_form", method: :get, class: :left do + = 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] + @project.milestones.order("id desc").all, "id", "title", params[:milestone_id]), prompt: "Milestone") + = hidden_field_tag :f, params[:f] + .clearfix - %ul.well-list - = render @merge_requests - - if @merge_requests.blank? - %li - %h4.nothing_here_message Nothing to show here - - if @merge_requests.present? - %li.bottom - .row - .span7= paginate @merge_requests, theme: "gitlab" - .span4.right - %span.cgray.right #{@merge_requests.total_count} merge requests for this filter + %ul.well-list + = render @merge_requests + - if @merge_requests.blank? + %li + %h4.nothing_here_message Nothing to show here + - if @merge_requests.present? + %li.bottom + .left= paginate @merge_requests, theme: "gitlab" + .right + %span.cgray.right #{@merge_requests.total_count} merge requests for this filter :javascript - $(function() { - merge_requestsPage(); - }) + $(merge_requestsPage); diff --git a/app/views/merge_requests/show.js.haml b/app/views/merge_requests/show.js.haml index 7f423c786de..2ce6eb63290 100644 --- a/app/views/merge_requests/show.js.haml +++ b/app/views/merge_requests/show.js.haml @@ -1,2 +1,2 @@ :plain - $(".merge-request-notes").html("#{escape_javascript(render notes/notes_with_form")}"); + merge_request.$(".notes").html("#{escape_javascript(render "notes/notes_with_form")}"); diff --git a/app/views/merge_requests/show/_commits.html.haml b/app/views/merge_requests/show/_commits.html.haml index 796922776d9..5e27b6dc25a 100644 --- a/app/views/merge_requests/show/_commits.html.haml +++ b/app/views/merge_requests/show/_commits.html.haml @@ -1,18 +1,18 @@ - if @commits.present? .ui-box - %h5 + %h5.title %i.icon-list Commits (#{@commits.count}) - .merge-request-commits + .commits - if @commits.count > 8 - %ul.first_mr_commits.well-list + %ul.first-commits.well-list - @commits.first(8).each do |commit| = render "commits/commit", commit: commit %li.bottom 8 of #{@commits.count} commits displayed. %strong - %a.mr_show_all_commits Click here to show all - %ul.all_mr_commits.hide.well-list + %a.show-all-commits Click here to show all + %ul.all-commits.hide.well-list - @commits.each do |commit| = render "commits/commit", commit: commit diff --git a/app/views/merge_requests/show/_mr_accept.html.haml b/app/views/merge_requests/show/_mr_accept.html.haml index f24228856ff..128ffe76782 100644 --- a/app/views/merge_requests/show/_mr_accept.html.haml +++ b/app/views/merge_requests/show/_mr_accept.html.haml @@ -9,19 +9,24 @@ %span = form_for [:automerge, @project, @merge_request], remote: true, method: :get do |f| %p - You can accept this request automatically. - If you still want to do it manually - + You can accept this request automatically. + If you still want to do it manually - %strong= link_to "click here", "#", class: "how_to_merge_link vlink", title: "How To Merge" for instructions .accept_group - = f.submit "Accept Merge Request", class: "btn small success accept_merge_request" - - unless @project.root_ref? @merge_request.source_branch + = f.submit "Accept Merge Request", class: "btn success accept_merge_request" + - unless @project.root_ref? @merge_request.source_branch .remove_branch_holder - = label_tag :should_remove_source_branch, class: "checkbox" do + = label_tag :should_remove_source_branch, class: "checkbox" do = check_box_tag :should_remove_source_branch Remove source-branch .clearfix - + + + .automerge_widget.no_satellite{style: "display:none"} + .alert.alert-error + %span + %strong This repository does not have satellite. Ask administrator to fix this issue .automerge_widget.cannot_be_merged{style: "display:none"} .alert.alert-info @@ -40,6 +45,6 @@ .alert.alert-info %strong This merge request already can not be merged. Try to reload page. - .merge_in_progress.hide + .merge-in-progress.hide %span.cgray Merge is in progress. Please wait. Page will be automatically reloaded. = image_tag "ajax_loader.gif" diff --git a/app/views/merge_requests/show/_mr_box.html.haml b/app/views/merge_requests/show/_mr_box.html.haml index cd33732d191..644d7fcc58e 100644 --- a/app/views/merge_requests/show/_mr_box.html.haml +++ b/app/views/merge_requests/show/_mr_box.html.haml @@ -1,5 +1,5 @@ -.main_box - .top_box_content +.ui-box.ui-box-show + .ui-box-head %h4.box-title - if @merge_request.merged .error.status_info @@ -9,7 +9,7 @@ .error.status_info Closed = gfm escape_once(@merge_request.title) - .middle_box_content + .ui-box-body %div %cite.cgray Created at #{@merge_request.created_at.stamp("Aug 21, 2011")} by #{link_to_member(@project, @merge_request.author)} @@ -22,7 +22,7 @@ - if @merge_request.closed - .bottom_box_content + .ui-box-bottom - if @merge_request.merged? %span Merged by #{link_to_member(@project, @merge_request.merge_event.author)} diff --git a/app/views/milestones/show.html.haml b/app/views/milestones/show.html.haml index c4975c72ef2..fc7ae51f184 100644 --- a/app/views/milestones/show.html.haml +++ b/app/views/milestones/show.html.haml @@ -27,8 +27,8 @@ %span All issues for this milestone are closed. You may close milestone now. = link_to 'Close Milestone', project_milestone_path(@project, @milestone, milestone: {closed: true }), method: :put, class: "btn small danger" -.main_box - .top_box_content +.ui-box.ui-box-show + .ui-box-head %h4.box-title - if @milestone.closed .error.status_info Closed @@ -37,52 +37,47 @@ = gfm escape_once(@milestone.title) - .middle_box_content - %h5 + .ui-box-body + %p Progress: - %small - #{@milestone.closed_items_count} closed - – - #{@milestone.open_items_count} open + #{@milestone.closed_items_count} closed + – + #{@milestone.open_items_count} open %span.right= @milestone.expires_at .progress.progress-info .bar{style: "width: #{@milestone.percent_complete}%;"} - if @milestone.description.present? - .bottom_box_content + .ui-box-bottom = preserve do = markdown @milestone.description .row .span6 - %table.milestone-issue-filter - %thead - %tr - %th - %ul.nav.nav-pills - %li.active= link_to('Open Issues', '#') - %li=link_to('All Issues', '#') - - @issues.each do |issue| - %tr{data: {closed: issue.closed}} - %td + .ui-box.milestone-issue-filter + .title + %ul.nav.nav-pills + %li.active= link_to('Open Issues', '#') + %li=link_to('All Issues', '#') + %ul.well-list + - @issues.each do |issue| + %li{data: {closed: issue.closed}} = link_to [@project, issue] do %span.badge.badge-info ##{issue.id} – = link_to_gfm truncate(issue.title, length: 60), [@project, issue] .span6 - %table.milestone-merge-requests-filter - %thead - %tr - %th - %ul.nav.nav-pills - %li.active= link_to('Open Merge Requests', '#') - %li=link_to('All Merge Requests', '#') - - @merge_requests.each do |merge_request| - %tr{data: {closed: merge_request.closed}} - %td + .ui-box.milestone-merge-requests-filter + .title + %ul.nav.nav-pills + %li.active= link_to('Open Merge Requests', '#') + %li=link_to('All Merge Requests', '#') + %ul.well-list + - @merge_requests.each do |merge_request| + %li{data: {closed: merge_request.closed}} = link_to [@project, merge_request] do %span.badge.badge-info ##{merge_request.id} – diff --git a/app/views/notes/_note.html.haml b/app/views/notes/_note.html.haml index 8881cf5a847..6f7eea9827f 100644 --- a/app/views/notes/_note.html.haml +++ b/app/views/notes/_note.html.haml @@ -28,6 +28,8 @@ = preserve do = markdown(note.note) - if note.attachment.url + - if note.attachment.image? + = image_tag note.attachment.url, class: 'thumbnail span4' .attachment.right = link_to note.attachment.url, target: "_blank" do %i.icon-attachment diff --git a/app/views/notify/issue_status_changed_email.html.haml b/app/views/notify/issue_status_changed_email.html.haml index c433e80c9e5..27168eef742 100644 --- a/app/views/notify/issue_status_changed_email.html.haml +++ b/app/views/notify/issue_status_changed_email.html.haml @@ -1,8 +1,8 @@ %td.content{align: "left", style: "font-family: Helvetica, Arial, sans-serif; padding: 20px 0 0;", valign: "top", width: "600"} %table{border: "0", cellpadding: "0", cellspacing: "0", style: "color: #717171; font: normal 11px Helvetica, Arial, sans-serif; margin: 0; padding: 0;", width: "600"} %tr - %td{style: "font-size: 1px; line-height: 1px;", width: "21"} - %td{align: "left", style: "padding: 20px 0 0;"} + %td{width: "21"} + %td %h2{style: "color:#646464; font-weight: bold; margin: 0; padding: 0; line-height: 26px; font-size: 18px; font-family: Helvetica, Arial, sans-serif; "} = "Issue was #{@issue_status} by #{@updated_by.name}" %td{style: "font-size: 1px; line-height: 1px;", width: "21"} diff --git a/app/views/notify/new_issue_email.html.haml b/app/views/notify/new_issue_email.html.haml index fba4b865487..3cb5351319e 100644 --- a/app/views/notify/new_issue_email.html.haml +++ b/app/views/notify/new_issue_email.html.haml @@ -1,13 +1,13 @@ %td.content{align: "left", style: "font-family: Helvetica, Arial, sans-serif; padding: 20px 0 0;", valign: "top", width: "600"} %table{border: "0", cellpadding: "0", cellspacing: "0", style: "color: #717171; font: normal 11px Helvetica, Arial, sans-serif; margin: 0; padding: 0;", width: "600"} %tr - %td{style: "font-size: 1px; line-height: 1px;", width: "21"} - %td{align: "left", style: "padding: 20px 0 0;"} + %td{width: "21"} + %td %h2{style: "color:#646464; font-weight: bold; margin: 0; padding: 0; line-height: 26px; font-size: 18px; font-family: Helvetica, Arial, sans-serif; "} New Issue was created and assigned to you. - %td{style: "font-size: 1px; line-height: 1px;", width: "21"} + %td{width: "21"} %tr - %td{style: "font-size: 1px; line-height: 1px;", width: "21"} + %td{width: "21"} %td{align: "left", style: "padding: 20px 0 0;"} %p{style: "color:#646464 !important; line-height: 26px; font-size: 16px; font-family: Helvetica, Arial, sans-serif; "} = "Issue ##{@issue.id}" diff --git a/app/views/notify/new_merge_request_email.html.haml b/app/views/notify/new_merge_request_email.html.haml index 9819767011e..990d4d2aa87 100644 --- a/app/views/notify/new_merge_request_email.html.haml +++ b/app/views/notify/new_merge_request_email.html.haml @@ -14,6 +14,6 @@ %p{style: "color:#767676; font-weight: normal; margin: 0; padding: 0; line-height: 20px; font-size: 12px;font-family: Helvetica, Arial, sans-serif; "} Branches: #{@merge_request.source_branch} → #{@merge_request.target_branch} %p{style: "color:#767676; font-weight: normal; margin: 0; padding: 0; line-height: 20px; font-size: 12px;font-family: Helvetica, Arial, sans-serif; "} - Asignee: #{@merge_request.author_name} → #{@merge_request.assignee_name} + Assignee: #{@merge_request.author_name} → #{@merge_request.assignee_name} %td diff --git a/app/views/notify/note_merge_request_email.html.haml b/app/views/notify/note_merge_request_email.html.haml index 764cd094b76..3857f2f0318 100644 --- a/app/views/notify/note_merge_request_email.html.haml +++ b/app/views/notify/note_merge_request_email.html.haml @@ -1,23 +1,27 @@ %td.content{align: "left", style: "font-family: Helvetica, Arial, sans-serif; padding: 20px 0 0;", valign: "top", width: "600"} %table{border: "0", cellpadding: "0", cellspacing: "0", style: "color: #717171; font: normal 11px Helvetica, Arial, sans-serif; margin: 0; padding: 0;", width: "600"} %tr - %td{style: "font-size: 1px; line-height: 1px;", width: "21"} - %td{align: "left", style: "padding: 20px 0 0;"} - %h2{style: "color:#646464; font-weight: bold; margin: 0; padding: 0; line-height: 26px; font-size: 18px; font-family: Helvetica, Arial, sans-serif; "} - = "New comment for Merge Request !#{@merge_request.id}" - = link_to_gfm truncate(@merge_request.title, length: 16), project_merge_request_url(@merge_request.project, @merge_request, anchor: "note_#{@note.id}") - %td{style: "font-size: 1px; line-height: 1px;", width: "21"} + %td{width: "21"} + %td + %h2{style: "color:#646464; font-weight: normal;"} + - if @note.for_diff_line? + = link_to "New comment on diff", diffs_project_merge_request_url(@merge_request.project, @merge_request, anchor: "note_#{@note.id}") + - else + = link_to "New comment", project_merge_request_url(@merge_request.project, @merge_request, anchor: "note_#{@note.id}") + for Merge Request ##{@merge_request.id} + %cite "#{truncate(@merge_request.title, length: 20)}" + %td{width: "21"} %tr - %td{style: "font-size: 1px; line-height: 1px;", width: "21"} - %td{style: "padding: 15px 0 15px;", valign: "top"} - %p{style: "color:#767676; font-weight: normal; margin: 0; padding: 0; line-height: 20px; font-size: 12px;font-family: Helvetica, Arial, sans-serif; "} - %a{href: "#", style: "color: #0eb6ce; text-decoration: none;"} #{@note.author_name} + %td{width: "21"} + %td + %p + %strong #{@note.author_name} left next message: %br %table{border: "0", cellpadding: "0", cellspacing: "0", width: "558"} %tr %td{valign: "top"} - %div{ style: "background:#f5f5f5; padding:20px;border:1px solid #ddd" } + %div{ style: "background:#f5f5f5; padding:10px 20px;border:1px solid #ddd" } = markdown(@note.note) - %td{style: "font-size: 1px; line-height: 1px;", width: "21"} + %td{width: "21"} diff --git a/app/views/notify/reassigned_issue_email.html.haml b/app/views/notify/reassigned_issue_email.html.haml index 31a5d23242c..bc2d6f7078b 100644 --- a/app/views/notify/reassigned_issue_email.html.haml +++ b/app/views/notify/reassigned_issue_email.html.haml @@ -2,7 +2,7 @@ %table{border: "0", cellpadding: "0", cellspacing: "0", style: "color: #717171; font: normal 11px Helvetica, Arial, sans-serif; margin: 0; padding: 0;", width: "600"} %tr %td{style: "font-size: 1px; line-height: 1px;", width: "21"} - %td{align: "left", style: "padding: 20px 0 0;"} + %td %h2{style: "color:#646464; font-weight: bold; margin: 0; padding: 0; line-height: 26px; font-size: 18px; font-family: Helvetica, Arial, sans-serif; "} = "Reassigned Issue ##{@issue.id}" = link_to_gfm truncate(@issue.title, length: 30), project_issue_url(@issue.project, @issue) diff --git a/app/views/profiles/account.html.haml b/app/views/profiles/account.html.haml index 3c290948d6c..522e45e637a 100644 --- a/app/views/profiles/account.html.haml +++ b/app/views/profiles/account.html.haml @@ -69,7 +69,7 @@ %i.icon-ok Saved %span.update-failed.cred.hide - %i.icon-ok + %i.icon-remove Failed %ul.cred %li It will change web url for personal projects. diff --git a/app/views/profiles/show.html.haml b/app/views/profiles/show.html.haml index 934c1fdf7c4..64f931ca887 100644 --- a/app/views/profiles/show.html.haml +++ b/app/views/profiles/show.html.haml @@ -64,7 +64,7 @@ %legend Personal projects: %small.right - %span= current_user.my_own_projects.count + %span= current_user.personal_projects.count of %span= current_user.projects_limit .padded diff --git a/app/views/projects/_form.html.haml b/app/views/projects/_form.html.haml index 7044d1f20be..c8eacdc2a46 100644 --- a/app/views/projects/_form.html.haml +++ b/app/views/projects/_form.html.haml @@ -15,13 +15,13 @@ = f.label :path do Repository .controls - = text_field_tag :ppath, @project.path_to_repo, class: "xxlarge", readonly: true + = text_field_tag :ppath, @repository.path_to_repo, class: "xxlarge", readonly: true - - unless @project.heads.empty? + - unless @repository.heads.empty? .clearfix = f.label :default_branch, "Default Branch" - .input= f.select(:default_branch, @project.heads.map(&:name), {}, style: "width:210px;") + .input= f.select(:default_branch, @repository.heads.map(&:name), {}, style: "width:210px;") %fieldset.features %legend Features: diff --git a/app/views/projects/_new_form.html.haml b/app/views/projects/_new_form.html.haml index 2ef29cb0c65..2391c750bc8 100644 --- a/app/views/projects/_new_form.html.haml +++ b/app/views/projects/_new_form.html.haml @@ -7,7 +7,7 @@ Project name is .input = f.text_field :name, placeholder: "Example Project", class: "xxlarge" - = f.submit 'Create project', class: "btn primary project-submit" + = f.submit 'Create project', class: "btn success project-submit" - if current_user.several_namespaces? .clearfix diff --git a/app/views/protected_branches/index.html.haml b/app/views/protected_branches/index.html.haml index f408fd16c2c..c1ecceda435 100644 --- a/app/views/protected_branches/index.html.haml +++ b/app/views/protected_branches/index.html.haml @@ -1,51 +1,54 @@ -= render "repositories/branches_head" += render "commits/head" +.row + .span3 + = render "repositories/filter" + .span9 + .alert + %p Protected branches designed to prevent push for all except #{link_to "masters", help_permissions_path, class: "vlink"}. + %p This ability allows: + %ul + %li keep stable branches secured + %li forced code review before merge to protected branches + %p Read more about project permissions #{link_to "here", help_permissions_path, class: "vlink"} -.alert - %p Protected branches designed to prevent push for all except #{link_to "masters", help_permissions_path, class: "vlink"}. - %p This ability allows: - %ul - %li keep stable branches secured - %li forced code review before merge to protected branches - %p Read more about project permissions #{link_to "here", help_permissions_path, class: "vlink"} + - if can? current_user, :admin_project, @project + = form_for [@project, @protected_branch] do |f| + -if @protected_branch.errors.any? + .alert-message.block-message.error + %ul + - @protected_branch.errors.full_messages.each do |msg| + %li= msg -- if can? current_user, :admin_project, @project - = form_for [@project, @protected_branch] do |f| - -if @protected_branch.errors.any? - .alert-message.block-message.error - %ul - - @protected_branch.errors.full_messages.each do |msg| - %li= msg + .entry.clearfix + = f.label :name, "Branch" + .span3 + = f.select(:name, @project.open_branches.map { |br| [br.name, br.name] } , {include_blank: "Select branch"}, {class: "chosen span3"}) + + = f.submit 'Protect', class: "primary btn" - .entry.clearfix - = f.label :name, "Branch" - .span3 - = f.select(:name, @project.open_branches.map { |br| [br.name, br.name] } , {include_blank: "Select branch"}, {class: "chosen span3"}) - - = f.submit 'Protect', class: "primary btn" - -- unless @branches.empty? - %table - %thead - %tr - %th Name - %th Last commit - %th - %tbody - - @branches.each do |branch| - %tr - %td - = link_to project_commits_path(@project, branch.name) do - %strong= branch.name - - if branch.name == @project.root_ref - %span.label default - %td - - if branch.commit - = link_to project_commit_path(@project, branch.commit.id) do - = truncate branch.commit.id.to_s, length: 10 - = time_ago_in_words(branch.commit.committed_date) - ago - - else - (branch was removed from repository) - %td - - if can? current_user, :admin_project, @project - = link_to 'Unprotect', [@project, branch], confirm: 'Are you sure?', method: :delete, class: "danger btn small" + - unless @branches.empty? + %table + %thead + %tr + %th Name + %th Last commit + %th + %tbody + - @branches.each do |branch| + %tr + %td + = link_to project_commits_path(@project, branch.name) do + %strong= branch.name + - if @project.root_ref?(branch.name) + %span.label default + %td + - if branch.commit + = link_to project_commit_path(@project, branch.commit.id) do + = truncate branch.commit.id.to_s, length: 10 + = time_ago_in_words(branch.commit.committed_date) + ago + - else + (branch was removed from repository) + %td + - if can? current_user, :admin_project, @project + = link_to 'Unprotect', [@project, branch], confirm: 'Are you sure?', method: :delete, class: "danger btn small" diff --git a/app/views/repositories/_branch.html.haml b/app/views/repositories/_branch.html.haml index 2728b100ff6..a6faa5fd633 100644 --- a/app/views/repositories/_branch.html.haml +++ b/app/views/repositories/_branch.html.haml @@ -8,7 +8,7 @@ - else %i.icon-unlock %strong= truncate(branch.name, length: 60) - - if branch.name == @project.root_ref + - if branch.name == @repository.root_ref %span.label default %td = link_to project_commit_path(@project, commit.id), class: 'commit_short_id' do @@ -22,6 +22,6 @@ %td - if can? current_user, :download_code, @project = link_to archive_project_repository_path(@project, ref: branch.name) do - %i.icon-download + %i.icon-download-alt Download diff --git a/app/views/repositories/_feed.html.haml b/app/views/repositories/_feed.html.haml index 496328baca5..44380133718 100644 --- a/app/views/repositories/_feed.html.haml +++ b/app/views/repositories/_feed.html.haml @@ -5,7 +5,7 @@ = link_to project_commits_path(@project, commit.head.name) do %strong = commit.head.name - - if commit.head.name == @project.root_ref + - if @project.root_ref?(commit.head.name) %span.label default %td diff --git a/app/views/repositories/_branches_head.html.haml b/app/views/repositories/_filter.html.haml index 8f3e1ba3f81..e718d48190a 100644 --- a/app/views/repositories/_branches_head.html.haml +++ b/app/views/repositories/_filter.html.haml @@ -1,10 +1,9 @@ -= render "commits/head" -%ul.nav.nav-pills +%ul.nav.nav-pills.nav-stacked = nav_link(path: 'repositories#show') do = link_to 'Recent', project_repository_path(@project) = nav_link(path: 'protected_branches#index') do = link_to project_protected_branches_path(@project) do - %i.icon-lock Protected + %i.icon-lock = nav_link(path: 'repositories#branches') do - = link_to 'All', branches_project_repository_path(@project) + = link_to 'All branches', branches_project_repository_path(@project) diff --git a/app/views/repositories/branches.html.haml b/app/views/repositories/branches.html.haml index 4c246c69d7c..14b5082e44e 100644 --- a/app/views/repositories/branches.html.haml +++ b/app/views/repositories/branches.html.haml @@ -1,12 +1,15 @@ -= render "repositories/branches_head" -- unless @branches.empty? - %table - %thead - %tr - %th Name - %th Last commit - %th - - %tbody - - @branches.each do |branch| - = render "repositories/branch", branch: branch += render "commits/head" +.row + .span3 + = render "filter" + .span9 + - unless @branches.empty? + %table + %thead + %tr + %th Name + %th Last commit + %th + %tbody + - @branches.each do |branch| + = render "repositories/branch", branch: branch diff --git a/app/views/repositories/show.html.haml b/app/views/repositories/show.html.haml index fd0abac8414..e58e16f8bf1 100644 --- a/app/views/repositories/show.html.haml +++ b/app/views/repositories/show.html.haml @@ -1,11 +1,14 @@ -= render "branches_head" - -%table - %thead - %tr - %th Name - %th Last commit - %th - - @activities.each do |update| - = render "repositories/branch", branch: update.head += render "commits/head" +.row + .span3 + = render "filter" + .span9 + %table + %thead + %tr + %th Name + %th Last commit + %th + - @activities.each do |update| + = render "repositories/branch", branch: update.head diff --git a/app/views/repositories/stats.html.haml b/app/views/repositories/stats.html.haml index a93814a4777..bdf047f1e98 100644 --- a/app/views/repositories/stats.html.haml +++ b/app/views/repositories/stats.html.haml @@ -7,7 +7,7 @@ %b Total commits: %span= @stats.commits_count %p - %b Total files in #{@project.root_ref}: + %b Total files in #{@repository.root_ref}: %span= @stats.files_count %p %b Authors: diff --git a/app/views/repositories/tags.html.haml b/app/views/repositories/tags.html.haml index 193cb2e30f2..d4b8bbe10d4 100644 --- a/app/views/repositories/tags.html.haml +++ b/app/views/repositories/tags.html.haml @@ -26,8 +26,14 @@ %td - if can? current_user, :download_code, @project = link_to archive_project_repository_path(@project, ref: tag.name) do - %i.icon-download + %i.icon-download-alt Download - else - %h3 No tags + %h3.nothing_here_message + Repository has no tags yet. + %br + %small + Use git tag command to add a new one: + %br + %span.monospace git tag -a v1.4 -m 'version 1.4' diff --git a/app/views/search/_result.html.haml b/app/views/search/_result.html.haml index 8b137891791..79bed4f737c 100644 --- a/app/views/search/_result.html.haml +++ b/app/views/search/_result.html.haml @@ -1 +1,85 @@ +%br +%h3.page_title + Search results + %span.cgray (#{@projects.count + @merge_requests.count + @issues.count + @wiki_pages.count}) +%hr +.search_results + .row + .span6 + %table + %thead + %tr + %th Projects + %tbody + - @projects.each do |project| + %tr + %td + = link_to project do + %strong.term= project.name_with_namespace + %small.cgray + last activity at + = project.last_activity_date.stamp("Aug 25, 2011") + - if @projects.blank? + %tr + %td + %h4.nothing_here_message No Projects + %br + %table + %thead + %tr + %th Merge Requests + %tbody + - @merge_requests.each do |merge_request| + %tr + %td + = link_to [merge_request.project, merge_request] do + %span.badge.badge-info ##{merge_request.id} + – + %strong.term= truncate merge_request.title, length: 50 + %strong.right + %span.label= merge_request.project.name + - if @merge_requests.blank? + %tr + %td + %h4.nothing_here_message No Merge Requests + .span6 + %table + %thead + %tr + %th Issues + %tbody + - @issues.each do |issue| + %tr + %td + = link_to [issue.project, issue] do + %span.badge.badge-info ##{issue.id} + – + %strong.term= truncate issue.title, length: 40 + %strong.right + %span.label= issue.project.name + - if @issues.blank? + %tr + %td + %h4.nothing_here_message No Issues + .span6 + %table + %thead + %tr + %th Wiki + %tbody + - @wiki_pages.each do |wiki_page| + %tr + %td + = link_to project_wiki_path(wiki_page.project, wiki_page) do + %strong.term= truncate wiki_page.title, length: 40 + %strong.right + %span.label= wiki_page.project.name + - if @wiki_pages.blank? + %tr + %td + %h4.nothing_here_message No wiki pages +:javascript + $(function() { + $(".search_results .term").highlight("#{escape_javascript(params[:search])}"); + }) diff --git a/app/views/search/show.html.haml b/app/views/search/show.html.haml index 8448193deb9..aa0d6d700d9 100644 --- a/app/views/search/show.html.haml +++ b/app/views/search/show.html.haml @@ -6,87 +6,4 @@ = search_field_tag :search, params[:search], placeholder: "issue 143", class: "input-xxlarge search-text-input", id: "dashboard_search" = submit_tag 'Search', class: "btn primary wide" - if params[:search].present? - %br - %h3 - Search results - %small (#{@projects.count + @merge_requests.count + @issues.count + @wiki_pages.count}) - %hr - .search_results - .row - .span6 - %table - %thead - %tr - %th Projects - %tbody - - @projects.each do |project| - %tr - %td - = link_to project do - %strong.term= project.name_with_namespace - %small.cgray - last activity at - = project.last_activity_date.stamp("Aug 25, 2011") - - if @projects.blank? - %tr - %td - %h4.nothing_here_message No Projects - %br - %table - %thead - %tr - %th Merge Requests - %tbody - - @merge_requests.each do |merge_request| - %tr - %td - = link_to [merge_request.project, merge_request] do - %span.badge.badge-info ##{merge_request.id} - – - %strong.term= truncate merge_request.title, length: 50 - %strong.right - %span.label= merge_request.project.name - - if @merge_requests.blank? - %tr - %td - %h4.nothing_here_message No Merge Requests - .span6 - %table - %thead - %tr - %th Issues - %tbody - - @issues.each do |issue| - %tr - %td - = link_to [issue.project, issue] do - %span.badge.badge-info ##{issue.id} - – - %strong.term= truncate issue.title, length: 40 - %strong.right - %span.label= issue.project.name - - if @issues.blank? - %tr - %td - %h4.nothing_here_message No Issues - .span6 - %table - %thead - %tr - %th Wiki - %tbody - - @wiki_pages.each do |wiki_page| - %tr - %td - = link_to project_wiki_path(wiki_page.project, wiki_page) do - %strong.term= truncate wiki_page.title, length: 40 - %strong.right - %span.label= wiki_page.project.name - - if @wiki_pages.blank? - %tr - %td - %h4.nothing_here_message No wiki pages - :javascript - $(function() { - $(".search_results .term").highlight("#{params[:search]}"); - }) + = render 'search/result' diff --git a/app/views/team_members/_form.html.haml b/app/views/team_members/_form.html.haml index e5d9a4a4b5e..a963e462a78 100644 --- a/app/views/team_members/_form.html.haml +++ b/app/views/team_members/_form.html.haml @@ -11,7 +11,7 @@ %h6 1. Choose people you want in the team .clearfix = f.label :user_ids, "People" - .input= select_tag(:user_ids, options_from_collection_for_select(User.active.not_in_project(@project).all, :id, :name), {data: {placeholder: "Select users"}, class: "chosen xxlarge", multiple: true}) + .input= select_tag(:user_ids, options_from_collection_for_select(User.active.not_in_project(@project).alphabetically, :id, :name), {data: {placeholder: "Select users"}, class: "chosen xxlarge", multiple: true}) %h6 2. Set access level for them .clearfix diff --git a/app/views/team_members/_team.html.haml b/app/views/team_members/_team.html.haml index 462e75af183..365d9b65942 100644 --- a/app/views/team_members/_team.html.haml +++ b/app/views/team_members/_team.html.haml @@ -1,6 +1,6 @@ - grouper_project_members(@project).each do |access, members| .ui-box - %h5 + %h5.title = Project.access_options.key(access).pluralize %small= members.size %ul.well-list diff --git a/app/views/team_members/import.html.haml b/app/views/team_members/import.html.haml index 34f7fb03288..de82f416248 100644 --- a/app/views/team_members/import.html.haml +++ b/app/views/team_members/import.html.haml @@ -9,7 +9,7 @@ %p.slead Choose project you want to use as team source: .padded = label_tag :source_project_id, "Project" - .input= select_tag(:source_project_id, options_from_collection_for_select(current_user.projects, :id, :name), prompt: "Select project", class: "chosen xxlarge", required: true) + .input= select_tag(:source_project_id, options_from_collection_for_select(current_user.authorized_projects, :id, :name_with_namespace), prompt: "Select project", class: "chosen xxlarge", required: true) .actions = submit_tag 'Import', class: "btn save-btn" diff --git a/app/views/team_members/show.html.haml b/app/views/team_members/show.html.haml index af9a6e6b92d..4008e8bd23e 100644 --- a/app/views/team_members/show.html.haml +++ b/app/views/team_members/show.html.haml @@ -8,8 +8,7 @@ = image_tag gravatar_icon(user.email, 60), class: "borders" %h3.page_title = user.name - %small - = user.email + %small (@#{user.username}) %hr .back_link diff --git a/app/views/tree/_tree.html.haml b/app/views/tree/_tree.html.haml index a632bb3b0d7..c2842959510 100644 --- a/app/views/tree/_tree.html.haml +++ b/app/views/tree/_tree.html.haml @@ -3,9 +3,13 @@ %span.arrow = link_to project_tree_path(@project, @ref) do = @project.name - - tree.breadcrumbs(6) do |link| + - tree.breadcrumbs(6) do |title, path| \/ - %li= link + %li + - if path + = link_to truncate(title, length: 40), project_tree_path(@project, path) + - else + = link_to title, '#' .clear %div.tree_progress @@ -26,7 +30,7 @@ %tr.tree-item %td.tree-item-file-name = image_tag "file_empty.png", size: '16x16' - = link_to "..", tree.up_dir_path + = link_to "..", project_tree_path(@project, tree.up_dir_path) %td %td %td diff --git a/app/views/tree/blob/_download.html.haml b/app/views/tree/blob/_download.html.haml index c307622995b..864c209db76 100644 --- a/app/views/tree/blob/_download.html.haml +++ b/app/views/tree/blob/_download.html.haml @@ -2,7 +2,7 @@ %center = link_to project_blob_path(@project, @id) do %div.padded - %br - = image_tag "download.png", width: 64 - %h3 + %h4 + %i.icon-download-alt + %br Download (#{number_to_human_size blob.size}) diff --git a/app/views/wikis/_form.html.haml b/app/views/wikis/_form.html.haml index 83b16b138d3..9eb2a571fe5 100644 --- a/app/views/wikis/_form.html.haml +++ b/app/views/wikis/_form.html.haml @@ -6,12 +6,12 @@ - @wiki.errors.full_messages.each do |msg| %li= msg - .main_box - .top_box_content + .ui-box.ui-box-show + .ui-box-head = f.label :title .input= f.text_field :title, class: 'span8' = f.hidden_field :slug - .middle_box_content + .ui-box-body .input %span.cgray Wiki content is parsed with #{link_to "GitLab Flavored Markdown", help_markdown_path, target: '_blank'}. @@ -19,7 +19,7 @@ %code [Link Title](page-slug) \. - .bottom_box_content + .ui-box-bottom = f.label :content .input= f.text_area :content, class: 'span8 js-gfm-input' .actions |