Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorMarin Jankovski <maxlazio@gmail.com>2015-01-23 23:38:46 +0300
committerMarin Jankovski <maxlazio@gmail.com>2015-01-23 23:38:46 +0300
commitc70dcd290704777104a136bd038dffc68daec4ab (patch)
tree95c4dbc6615c375ccbb13eddcbd241af8ee99c42 /app/views
parenta720dde67c2b488117ed57f7f07ab55f8150c352 (diff)
parent25a5c84820c273a2dd76baa600a095fecc7c526a (diff)
Merge branch 'master' into move_external_issue_tracker_away_from_yml_config
Diffstat (limited to 'app/views')
-rw-r--r--app/views/profiles/notifications/show.html.haml2
-rw-r--r--app/views/projects/_github_import_modal.html.haml22
-rw-r--r--app/views/projects/branches/new.html.haml3
-rw-r--r--app/views/projects/commit/_commit_box.html.haml23
-rw-r--r--app/views/projects/diffs/_file.html.haml3
-rw-r--r--app/views/projects/issues/_issues.html.haml2
-rw-r--r--app/views/projects/merge_requests/show/_mr_ci.html.haml6
-rw-r--r--app/views/projects/merge_requests/show/_remove_source_branch.html.haml2
-rw-r--r--app/views/projects/new.html.haml13
-rw-r--r--app/views/projects/notes/_note.html.haml26
-rw-r--r--app/views/projects/show.html.haml4
-rw-r--r--app/views/projects/tags/new.html.haml3
-rw-r--r--app/views/projects/tree/_submodule_item.html.haml10
-rw-r--r--app/views/users/_groups.html.haml7
14 files changed, 83 insertions, 43 deletions
diff --git a/app/views/profiles/notifications/show.html.haml b/app/views/profiles/notifications/show.html.haml
index 96fe91b9b20..bc6f76a2661 100644
--- a/app/views/profiles/notifications/show.html.haml
+++ b/app/views/profiles/notifications/show.html.haml
@@ -20,7 +20,7 @@
= radio_button_tag :notification_level, Notification::N_MENTION, @notification.mention?, class: 'trigger-submit'
.level-title
Mention
- %p You will receive notifications only for comments where you was @mentioned
+ %p You will receive notifications only for comments in which you were @mentioned
.radio
= label_tag nil, class: '' do
diff --git a/app/views/projects/_github_import_modal.html.haml b/app/views/projects/_github_import_modal.html.haml
new file mode 100644
index 00000000000..02c9ef45f2b
--- /dev/null
+++ b/app/views/projects/_github_import_modal.html.haml
@@ -0,0 +1,22 @@
+%div#github_import_modal.modal.hide
+ .modal-dialog
+ .modal-content
+ .modal-header
+ %a.close{href: "#", "data-dismiss" => "modal"} ×
+ %h3 GitHub OAuth import
+ .modal-body
+ You need to setup integration with GitHub first.
+ = link_to 'How to setup integration with GitHub', 'https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/integration/github.md'
+
+
+:javascript
+ $(function(){
+ var import_modal = $('#github_import_modal').modal({modal: true, show:false});
+ $('.how_to_import_link').bind("click", function(e){
+ e.preventDefault();
+ import_modal.show();
+ });
+ $('.modal-header .close').bind("click", function(){
+ import_modal.hide();
+ })
+ })
diff --git a/app/views/projects/branches/new.html.haml b/app/views/projects/branches/new.html.haml
index a6623240da1..2719bcc33bc 100644
--- a/app/views/projects/branches/new.html.haml
+++ b/app/views/projects/branches/new.html.haml
@@ -5,7 +5,7 @@
%h3.page-title
%i.fa.fa-code-fork
New branch
-= form_tag project_branches_path, method: :post, class: "form-horizontal" do
+= form_tag project_branches_path, method: :post, id: "new-branch-form", class: "form-horizontal" do
.form-group
= label_tag :branch_name, 'Name for new branch', class: 'control-label'
.col-sm-10
@@ -19,6 +19,7 @@
= link_to 'Cancel', project_branches_path(@project), class: 'btn btn-cancel'
:javascript
+ disableButtonIfAnyEmptyField($("#new-branch-form"), ".form-control", ".btn-create");
var availableTags = #{@project.repository.ref_names.to_json};
$("#ref").autocomplete({
diff --git a/app/views/projects/commit/_commit_box.html.haml b/app/views/projects/commit/_commit_box.html.haml
index e149f017f84..b41fb1437f2 100644
--- a/app/views/projects/commit/_commit_box.html.haml
+++ b/app/views/projects/commit/_commit_box.html.haml
@@ -37,18 +37,23 @@
- @commit.parents.each do |parent|
= link_to parent.short_id, project_commit_path(@project, parent)
-- if @branches.any?
- .commit-info-row
- %span.cgray
- Exists in
+.commit-info-row
+ - if @branches.any?
%span
- branch = commit_default_branch(@project, @branches)
- = link_to(branch, project_tree_path(@project, branch))
- - if @branches.any?
- and in
- = link_to("#{pluralize(@branches.count, "other branch")}", "#", class: "js-details-expand")
+ = link_to(project_tree_path(@project, branch)) do
+ %span.label.label-gray
+ %i.fa.fa-code-fork
+ = branch
+ - if @branches.any? || @tags.any?
+ = link_to("#", class: "js-details-expand") do
+ %span.label.label-gray
+ \...
%span.js-details-content.hide
- = commit_branches_links(@project, @branches)
+ - if @branches.any?
+ = commit_branches_links(@project, @branches)
+ - if @tags.any?
+ = commit_tags_links(@project, @tags)
.commit-box
%h3.commit-title
diff --git a/app/views/projects/diffs/_file.html.haml b/app/views/projects/diffs/_file.html.haml
index 34d13502231..8d080f710d8 100644
--- a/app/views/projects/diffs/_file.html.haml
+++ b/app/views/projects/diffs/_file.html.haml
@@ -9,6 +9,9 @@
.diff-btn-group
- if @commit.parent_ids.present?
= view_file_btn(@commit.parent_id, diff_file, project)
+ - elsif diff_file.diff.submodule?
+ - submodule_item = project.repository.blob_at(@commit.id, diff_file.file_path)
+ = submodule_link(submodule_item, @commit.id)
- else
- if diff_file.renamed_file
%span= "#{diff_file.old_path} renamed to #{diff_file.new_path}"
diff --git a/app/views/projects/issues/_issues.html.haml b/app/views/projects/issues/_issues.html.haml
index 010ca3b68b3..816851a8abe 100644
--- a/app/views/projects/issues/_issues.html.haml
+++ b/app/views/projects/issues/_issues.html.haml
@@ -1,6 +1,6 @@
.append-bottom-10
.check-all-holder
- = check_box_tag "check_all_issues", nil, false, class: "check_all_issues left"
+ = check_box_tag "check_all_issues", nil, false, class: "check_all_issues left", disabled: !can?(current_user, :modify_issue, @project)
= render 'shared/issuable_filter'
.clearfix
diff --git a/app/views/projects/merge_requests/show/_mr_ci.html.haml b/app/views/projects/merge_requests/show/_mr_ci.html.haml
index 941b15d3b32..ee7fd0ef157 100644
--- a/app/views/projects/merge_requests/show/_mr_ci.html.haml
+++ b/app/views/projects/merge_requests/show/_mr_ci.html.haml
@@ -3,21 +3,21 @@
%i.fa.fa-check
%span CI build passed
for #{@merge_request.last_commit_short_sha}.
- = link_to "Build page", ci_build_details_path(@merge_request)
+ = link_to "Build page", ci_build_details_path(@merge_request), :"data-no-turbolink" => "data-no-turbolink"
.ci_widget.ci-failed{style: "display:none"}
%i.fa.fa-times
%span CI build failed
for #{@merge_request.last_commit_short_sha}.
- = link_to "Build page", ci_build_details_path(@merge_request)
+ = link_to "Build page", ci_build_details_path(@merge_request), :"data-no-turbolink" => "data-no-turbolink"
- [:running, :pending].each do |status|
.ci_widget{class: "ci-#{status}", style: "display:none"}
%i.fa.fa-clock-o
%span CI build #{status}
for #{@merge_request.last_commit_short_sha}.
- = link_to "Build page", ci_build_details_path(@merge_request)
+ = link_to "Build page", ci_build_details_path(@merge_request), :"data-no-turbolink" => "data-no-turbolink"
.ci_widget
%i.fa.fa-spinner
diff --git a/app/views/projects/merge_requests/show/_remove_source_branch.html.haml b/app/views/projects/merge_requests/show/_remove_source_branch.html.haml
index 4fe5935bcf3..9bf6a9d081c 100644
--- a/app/views/projects/merge_requests/show/_remove_source_branch.html.haml
+++ b/app/views/projects/merge_requests/show/_remove_source_branch.html.haml
@@ -12,6 +12,6 @@
Failed to remove source branch '#{@merge_request.source_branch}'
.remove_source_branch_in_progress.hide
- %i.fa.fa-refresh.fa-spin
+ %i.fa.fa-spinner.fa-spin
&nbsp;
Removing source branch '#{@merge_request.source_branch}'. Please wait. Page will be automatically reloaded. &nbsp;
diff --git a/app/views/projects/new.html.haml b/app/views/projects/new.html.haml
index ccd02acd761..3e0f9cbd80b 100644
--- a/app/views/projects/new.html.haml
+++ b/app/views/projects/new.html.haml
@@ -40,13 +40,18 @@
The import will time out after 4 minutes. For big repositories, use a clone/push combination.
For SVN repositories, check #{link_to "this migrating from SVN doc.", "http://doc.gitlab.com/ce/workflow/migrating_from_svn.html"}
- - if github_import_enabled?
- .project-import.form-group
- .col-sm-2
- .col-sm-10
+ .project-import.form-group
+ .col-sm-2
+ .col-sm-10
+ - if github_import_enabled?
= link_to status_github_import_path do
%i.fa.fa-github
Import projects from GitHub
+ - else
+ = link_to '#', class: 'how_to_import_link light' do
+ %i.fa.fa-github
+ Import projects from GitHub
+ = render 'github_import_modal'
%hr.prepend-botton-10
diff --git a/app/views/projects/notes/_note.html.haml b/app/views/projects/notes/_note.html.haml
index 691c169b620..88c7b7ccf1a 100644
--- a/app/views/projects/notes/_note.html.haml
+++ b/app/views/projects/notes/_note.html.haml
@@ -28,14 +28,24 @@
%span.note-last-update
= note_timestamp(note)
- - if note.upvote?
- %span.vote.upvote.label.label-success
- %i.fa.fa-thumbs-up
- \+1
- - if note.downvote?
- %span.vote.downvote.label.label-danger
- %i.fa.fa-thumbs-down
- \-1
+ - if note.superceded?(@notes)
+ - if note.upvote?
+ %span.vote.upvote.label.label-gray.strikethrough
+ %i.fa.fa-thumbs-up
+ \+1
+ - if note.downvote?
+ %span.vote.downvote.label.label-gray.strikethrough
+ %i.fa.fa-thumbs-down
+ \-1
+ - else
+ - if note.upvote?
+ %span.vote.upvote.label.label-success
+ %i.fa.fa-thumbs-up
+ \+1
+ - if note.downvote?
+ %span.vote.downvote.label.label-danger
+ %i.fa.fa-thumbs-down
+ \-1
.note-body
diff --git a/app/views/projects/show.html.haml b/app/views/projects/show.html.haml
index af6e4567c1b..737a34decde 100644
--- a/app/views/projects/show.html.haml
+++ b/app/views/projects/show.html.haml
@@ -68,11 +68,11 @@
- @project.ci_services.each do |ci_service|
- if ci_service.active? && ci_service.respond_to?(:builds_path)
- if ci_service.respond_to?(:status_img_path)
- = link_to ci_service.builds_path do
+ = link_to ci_service.builds_path, :'data-no-turbolink' => 'data-no-turbolink' do
= image_tag ci_service.status_img_path, alt: "build status"
- else
%span.light CI provided by
- = link_to ci_service.title, ci_service.builds_path
+ = link_to ci_service.title, ci_service.builds_path, :'data-no-turbolink' => 'data-no-turbolink'
- if readme
.tab-pane#tab-readme
diff --git a/app/views/projects/tags/new.html.haml b/app/views/projects/tags/new.html.haml
index ad7ff8d3db8..289c52a2e3f 100644
--- a/app/views/projects/tags/new.html.haml
+++ b/app/views/projects/tags/new.html.haml
@@ -5,7 +5,7 @@
%h3.page-title
%i.fa.fa-code-fork
New tag
-= form_tag project_tags_path, method: :post, class: "form-horizontal" do
+= form_tag project_tags_path, method: :post, id: "new-tag-form", class: "form-horizontal" do
.form-group
= label_tag :tag_name, 'Name for new tag', class: 'control-label'
.col-sm-10
@@ -25,6 +25,7 @@
= link_to 'Cancel', project_tags_path(@project), class: 'btn btn-cancel'
:javascript
+ disableButtonIfAnyEmptyField($("#new-tag-form"), ".form-control", ".btn-create");
var availableTags = #{@project.repository.ref_names.to_json};
$("#ref").autocomplete({
diff --git a/app/views/projects/tree/_submodule_item.html.haml b/app/views/projects/tree/_submodule_item.html.haml
index 46e9be4af83..20c70cac699 100644
--- a/app/views/projects/tree/_submodule_item.html.haml
+++ b/app/views/projects/tree/_submodule_item.html.haml
@@ -1,14 +1,6 @@
-- tree, commit = submodule_links(submodule_item)
%tr{ class: "tree-item" }
%td.tree-item-file-name
%i.fa.fa-archive
- %span
- = link_to truncate(submodule_item.name, length: 40), tree
- @
- %span.monospace
- - if commit.nil?
- #{truncate_sha(submodule_item.id)}
- - else
- = link_to "#{truncate_sha(submodule_item.id)}", commit
+ = submodule_link(submodule_item, @ref)
%td
%td.hidden-xs
diff --git a/app/views/users/_groups.html.haml b/app/views/users/_groups.html.haml
index ea008c2dede..b9bd6aa3763 100644
--- a/app/views/users/_groups.html.haml
+++ b/app/views/users/_groups.html.haml
@@ -1,3 +1,4 @@
-- groups.each do |group|
- = link_to group, class: 'profile-groups-avatars', :title => group.name do
- - image_tag group_icon(group.path)
+.clearfix
+ - groups.each do |group|
+ = link_to group, class: 'profile-groups-avatars', title: group.name do
+ = image_tag group_icon(group.path), class: 'avatar s40'