Commit 9ca41f3a authored by Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre

Merge branch 'master' into fix-admin-should-be-able-to-add-himself-to-group

parents 8034b61b 76f00542
...@@ -27,6 +27,16 @@ The channels people will reach out on can be found on the [getting help page](ht ...@@ -27,6 +27,16 @@ The channels people will reach out on can be found on the [getting help page](ht
Sign up for the mailinglist, answer GitLab questions on StackOverflow or respond in the IRC channel. Sign up for the mailinglist, answer GitLab questions on StackOverflow or respond in the IRC channel.
You can also sign up on [CodeTriage](http://www.codetriage.com/gitlabhq/gitlabhq) to help with one issue every day. You can also sign up on [CodeTriage](http://www.codetriage.com/gitlabhq/gitlabhq) to help with one issue every day.
## I want to contribute!
If you want to contribute to GitLab, but are not sure where to start,
look for [issues](https://gitlab.com/gitlab-org/gitlab-ce/issues?milestone_id=&scope=all&sort=created_desc&state=opened&utf8=%E2%9C%93&assignee_id=&author_id=&milestone_title=&label_name=up-for-grabs)
with the label `up-for-grabs`.
These issues will be of reasonable size and challenge, for anyone to start
contributing to GitLab.
This was inspired by [an article by Kent C. Dodds](https://medium.com/@kentcdodds/first-timers-only-78281ea47455#.i2f363mx4).
## Issue tracker ## Issue tracker
To get support for your particular problem please use the [getting help channels](https://about.gitlab.com/getting-help/). To get support for your particular problem please use the [getting help channels](https://about.gitlab.com/getting-help/).
......
...@@ -116,23 +116,8 @@ GEM ...@@ -116,23 +116,8 @@ GEM
activemodel (>= 3.2.0) activemodel (>= 3.2.0)
activesupport (>= 3.2.0) activesupport (>= 3.2.0)
json (>= 1.7) json (>= 1.7)
celluloid (0.17.2) celluloid (0.16.0)
celluloid-essentials timers (~> 4.0.0)
celluloid-extras
celluloid-fsm
celluloid-pool
celluloid-supervision
timers (>= 4.1.1)
celluloid-essentials (0.20.5)
timers (>= 4.1.1)
celluloid-extras (0.20.5)
timers (>= 4.1.1)
celluloid-fsm (0.20.5)
timers (>= 4.1.1)
celluloid-pool (0.20.5)
timers (>= 4.1.1)
celluloid-supervision (0.20.5)
timers (>= 4.1.1)
charlock_holmes (0.7.3) charlock_holmes (0.7.3)
chunky_png (1.3.5) chunky_png (1.3.5)
cliver (0.3.2) cliver (0.3.2)
...@@ -757,7 +742,7 @@ GEM ...@@ -757,7 +742,7 @@ GEM
thor (0.19.1) thor (0.19.1)
thread_safe (0.3.5) thread_safe (0.3.5)
tilt (1.4.1) tilt (1.4.1)
timers (4.1.1) timers (4.0.4)
hitimes hitimes
timfel-krb5-auth (0.8.3) timfel-krb5-auth (0.8.3)
tinder (1.10.1) tinder (1.10.1)
......
...@@ -44,6 +44,7 @@ Workflow labels are purposely not very detailed since that would be hard to keep ...@@ -44,6 +44,7 @@ Workflow labels are purposely not very detailed since that would be hard to keep
- *UX* needs needs help from a UX designer - *UX* needs needs help from a UX designer
- *Frontend* needs help from a Front-end engineer - *Frontend* needs help from a Front-end engineer
- *Graphics* needs help from a Graphics designer - *Graphics* needs help from a Graphics designer
- *up-for-grabs* is an issue suitable for first-time contributors, of reasonable difficulty and size. Not exclusive with other labels.
Example workflow: when a UX designer provided a design but it needs frontend work they remove the UX label and add the frontend label. Example workflow: when a UX designer provided a design but it needs frontend work they remove the UX label and add the frontend label.
......
# For DEVELOPMENT only. Production uses Runit in
# https://gitlab.com/gitlab-org/omnibus-gitlab or the init scripts in
# lib/support/init.d, which call scripts in bin/ .
#
web: bundle exec unicorn_rails -p ${PORT:="3000"} -E ${RAILS_ENV:="development"} -c ${UNICORN_CONFIG:="config/unicorn.rb"} web: bundle exec unicorn_rails -p ${PORT:="3000"} -E ${RAILS_ENV:="development"} -c ${UNICORN_CONFIG:="config/unicorn.rb"}
worker: bundle exec sidekiq -q post_receive -q mailer -q archive_repo -q system_hook -q project_web_hook -q gitlab_shell -q incoming_email -q runner -q common -q mailers -q default worker: bundle exec sidekiq -q post_receive -q mailer -q archive_repo -q system_hook -q project_web_hook -q gitlab_shell -q incoming_email -q runner -q common -q mailers -q default
# mail_room: bundle exec mail_room -q -c config/mail_room.yml # mail_room: bundle exec mail_room -q -c config/mail_room.yml
app/assets/images/icon-link.png

726 Bytes | W: | H:

app/assets/images/icon-link.png

1.1 KB | W: | H:

app/assets/images/icon-link.png
app/assets/images/icon-link.png
app/assets/images/icon-link.png
app/assets/images/icon-link.png
  • 2-up
  • Swipe
  • Onion skin
@import "framework/fonts"; @import "framework/fonts";
@import "framework/variables"; @import "framework/variables";
@import "framework/mixins"; @import "framework/mixins";
@import "framework/layout";
@import 'framework/tw_bootstrap_variables'; @import 'framework/tw_bootstrap_variables';
@import 'framework/tw_bootstrap'; @import 'framework/tw_bootstrap';
@import "framework/layout";
@import "framework/avatar.scss"; @import "framework/avatar.scss";
@import "framework/blocks.scss"; @import "framework/blocks.scss";
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
@import "framework/markdown_area.scss"; @import "framework/markdown_area.scss";
@import "framework/mobile.scss"; @import "framework/mobile.scss";
@import "framework/pagination.scss"; @import "framework/pagination.scss";
@import "framework/panels.scss";
@import "framework/selects.scss"; @import "framework/selects.scss";
@import "framework/sidebar.scss"; @import "framework/sidebar.scss";
@import "framework/tables.scss"; @import "framework/tables.scss";
......
...@@ -68,6 +68,10 @@ ...@@ -68,6 +68,10 @@
.oneline { .oneline {
line-height: 42px; line-height: 42px;
} }
> p:last-child {
margin-bottom: 0;
}
} }
.cover-block { .cover-block {
...@@ -112,5 +116,14 @@ ...@@ -112,5 +116,14 @@
position: absolute; position: absolute;
top: 10px; top: 10px;
right: 10px; right: 10px;
&.left {
left: 10px;
right: auto;
}
} }
} }
.block-connector {
margin-top: -1px;
}
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
/** COMMON CLASSES **/ /** COMMON CLASSES **/
.prepend-top-10 { margin-top:10px } .prepend-top-10 { margin-top:10px }
.prepend-top-default { margin-top: $gl-padding; } .prepend-top-default { margin-top: $gl-padding !important; }
.prepend-top-20 { margin-top:20px } .prepend-top-20 { margin-top:20px }
.prepend-left-10 { margin-left:10px } .prepend-left-10 { margin-left:10px }
.prepend-left-20 { margin-left:20px } .prepend-left-20 { margin-left:20px }
...@@ -52,6 +52,10 @@ pre { ...@@ -52,6 +52,10 @@ pre {
} }
} }
hr {
margin: $gl-padding 0;
}
.dropdown-menu > li > a { .dropdown-menu > li > a {
text-shadow: none; text-shadow: none;
} }
...@@ -337,10 +341,6 @@ table { ...@@ -337,10 +341,6 @@ table {
text-align: center; text-align: center;
} }
.task-status {
margin-left: 10px;
}
#nprogress .spinner { #nprogress .spinner {
top: 15px !important; top: 15px !important;
right: 10px !important; right: 10px !important;
...@@ -433,3 +433,7 @@ table { ...@@ -433,3 +433,7 @@ table {
.space-right { .space-right {
margin-right: 10px; margin-right: 10px;
} }
.alert, .progress {
margin-bottom: $gl-padding;
}
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
border: none; border: none;
border-top: 1px solid #E7E9EE; border-top: 1px solid #E7E9EE;
border-bottom: 1px solid #E7E9EE; border-bottom: 1px solid #E7E9EE;
margin-bottom: 1em;
&.readme-holder { &.readme-holder {
border-bottom: 0; border-bottom: 0;
...@@ -25,7 +24,7 @@ ...@@ -25,7 +24,7 @@
text-shadow: 0 1px 1px #fff; text-shadow: 0 1px 1px #fff;
margin: 0; margin: 0;
text-align: left; text-align: left;
padding: 10px 15px; padding: 10px $gl-padding;
.file-actions { .file-actions {
float: right; float: right;
...@@ -171,4 +170,3 @@ ...@@ -171,4 +170,3 @@
} }
} }
} }
...@@ -22,9 +22,10 @@ input[type='text'].danger { ...@@ -22,9 +22,10 @@ input[type='text'].danger {
} }
.form-actions { .form-actions {
padding: 17px 20px 18px; margin: -$gl-padding;
margin-top: 18px; margin-top: 0;
margin-bottom: 18px; margin-bottom: -$gl-padding;
padding: $gl-padding;
background-color: $background-color; background-color: $background-color;
border-top: 1px solid $border-color; border-top: 1px solid $border-color;
} }
...@@ -73,6 +74,8 @@ label { ...@@ -73,6 +74,8 @@ label {
.form-control { .form-control {
@include box-shadow(none); @include box-shadow(none);
height: 42px;
padding: 8px $gl-padding;
} }
.wiki-content { .wiki-content {
...@@ -92,3 +95,7 @@ label { ...@@ -92,3 +95,7 @@ label {
background-color: #f7f8fa; background-color: #f7f8fa;
} }
} }
.help-block {
margin-bottom: 0;
}
...@@ -7,8 +7,9 @@ ...@@ -7,8 +7,9 @@
.issue-box { .issue-box {
@include border-radius(2px); @include border-radius(2px);
display: inline-block; display: block;
padding: 10px $gl-padding; float: left;
padding: 0 $gl-padding;
font-weight: normal; font-weight: normal;
margin-right: 10px; margin-right: 10px;
font-size: $gl-font-size; font-size: $gl-font-size;
......
...@@ -2,10 +2,10 @@ html { ...@@ -2,10 +2,10 @@ html {
overflow-y: scroll; overflow-y: scroll;
&.touch .tooltip { display: none !important; } &.touch .tooltip { display: none !important; }
}
body { body {
padding-top: $header-height; background-color: #EAEBEC !important;
}
} }
.container { .container {
...@@ -18,6 +18,7 @@ html { ...@@ -18,6 +18,7 @@ html {
} }
.navless-container { .navless-container {
padding-top: $header-height;
margin-top: 30px; margin-top: 30px;
} }
......
.panel {
margin-bottom: $gl-padding;
.panel-heading {
padding: 10px $gl-padding;
}
.panel-body {
padding: $gl-padding;
.form-actions {
margin: -$gl-padding;
margin-top: $gl-padding;
}
}
}
.page-with-sidebar { .page-with-sidebar {
padding-top: $header-height;
.sidebar-wrapper { .sidebar-wrapper {
position: fixed; position: fixed;
top: 0; top: 0;
...@@ -18,15 +20,12 @@ ...@@ -18,15 +20,12 @@
} }
.content-wrapper { .content-wrapper {
min-height: 100vh;
width: 100%; width: 100%;
padding: 20px; padding: 20px;
background: #EAEBEC;
.container-fluid { .container-fluid {
background: #FFF; background: #FFF;
padding: $gl-padding; padding: $gl-padding;
min-height: 90vh;
&.container-blank { &.container-blank {
background: none; background: none;
......
...@@ -6,6 +6,8 @@ ...@@ -6,6 +6,8 @@
table { table {
&.table { &.table {
margin-bottom: $gl-padding;
.dropdown-menu a { .dropdown-menu a {
text-decoration: none; text-decoration: none;
} }
......
...@@ -181,6 +181,10 @@ body { ...@@ -181,6 +181,10 @@ body {
line-height: 1.3; line-height: 1.3;
font-size: 1.25em; font-size: 1.25em;
font-weight: 600; font-weight: 600;
&:last-child {
margin-bottom: 0;
}
} }
.page-title-empty { .page-title-empty {
......
...@@ -2,10 +2,6 @@ ...@@ -2,10 +2,6 @@
display: block; display: block;
} }
.commit-title{
margin-bottom: 10px;
}
.commit-author, .commit-committer{ .commit-author, .commit-committer{
display: block; display: block;
color: #999; color: #999;
...@@ -41,6 +37,8 @@ ...@@ -41,6 +37,8 @@
.commit-box { .commit-box {
.commit-title { .commit-title {
margin: 0; margin: 0;
font-size: 23px;
color: #313236;
} }
.commit-description { .commit-description {
...@@ -108,16 +106,3 @@ ...@@ -108,16 +106,3 @@
z-index: 2; z-index: 2;
} }
} }
.commit-ci-menu {
padding: 0;
margin: 0;
list-style: none;
margin-top: 5px;
height: 56px;
margin: -16px;
padding: 16px;
text-align: center;
margin-top: 0px;
margin-bottom: 2px;
}
...@@ -19,48 +19,38 @@ ...@@ -19,48 +19,38 @@
color: #B94A48; color: #B94A48;
} }
} }
.commit-button-annotation {
display: inline-block;
margin: 0;
padding: 2px;
> * {
float: left;
}
.message {
display: inline-block;
margin: 5px 8px 0 8px;
}
}
.file-title { .file-title {
@extend .monospace; @extend .monospace;
line-height: 42px;
padding-top: 7px;
padding-bottom: 7px;
} }
.editor-ref { .editor-ref {
background: $background-color; background: $background-color;
padding: 11px 15px; padding-right: $gl-padding;
border-right: 1px solid $border-color; border-right: 1px solid $border-color;
display: inline-block; display: block;
margin: -5px -5px; float: left;
margin-right: 10px; margin-right: 10px;
} }
.editor-file-name { .editor-file-name {
.new-file-name { @extend .monospace;
display: inline-block;
width: 450px; float: left;
} margin-right: 10px;
}
.form-control { .new-file-name {
margin-top: -3px; display: inline-block;
} width: 450px;
float: left;
} }
.form-actions { .select2 {
margin: -$gl-padding; float: right;
margin-top: 0;
padding: $gl-padding
} }
} }
...@@ -51,11 +51,12 @@ ...@@ -51,11 +51,12 @@
.issuable-details { .issuable-details {
.page-title { .page-title {
margin-top: -15px; margin-top: -$gl-padding;
padding: 10px 0; padding: 7px 0;
margin-bottom: 0; margin-bottom: 0;
color: #5c5d5e; color: #5c5d5e;
font-size: 16px; font-size: 16px;
line-height: 42px;
.author { .author {
color: #5c5d5e; color: #5c5d5e;
...@@ -157,6 +158,7 @@ ...@@ -157,6 +158,7 @@
min-width: 214px; min-width: 214px;
> li { > li {
cursor: pointer;
margin: 5px; margin: 5px;
} }
} }
......
/* Login Page */ /* Login Page */
.login-page { .login-page {
background-color: white;
.container { .container {
max-width: 960px; max-width: 960px;
} }
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
*/ */
.mr-state-widget { .mr-state-widget {
background: #F7F8FA; background: #F7F8FA;
margin-bottom: 20px;
color: $gl-gray; color: $gl-gray;
border: 1px solid #dce0e6; border: 1px solid #dce0e6;
@include border-radius(2px); @include border-radius(2px);
...@@ -87,7 +86,7 @@ ...@@ -87,7 +86,7 @@
.mr-widget-body, .mr-widget-body,
.ci_widget, .ci_widget,
.mr-widget-footer { .mr-widget-footer {
padding: 15px; padding: $gl-padding;
} }
.normal { .normal {
...@@ -116,26 +115,8 @@ ...@@ -116,26 +115,8 @@
} }
} }
.merge-request .merge-request-tabs { .merge-request-details {
@include nav-menu; margin-bottom: $gl-padding;
margin: -$gl-padding;
padding: $gl-padding;
text-align: center;
margin-bottom: 1px;
}
// Mobile
@media (max-width: 480px) {
.merge-request .merge-request-tabs {
margin: 0;
padding: 0;
li {
a {
padding: 0;
}
}
}
} }
.mr_source_commit, .mr_source_commit,
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
} }
.reply-btn { .reply-btn {
@extend .btn-primary; @extend .btn-primary;
margin: 10px $gl-padding;
} }
.diff-file .diff-content { .diff-file .diff-content {
tr.line_holder:hover { tr.line_holder:hover {
...@@ -38,9 +39,8 @@ ...@@ -38,9 +39,8 @@
} }
.new_note, .edit_note { .new_note, .edit_note {
.buttons { .note-form-actions {
margin-top: 8px; margin-top: $gl-padding;
margin-bottom: 3px;
} }
.note-preview-holder { .note-preview-holder {
...@@ -79,8 +79,8 @@ ...@@ -79,8 +79,8 @@
padding: $gl-padding; padding: $gl-padding;
margin-left: -$gl-padding; margin-left: -$gl-padding;
margin-right: -$gl-padding; margin-right: -$gl-padding;
border-right: 1px solid #ECEEF1; border-right: 1px solid $border-color;
border-top: 1px solid #ECEEF1; border-top: 1px solid $border-color;
margin-bottom: -$gl-padding; margin-bottom: -$gl-padding;
} }
...@@ -150,7 +150,6 @@ ...@@ -150,7 +150,6 @@
.discussion-reply-holder { .discussion-reply-holder {
background: $background-color; background: $background-color;
padding: 10px 15px;
border-top: 1px solid $border-color; border-top: 1px solid $border-color;
} }
} }
......
...@@ -18,10 +18,6 @@ ...@@ -18,10 +18,6 @@
} }
} }
.project-edit-content {
padding: 7px;
}
.project-name-holder { .project-name-holder {
.help-inline { .help-inline {
vertical-align: top; vertical-align: top;
...@@ -30,12 +26,6 @@ ...@@ -30,12 +26,6 @@
} }
.project-home-panel { .project-home-panel {
text-align: center;
background: #f7f8fa;
margin: -$gl-padding;
padding: $gl-padding;
padding: 44px 0 17px 0;
.project-identicon-holder { .project-identicon-holder {
margin-bottom: 16px; margin-bottom: 16px;
...@@ -94,7 +84,7 @@ ...@@ -94,7 +84,7 @@
@extend .btn-gray; @extend .btn-gray;
color: $gray; color: $gray;
cursor: auto; cursor: default;
i { i {
color: inherit; color: inherit;
...@@ -105,7 +95,6 @@ ...@@ -105,7 +95,6 @@
display: inline-table; display: inline-table;
position: relative; position: relative;
top: 17px; top: 17px;
margin-bottom: 44px;
} }
.project-repo-buttons { .project-repo-buttons {
...@@ -376,7 +365,7 @@ table.table.protected-branches-list tr.no-border { ...@@ -376,7 +365,7 @@ table.table.protected-branches-list tr.no-border {
.project-stats { .project-stats {
text-align: center; text-align: center;
margin-top: 15px; margin-top: $gl-padding;
margin-bottom: 0; margin-bottom: 0;
padding-top: 10px; padding-top: 10px;
padding-bottom: 4px; padding-bottom: 4px;
......
...@@ -27,56 +27,22 @@ ...@@ -27,56 +27,22 @@
} }
.snippet-holder { .snippet-holder {
.snippet-details { margin-bottom: -$gl-padding;
.page-title {
margin-top: -15px;
padding: 10px 0;
margin-bottom: 0;
color: #5c5d5e;
font-size: 16px;
.author {
color: #5c5d5e;
}
.snippet-id {
color: #5c5d5e;
}
}
.snippet-title {
margin: 0;
font-size: 23px;
color: #313236;
}
@media (max-width: $screen-md-max) {
.new-snippet-link {
display: none;
}
}
@media (max-width: $screen-sm-max) {
.creator,
.page-title .btn-close {
display: none;
}
}
}
.file-holder { .file-holder {
border-top: 0; border-top: 0;
} }
} }
.snippet-box { .snippet-box {
@include border-radius(2px); @include border-radius(2px);
display: inline-block; display: block;
padding: 10px $gl-padding; float: left;
padding: 0 $gl-padding;
font-weight: normal; font-weight: normal;
margin-right: 10px; margin-right: 10px;
font-size: $gl-font-size; font-size: $gl-font-size;
border: 1px solid; border: 1px solid;
line-height: 40px;
} }
...@@ -5,14 +5,20 @@ class Admin::ImpersonationController < Admin::ApplicationController ...@@ -5,14 +5,20 @@ class Admin::ImpersonationController < Admin::ApplicationController
before_action :authorize_impersonator! before_action :authorize_impersonator!
def create def create
session[:impersonator_id] = current_user.username if @user.blocked?
session[:impersonator_return_to] = request.env['HTTP_REFERER'] flash[:alert] = "You cannot impersonate a blocked user"
warden.set_user(user, scope: 'user') redirect_to admin_user_path(@user)
else
session[:impersonator_id] = current_user.username
session[:impersonator_return_to] = admin_user_path(@user)
warden.set_user(user, scope: 'user')
flash[:alert] = "You are impersonating #{user.username}." flash[:alert] = "You are impersonating #{user.username}."
redirect_to root_path redirect_to root_path
end
end end
def destroy def destroy
......
...@@ -9,7 +9,7 @@ class AutocompleteController < ApplicationController ...@@ -9,7 +9,7 @@ class AutocompleteController < ApplicationController
@users = @users.reorder(:name) @users = @users.reorder(:name)
@users = @users.page(params[:page]).per(PER_PAGE) @users = @users.page(params[:page]).per(PER_PAGE)
unless params[:search].present? if params[:search].blank?
# Include current user if available to filter by "Me" # Include current user if available to filter by "Me"
if params[:current_user] && current_user if params[:current_user] && current_user
@users = [*@users, current_user].uniq @users = [*@users, current_user].uniq
......
...@@ -60,7 +60,7 @@ module BlobHelper ...@@ -60,7 +60,7 @@ module BlobHelper
if Gitlab::MarkupHelper.previewable?(filename) if Gitlab::MarkupHelper.previewable?(filename)
'Preview' 'Preview'
else else
'Preview changes' 'Preview Changes'
end end
end end
......
...@@ -109,7 +109,7 @@ module CommitsHelper ...@@ -109,7 +109,7 @@ module CommitsHelper
) )
elsif @path.present? elsif @path.present?
return link_to( return link_to(
"Browse Dir »", "Browse Directory »",
namespace_project_tree_path(project.namespace, project, namespace_project_tree_path(project.namespace, project,
tree_join(commit.id, @path)), tree_join(commit.id, @path)),
class: "pull-right" class: "pull-right"
...@@ -117,7 +117,7 @@ module CommitsHelper ...@@ -117,7 +117,7 @@ module CommitsHelper
end end
end end
link_to( link_to(
"Browse Code »", "Browse Files »",
namespace_project_tree_path(project.namespace, project, commit), namespace_project_tree_path(project.namespace, project, commit),
class: "pull-right" class: "pull-right"
) )
......
...@@ -146,9 +146,9 @@ module DiffHelper ...@@ -146,9 +146,9 @@ module DiffHelper
def submodule_link(blob, ref, repository = @repository) def submodule_link(blob, ref, repository = @repository)
tree, commit = submodule_links(blob, ref, repository) tree, commit = submodule_links(blob, ref, repository)
commit_id = if commit.nil? commit_id = if commit.nil?
blob.id[0..10] Commit.truncate_sha(blob.id)
else else
link_to "#{blob.id[0..10]}", commit link_to Commit.truncate_sha(blob.id), commit
end end
[ [
......
...@@ -27,16 +27,20 @@ module IconsHelper ...@@ -27,16 +27,20 @@ module IconsHelper
end end
end end
def public_icon def visibility_level_icon(level, fw: true)
icon('globe fw') name =
end case level
when Gitlab::VisibilityLevel::PRIVATE
def internal_icon 'lock'
icon('shield fw') when Gitlab::VisibilityLevel::INTERNAL
end 'shield'
else # Gitlab::VisibilityLevel::PUBLIC
'globe'
end
name << " fw" if fw
def private_icon icon(name)
icon('lock fw')
end end
def file_type_icon_class(type, mode, name) def file_type_icon_class(type, mode, name)
......
...@@ -96,7 +96,7 @@ module IssuesHelper ...@@ -96,7 +96,7 @@ module IssuesHelper
def emoji_author_list(notes, current_user) def emoji_author_list(notes, current_user)
list = notes.map do |note| list = notes.map do |note|
note.author == current_user ? "me" : note.author.username note.author == current_user ? "me" : note.author.name
end end
list.join(", ") list.join(", ")
......
...@@ -21,7 +21,7 @@ module ProjectsHelper ...@@ -21,7 +21,7 @@ module ProjectsHelper
end end
def link_to_member(project, author, opts = {}) def link_to_member(project, author, opts = {})
default_opts = { avatar: true, name: true, size: 16, author_class: 'author' } default_opts = { avatar: true, name: true, size: 16, author_class: 'author', title: ":name" }
opts = default_opts.merge(opts) opts = default_opts.merge(opts)
return "(deleted)" unless author return "(deleted)" unless author
...@@ -39,7 +39,8 @@ module ProjectsHelper ...@@ -39,7 +39,8 @@ module ProjectsHelper
if opts[:name] if opts[:name]
link_to(author_html, user_path(author), class: "author_link").html_safe link_to(author_html, user_path(author), class: "author_link").html_safe
else else
link_to(author_html, user_path(author), class: "author_link has_tooltip", data: { :'original-title' => sanitize(author.name) } ).html_safe title = opts[:title].sub(":name", sanitize(author.name))
link_to(author_html, user_path(author), class: "author_link has_tooltip", data: { :'original-title' => title, container: 'body' } ).html_safe
end end
end end
......
...@@ -25,48 +25,24 @@ module VisibilityLevelHelper ...@@ -25,48 +25,24 @@ module VisibilityLevelHelper
end end
def project_visibility_level_description(level) def project_visibility_level_description(level)
capture_haml do case level
haml_tag :span do when Gitlab::VisibilityLevel::PRIVATE
case level "Project access must be granted explicitly for each user."
when Gitlab::VisibilityLevel::PRIVATE when Gitlab::VisibilityLevel::INTERNAL
haml_concat "Project access must be granted explicitly for each user." "The project can be cloned by any logged in user."
when Gitlab::VisibilityLevel::INTERNAL when Gitlab::VisibilityLevel::PUBLIC
haml_concat "The project can be cloned by" "The project can be cloned without any authentication."
haml_concat "any logged in user."
when Gitlab::VisibilityLevel::PUBLIC
haml_concat "The project can be cloned"
haml_concat "without any"
haml_concat "authentication."
end
end
end end
end end
def snippet_visibility_level_description(level) def snippet_visibility_level_description(level)
capture_haml do
haml_tag :span do
case level
when Gitlab::VisibilityLevel::PRIVATE
haml_concat "The snippet is visible only for me."
when Gitlab::VisibilityLevel::INTERNAL
haml_concat "The snippet is visible for any logged in user."
when Gitlab::VisibilityLevel::PUBLIC
haml_concat "The snippet can be accessed"
haml_concat "without any"
haml_concat "authentication."
end
end
end
end
def visibility_level_icon(level)
case level case level
when Gitlab::VisibilityLevel::PRIVATE when Gitlab::VisibilityLevel::PRIVATE
private_icon "The snippet is visible only for me."
when Gitlab::VisibilityLevel::INTERNAL when Gitlab::VisibilityLevel::INTERNAL
internal_icon "The snippet is visible for any logged in user."
when Gitlab::VisibilityLevel::PUBLIC when Gitlab::VisibilityLevel::PUBLIC
public_icon "The snippet can be accessed without any authentication."
end end
end end
......
...@@ -37,7 +37,7 @@ class BuildkiteService < CiService ...@@ -37,7 +37,7 @@ class BuildkiteService < CiService
def compose_service_hook def compose_service_hook
hook = service_hook || build_service_hook hook = service_hook || build_service_hook
hook.url = webhook_url hook.url = webhook_url
hook.enable_ssl_verification = enable_ssl_verification hook.enable_ssl_verification = !!enable_ssl_verification
hook.save hook.save
end end
......
...@@ -34,7 +34,7 @@ class DroneCiService < CiService ...@@ -34,7 +34,7 @@ class DroneCiService < CiService
hook = service_hook || build_service_hook hook = service_hook || build_service_hook
# If using a service template, project may not be available # If using a service template, project may not be available
hook.url = [drone_url, "/api/hook", "?owner=#{project.namespace.path}", "&name=#{project.path}", "&access_token=#{token}"].join if project hook.url = [drone_url, "/api/hook", "?owner=#{project.namespace.path}", "&name=#{project.path}", "&access_token=#{token}"].join if project
hook.enable_ssl_verification = enable_ssl_verification hook.enable_ssl_verification = !!enable_ssl_verification
hook.save hook.save
end end
......
...@@ -690,7 +690,7 @@ class User < ActiveRecord::Base ...@@ -690,7 +690,7 @@ class User < ActiveRecord::Base
end end
def starred?(project) def starred?(project)
starred_projects.exists?(project) starred_projects.exists?(project.id)
end end
def toggle_star(project) def toggle_star(project)
...@@ -794,4 +794,9 @@ class User < ActiveRecord::Base ...@@ -794,4 +794,9 @@ class User < ActiveRecord::Base
Gitlab::SQL::Union.new([personal_projects.select(:id), groups.select(:id), Gitlab::SQL::Union.new([personal_projects.select(:id), groups.select(:id),
other.select(:id)]) other.select(:id)])
end end
# Added according to https://github.com/plataformatec/devise/blob/7df57d5081f9884849ca15e4fde179ef164a575f/README.md#activejob-integration
def send_devise_notification(notification, *args)
devise_mailer.send(notification, self, *args).deliver_later
end
end end
...@@ -2,4 +2,4 @@ ...@@ -2,4 +2,4 @@
= render_colored_label(label) = render_colored_label(label)
.pull-right .pull-right
= link_to 'Edit', edit_admin_label_path(label), class: 'btn btn-sm' = link_to 'Edit', edit_admin_label_path(label), class: 'btn btn-sm'
= link_to 'Remove', admin_label_path(label), class: 'btn btn-sm btn-remove remove-row', method: :delete, remote: true, data: {confirm: "Remove this label? Are you sure?"} = link_to 'Delete', admin_label_path(label), class: 'btn btn-sm btn-remove remove-row', method: :delete, remote: true, data: {confirm: "Delete this label? Are you sure?"}
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
%span.cred (Admin) %span.cred (Admin)
.pull-right .pull-right
- unless @user == current_user - unless @user == current_user || @user.blocked?
= link_to 'Impersonate', impersonate_admin_user_path(@user), method: :post, class: "btn btn-grouped btn-info" = link_to 'Impersonate', impersonate_admin_user_path(@user), method: :post, class: "btn btn-grouped btn-info"
= link_to edit_admin_user_path(@user), class: "btn btn-grouped" do = link_to edit_admin_user_path(@user), class: "btn btn-grouped" do
%i.fa.fa-pencil-square-o %i.fa.fa-pencil-square-o
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
= @project.name = @project.name
%p %p
Commit: #{link_to @build.short_sha, namespace_project_commit_path(@build.gl_project.namespace, @build.gl_project, @build.sha)} Commit: #{link_to @build.short_sha, namespace_project_commit_url(@build.gl_project.namespace, @build.gl_project, @build.sha)}
%p %p
Author: #{@build.commit.git_author_name} Author: #{@build.commit.git_author_name}
%p %p
......
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
= link_to new_group_path, class: "btn btn-new" do = link_to new_group_path, class: "btn btn-new" do
%i.fa.fa-plus %i.fa.fa-plus
New Group New Group
.title Welcome to the groups! .oneline
Group members have access to all group projects. Group members have access to all group projects.
%ul.content-list %ul.content-list
- @group_members.each do |group_member| - @group_members.each do |group_member|
......
- page_title @milestone.title, "Milestones" - page_title @milestone.title, "Milestones"
%h4.page-title - header_title "Milestones", dashboard_milestones_path
.issue-box{ class: "issue-box-#{@milestone.closed? ? 'closed' : 'open'}" }
- if @milestone.closed? .issuable-details
Closed .page-title
- else .issue-box{ class: "issue-box-#{@milestone.closed? ? 'closed' : 'open'}" }
Open - if @milestone.closed?
Milestone #{@milestone.title} Closed
- else
Open
Milestone #{@milestone.title}
.gray-content-block.middle-block
%h2.issue-title
= gfm escape_once(@milestone.title)
%hr
- if @milestone.complete? && @milestone.active? - if @milestone.complete? && @milestone.active?
.alert.alert-success .alert.alert-success.prepend-top-default
%span All issues for this milestone are closed. You may close the milestone now. %span All issues for this milestone are closed. You may close the milestone now.
.description
.table-holder .table-holder
%table.table %table.table
%thead %thead
...@@ -44,7 +48,7 @@ ...@@ -44,7 +48,7 @@
#{@milestone.open_items_count} open #{@milestone.open_items_count} open
= milestone_progress_bar(@milestone) = milestone_progress_bar(@milestone)
%ul.nav.nav-tabs %ul.center-top-menu.no-top.no-bottom
%li.active %li.active
= link_to '#tab-issues', 'data-toggle' => 'tab' do = link_to '#tab-issues', 'data-toggle' => 'tab' do
Issues Issues
...@@ -58,25 +62,39 @@ ...@@ -58,25 +62,39 @@
Participants Participants
%span.badge= @milestone.participants.count %span.badge= @milestone.participants.count
.pull-right
= link_to 'Browse Issues', issues_dashboard_path(milestone_title: @milestone.title), class: "btn edit-milestone-link btn-grouped"
.tab-content .tab-content
.tab-pane.active#tab-issues .tab-pane.active#tab-issues
.row .gray-content-block.middle-block
.pull-right
= link_to 'Browse Issues', issues_dashboard_path(milestone_title: @milestone.title), class: "btn btn-grouped"
.oneline
All issues in this milestone
.row.prepend-top-default
.col-md-6 .col-md-6
= render 'issues', title: "Open", issues: @milestone.opened_issues = render 'issues', title: "Open", issues: @milestone.opened_issues
.col-md-6 .col-md-6
= render 'issues', title: "Closed", issues: @milestone.closed_issues = render 'issues', title: "Closed", issues: @milestone.closed_issues
.tab-pane#tab-merge-requests .tab-pane#tab-merge-requests
.row .gray-content-block.middle-block
.pull-right
= link_to 'Browse Merge Requests', merge_requests_dashboard_path(milestone_title: @milestone.title), class: "btn btn-grouped"
.oneline
All merge requests in this milestone
.row.prepend-top-default
.col-md-6 .col-md-6
= render 'merge_requests', title: "Open", merge_requests: @milestone.opened_merge_requests = render 'merge_requests', title: "Open", merge_requests: @milestone.opened_merge_requests
.col-md-6 .col-md-6
= render 'merge_requests', title: "Closed", merge_requests: @milestone.closed_merge_requests = render 'merge_requests', title: "Closed", merge_requests: @milestone.closed_merge_requests
.tab-pane#tab-participants .tab-pane#tab-participants
.gray-content-block.middle-block
.oneline
All participants to this milestone
%ul.bordered-list %ul.bordered-list
- @milestone.participants.each do |user| - @milestone.participants.each do |user|
%li %li
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
.form-group .form-group
= search_field_tag :search, params[:search], placeholder: "Filter by name", class: "form-control search-text-input", id: "projects_search", spellcheck: false = search_field_tag :search, params[:search], placeholder: "Filter by name", class: "form-control search-text-input", id: "projects_search", spellcheck: false
.form-group .form-group
= button_tag 'Search', class: "btn btn-success" = button_tag 'Search', class: "btn"
.pull-right.hidden-sm.hidden-xs .pull-right.hidden-sm.hidden-xs
- if current_user - if current_user
......
- page_title @milestone.title, "Milestones" - page_title @milestone.title, "Milestones"
= render "header_title" = render "header_title"
%h4.page-title .issuable-details
.issue-box{ class: "issue-box-#{@milestone.closed? ? 'closed' : 'open'}" } .page-title
- if @milestone.closed? .issue-box{ class: "issue-box-#{@milestone.closed? ? 'closed' : 'open'}" }
Closed - if @milestone.closed?
- else Closed
Open
Milestone #{@milestone.title}
.pull-right
- if can?(current_user, :admin_milestones, @group)
- if @milestone.active?
= link_to 'Close Milestone', group_milestone_path(@group, @milestone.safe_title, title: @milestone.title, milestone: {state_event: :close }), method: :put, class: "btn btn-sm btn-close"
- else - else
= link_to 'Reopen Milestone', group_milestone_path(@group, @milestone.safe_title, title: @milestone.title, milestone: {state_event: :activate }), method: :put, class: "btn btn-sm btn-grouped btn-reopen" Open
Milestone #{@milestone.title}
.pull-right
- if can?(current_user, :admin_milestones, @group)
- if @milestone.active?
= link_to 'Close Milestone', group_milestone_path(@group, @milestone.safe_title, title: @milestone.title, milestone: {state_event: :close }), method: :put, class: "btn btn-grouped btn-close"
- else
= link_to 'Reopen Milestone', group_milestone_path(@group, @milestone.safe_title, title: @milestone.title, milestone: {state_event: :activate }), method: :put, class: "btn btn-grouped btn-reopen"
.gray-content-block.middle-block
%h2.issue-title
= gfm escape_once(@milestone.title)
%hr
- if @milestone.complete? && @milestone.active? - if @milestone.complete? && @milestone.active?
.alert.alert-success .alert.alert-success.prepend-top-default
%span All issues for this milestone are closed. You may close the milestone now. %span All issues for this milestone are closed. You may close the milestone now.
.description
.table-holder .table-holder
%table.table %table.table
%thead %thead
...@@ -52,7 +54,7 @@ ...@@ -52,7 +54,7 @@
#{@milestone.open_items_count} open #{@milestone.open_items_count} open
= milestone_progress_bar(@milestone) = milestone_progress_bar(@milestone)
%ul.nav.nav-tabs %ul.center-top-menu.no-top.no-bottom
%li.active %li.active
= link_to '#tab-issues', 'data-toggle' => 'tab' do = link_to '#tab-issues', 'data-toggle' => 'tab' do
Issues Issues
...@@ -66,25 +68,40 @@ ...@@ -66,25 +68,40 @@
Participants Participants
%span.badge= @milestone.participants.count %span.badge= @milestone.participants.count
.pull-right
= link_to 'Browse Issues', issues_group_path(@group, milestone_title: @milestone.title), class: "btn edit-milestone-link btn-grouped"
.tab-content .tab-content
.tab-pane.active#tab-issues .tab-pane.active#tab-issues
.row .gray-content-block.middle-block
.pull-right
= link_to 'Browse Issues', issues_group_path(@group, milestone_title: @milestone.title), class: "btn btn-grouped"
.oneline
All issues in this milestone
.row.prepend-top-default
.col-md-6 .col-md-6
= render 'issues', title: "Open", issues: @milestone.opened_issues = render 'issues', title: "Open", issues: @milestone.opened_issues
.col-md-6 .col-md-6
= render 'issues', title: "Closed", issues: @milestone.closed_issues = render 'issues', title: "Closed", issues: @milestone.closed_issues
.tab-pane#tab-merge-requests .tab-pane#tab-merge-requests
.row .gray-content-block.middle-block
.pull-right
= link_to 'Browse Merge Requests', merge_requests_group_path(@group, milestone_title: @milestone.title), class: "btn btn-grouped"
.oneline
All merge requests in this milestone
.row.prepend-top-default
.col-md-6 .col-md-6
= render 'merge_requests', title: "Open", merge_requests: @milestone.opened_merge_requests = render 'merge_requests', title: "Open", merge_requests: @milestone.opened_merge_requests
.col-md-6 .col-md-6
= render 'merge_requests', title: "Closed", merge_requests: @milestone.closed_merge_requests = render 'merge_requests', title: "Closed", merge_requests: @milestone.closed_merge_requests
.tab-pane#tab-participants .tab-pane#tab-participants
.gray-content-block.middle-block
.oneline
All participants to this milestone
%ul.bordered-list %ul.bordered-list
- @milestone.participants.each do |user| - @milestone.participants.each do |user|
%li %li
......
- page_title "Bitbucket import" - page_title "Bitbucket import"
- header_title "Projects", root_path
%h3.page-title %h3.page-title
%i.fa.fa-bitbucket %i.fa.fa-bitbucket
Import projects from Bitbucket Import projects from Bitbucket
......
- page_title "FogBugz Import" - page_title "FogBugz Import"
- header_title "Projects", root_path
%h3.page-title %h3.page-title
%i.fa.fa-bug %i.fa.fa-bug
Import projects from FogBugz Import projects from FogBugz
......
- page_title 'User map', 'FogBugz import' - page_title 'User map', 'FogBugz import'
- header_title "Projects", root_path
%h3.page-title %h3.page-title
%i.fa.fa-bug %i.fa.fa-bug
Import projects from FogBugz Import projects from FogBugz
......
- page_title "FogBugz import" - page_title "FogBugz import"
- header_title "Projects", root_path
%h3.page-title %h3.page-title
%i.fa.fa-bug %i.fa.fa-bug
Import projects from FogBugz Import projects from FogBugz
......
- page_title "GitHub import" - page_title "GitHub import"
- header_title "Projects", root_path
%h3.page-title %h3.page-title
%i.fa.fa-github %i.fa.fa-github
Import projects from GitHub Import projects from GitHub
......
- page_title "GitLab.com import" - page_title "GitLab.com import"
- header_title "Projects", root_path
%h3.page-title %h3.page-title
%i.fa.fa-heart %i.fa.fa-heart
Import projects from GitLab.com Import projects from GitLab.com
......
- page_title "Gitorious import" - page_title "Gitorious import"
- header_title "Projects", root_path
%h3.page-title %h3.page-title
%i.icon-gitorious.icon-gitorious-big %i.icon-gitorious.icon-gitorious-big
Import projects from Gitorious.org Import projects from Gitorious.org
......
- page_title "Google Code import" - page_title "Google Code import"
- header_title "Projects", root_path
%h3.page-title %h3.page-title
%i.fa.fa-google %i.fa.fa-google
Import projects from Google Code Import projects from Google Code
...@@ -6,7 +7,7 @@ ...@@ -6,7 +7,7 @@
= form_tag callback_import_google_code_path, class: 'form-horizontal', multipart: true do = form_tag callback_import_google_code_path, class: 'form-horizontal', multipart: true do
%p %p
Follow the steps below to export your Google Code project data. Follow the steps below to export your Google Code project data.
In the next step, you'll be able to select the projects you want to import. In the next step, you'll be able to select the projects you want to import.
%ol %ol
%li %li
......
- page_title "User map", "Google Code import" - page_title "User map", "Google Code import"
- header_title "Projects", root_path
%h3.page-title %h3.page-title
%i.fa.fa-google %i.fa.fa-google
Import projects from Google Code Import projects from Google Code
...@@ -8,31 +9,31 @@ ...@@ -8,31 +9,31 @@
%p %p
Customize how Google Code email addresses and usernames are imported into GitLab. Customize how Google Code email addresses and usernames are imported into GitLab.
In the next step, you'll be able to select the projects you want to import. In the next step, you'll be able to select the projects you want to import.
%p %p
The user map is a JSON document mapping the Google Code users that participated on your projects to the way their email addresses and usernames will be imported into GitLab. You can change this by changing the value on the right hand side of <code>:</code>. Be sure to preserve the surrounding double quotes, other punctuation and the email address or username on the left hand side. The user map is a JSON document mapping the Google Code users that participated on your projects to the way their email addresses and usernames will be imported into GitLab. You can change this by changing the value on the right hand side of <code>:</code>. Be sure to preserve the surrounding double quotes, other punctuation and the email address or username on the left hand side.
%ul %ul
%li %li
%strong Default: Directly import the Google Code email address or username %strong Default: Directly import the Google Code email address or username
%p %p
<code>"johnsmith@example.com": "johnsm...@example.com"</code> <code>"johnsmith@example.com": "johnsm...@example.com"</code>
will add "By johnsm...@example.com" to all issues and comments originally created by johnsmith@example.com. will add "By johnsm...@example.com" to all issues and comments originally created by johnsmith@example.com.
The email address or username is masked to ensure the user's privacy. The email address or username is masked to ensure the user's privacy.
%li %li
%strong Map a Google Code user to a GitLab user %strong Map a Google Code user to a GitLab user
%p %p
<code>"johnsmith@example.com": "@johnsmith"</code> <code>"johnsmith@example.com": "@johnsmith"</code>
will add "By <a href="#">@johnsmith</a>" to all issues and comments originally created by johnsmith@example.com, will add "By <a href="#">@johnsmith</a>" to all issues and comments originally created by johnsmith@example.com,
and will set <a href="#">@johnsmith</a> as the assignee on all issues originally assigned to johnsmith@example.com. and will set <a href="#">@johnsmith</a> as the assignee on all issues originally assigned to johnsmith@example.com.
%li %li
%strong Map a Google Code user to a full name %strong Map a Google Code user to a full name
%p %p
<code>"johnsmith@example.com": "John Smith"</code> <code>"johnsmith@example.com": "John Smith"</code>
will add "By John Smith" to all issues and comments originally created by johnsmith@example.com. will add "By John Smith" to all issues and comments originally created by johnsmith@example.com.
%li %li
%strong Map a Google Code user to a full email address %strong Map a Google Code user to a full email address
%p %p
<code>"johnsmith@example.com": "johnsmith@example.com"</code> <code>"johnsmith@example.com": "johnsmith@example.com"</code>
will add "By <a href="#">johnsmith@example.com</a>" to all issues and comments originally created by johnsmith@example.com. will add "By <a href="#">johnsmith@example.com</a>" to all issues and comments originally created by johnsmith@example.com.
By default, the email address or username is masked to ensure the user's privacy. Use this option if you want to show the full email address. By default, the email address or username is masked to ensure the user's privacy. Use this option if you want to show the full email address.
.form-group .form-group
......
- page_title "Google Code import" - page_title "Google Code import"
- header_title "Projects", root_path
%h3.page-title %h3.page-title
%i.fa.fa-google %i.fa.fa-google
Import projects from Google Code Import projects from Google Code
......
...@@ -15,24 +15,25 @@ ...@@ -15,24 +15,25 @@
.pull-right .pull-right
= link_to 'New Application', new_oauth_application_path, class: 'btn btn-success' = link_to 'New Application', new_oauth_application_path, class: 'btn btn-success'
- if @applications.any? - if @applications.any?
%table.table.table-striped .table-holder
%thead %table.table.table-striped
%tr %thead
%th Name %tr
%th Callback URL %th Name
%th Clients %th Callback URL
%th %th Clients
%th %th
%tbody %th
- @applications.each do |application| %tbody
%tr{:id => "application_#{application.id}"} - @applications.each do |application|
%td= link_to application.name, oauth_application_path(application) %tr{:id => "application_#{application.id}"}
%td %td= link_to application.name, oauth_application_path(application)
- application.redirect_uri.split.each do |uri| %td
%div= uri - application.redirect_uri.split.each do |uri|
%td= application.access_tokens.count %div= uri
%td= link_to 'Edit', edit_oauth_application_path(application), class: 'btn btn-link btn-sm' %td= application.access_tokens.count
%td= render 'doorkeeper/applications/delete_form', application: application %td= link_to 'Edit', edit_oauth_application_path(application), class: 'btn btn-link btn-sm'
%td= render 'doorkeeper/applications/delete_form', application: application
.oauth-authorized-applications.prepend-top-20 .oauth-authorized-applications.prepend-top-20
- if user_oauth_applications? - if user_oauth_applications?
...@@ -40,29 +41,30 @@ ...@@ -40,29 +41,30 @@
Authorized applications Authorized applications
- if @authorized_tokens.any? - if @authorized_tokens.any?
%table.table.table-striped .table-holder
%thead %table.table.table-striped
%tr %thead
%th Name
%th Authorized At
%th Scope
%th
%tbody
- @authorized_apps.each do |app|
- token = app.authorized_tokens.order('created_at desc').first
%tr{:id => "application_#{app.id}"}
%td= app.name
%td= token.created_at
%td= token.scopes
%td= render 'doorkeeper/authorized_applications/delete_form', application: app
- @authorized_anonymous_tokens.each do |token|
%tr %tr
%td %th Name
Anonymous %th Authorized At
%div.help-block %th Scope
%em Authorization was granted by entering your username and password in the application. %th
%td= token.created_at %tbody
%td= token.scopes - @authorized_apps.each do |app|
%td= render 'doorkeeper/authorized_applications/delete_form', token: token - token = app.authorized_tokens.order('created_at desc').first
%tr{:id => "application_#{app.id}"}
%td= app.name
%td= token.created_at
%td= token.scopes
%td= render 'doorkeeper/authorized_applications/delete_form', application: app
- @authorized_anonymous_tokens.each do |token|
%tr
%td
Anonymous
%div.help-block
%em Authorization was granted by entering your username and password in the application.
%td= token.created_at
%td= token.scopes
%td= render 'doorkeeper/authorized_applications/delete_form', token: token
- else - else
%p.light You don't have any authorized applications %p.light You don't have any authorized applications
- is_admin = defined?(admin) ? true : false - is_admin = defined?(admin) ? true : false
.panel.panel-default - if @keys.any?
- if @keys.any? .table-holder
%table.table %table.table
%thead.panel-heading %thead.panel-heading
%tr %tr
...@@ -11,9 +11,9 @@ ...@@ -11,9 +11,9 @@
%tbody %tbody
- @keys.each do |key| - @keys.each do |key|
= render 'profiles/keys/key', key: key, is_admin: is_admin = render 'profiles/keys/key', key: key, is_admin: is_admin
- else - else
.nothing-here-block .nothing-here-block
- if is_admin - if is_admin
User has no ssh keys User has no ssh keys
- else - else
There are no SSH keys with access to your account. There are no SSH keys with access to your account.
...@@ -3,7 +3,9 @@ ...@@ -3,7 +3,9 @@
.gray-content-block.top-block .gray-content-block.top-block
.pull-right .pull-right
= link_to "Add SSH Key", new_profile_key_path, class: "btn btn-new" = link_to new_profile_key_path, class: "btn btn-new" do
= icon('plus')
Add SSH Key
.oneline .oneline
Before you can add an SSH key you need to Before you can add an SSH key you need to
= link_to "generate it.", help_page_path("ssh", "README") = link_to "generate it.", help_page_path("ssh", "README")
......
...@@ -50,12 +50,10 @@ ...@@ -50,12 +50,10 @@
Watch Watch
%p You will receive notifications for any activity %p You will receive notifications for any activity
.form-actions .gray-content-block
= f.submit 'Save changes', class: "btn btn-create" = f.submit 'Save changes', class: "btn btn-create"
.clearfix .row.all-notifications.prepend-top-default
%hr
.row.all-notifications
.col-md-6 .col-md-6
%p %p
You can also specify notification level per group or per project. You can also specify notification level per group or per project.
......
...@@ -12,11 +12,20 @@ ...@@ -12,11 +12,20 @@
Forked from Forked from
= link_to project_path(forked_from_project) do = link_to project_path(forked_from_project) do
= forked_from_project.namespace.try(:name) = forked_from_project.namespace.try(:name)
.cover-controls .cover-controls.left
.visibility-level-label .visibility-level-label.has_tooltip{title: project_visibility_level_description(@project.visibility_level), data: { container: 'body' } }
= visibility_level_icon(@project.visibility_level) = visibility_level_icon(@project.visibility_level, fw: false)
= visibility_level_label(@project.visibility_level) = visibility_level_label(@project.visibility_level)
.cover-controls
- if can?(current_user, :admin_project, @project)
= link_to edit_project_path(@project), class: 'btn btn-gray' do
= icon('pencil')
- if current_user
&nbsp;
= link_to namespace_project_path(@project.namespace, @project, format: :atom, private_token: current_user.private_token), class: 'btn btn-gray' do
= icon('rss')
.project-repo-buttons .project-repo-buttons
.split-one .split-one
= render 'projects/buttons/star' = render 'projects/buttons/star'
......
...@@ -7,15 +7,16 @@ ...@@ -7,15 +7,16 @@
= cache(readme_cache_key) do = cache(readme_cache_key) do
= render_readme(readme) = render_readme(readme)
- else - else
%h3.page-title .gray-content-block.second-block.center
This project does not have README yet %h3.page-title
- if can?(current_user, :push_code, @project) This project does not have README yet
%p.slead - if can?(current_user, :push_code, @project)
A %p
%code README A
file contains information about other files in a repository and is commonly %code README
distributed with computer software, forming part of its documentation. file contains information about other files in a repository and is commonly
%br distributed with computer software, forming part of its documentation.
We recommend you to %p
= link_to "add README", new_readme_path, class: 'underlined-link' We recommend you to
file to the repository and GitLab will render it here instead of this message. = link_to "add README", new_readme_path, class: 'underlined-link'
file to the repository and GitLab will render it here instead of this message.
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
#tree-holder.tree-holder #tree-holder.tree-holder
.file-holder .file-holder
.file-title .file-title
%i.fa.fa-file = blob_icon @blob.mode, @blob.name
%strong %strong
= @path = @path
%small= number_to_human_size @blob.size %small= number_to_human_size @blob.size
...@@ -43,4 +43,3 @@ ...@@ -43,4 +43,3 @@
- blame_group[:lines].each do |line| - blame_group[:lines].each do |line|
:erb :erb
<%= highlight(@blob.name, line, nowrap: true, continue: true).html_safe %> <%= highlight(@blob.name, line, nowrap: true, continue: true).html_safe %>
.file-holder.file .file-holder.file.append-bottom-default
.file-title .file-title.clearfix
.editor-ref .editor-ref
%i.fa.fa-code-fork = icon('code-fork')
= ref = ref
%span.editor-file-name %span.editor-file-name
- if @path = @path
%span.monospace
= @path
- if current_action?(:new) || current_action?(:create) - if current_action?(:new) || current_action?(:create)
%span.editor-file-name
\/ \/
= text_field_tag 'file_name', params[:file_name], placeholder: "File name", = text_field_tag 'file_name', params[:file_name], placeholder: "File name",
required: true, class: 'form-control new-file-name js-quick-submit' required: true, class: 'form-control new-file-name js-quick-submit'
.pull-right
= select_tag :encoding, options_for_select([ "base64", "text" ], "text"), class: 'form-control' .pull-right
= select_tag :encoding, options_for_select([ "base64", "text" ], "text"), class: 'select2'
.file-content.code .file-content.code
%pre.js-edit-mode-pane#editor %pre.js-edit-mode-pane#editor
......
...@@ -5,12 +5,12 @@ ...@@ -5,12 +5,12 @@
%ul.center-top-menu.no-bottom.js-edit-mode %ul.center-top-menu.no-bottom.js-edit-mode
%li.active %li.active
= link_to '#editor' do = link_to '#editor' do
%i.fa.fa-edit = icon('edit')
Edit file Edit File
%li %li
= link_to '#preview', 'data-preview-url' => namespace_project_preview_blob_path(@project.namespace, @project, @id) do = link_to '#preview', 'data-preview-url' => namespace_project_preview_blob_path(@project.namespace, @project, @id) do
%i.fa.fa-eye = icon('eye')
= editing_preview_title(@blob.name) = editing_preview_title(@blob.name)
= form_tag(namespace_project_update_blob_path(@project.namespace, @project, @id), method: :put, class: 'form-horizontal js-requires-input js-edit-blob-form') do = form_tag(namespace_project_update_blob_path(@project.namespace, @project, @id), method: :put, class: 'form-horizontal js-requires-input js-edit-blob-form') do
......
.branch-commit .branch-commit
= link_to commit.short_id, namespace_project_commit_path(project.namespace, project, commit), class: "commit-id" = link_to commit.short_id, namespace_project_commit_path(project.namespace, project, commit), class: "commit-id monospace"
&middot; &middot;
%span.str-truncated %span.str-truncated
= link_to_gfm commit.title, namespace_project_commit_path(project.namespace, project, commit.id), class: "commit-row-message" = link_to_gfm commit.title, namespace_project_commit_path(project.namespace, project, commit.id), class: "commit-row-message"
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
.pull-right .pull-right
- if can? current_user, :push_code, @project - if can? current_user, :push_code, @project
= link_to new_namespace_project_branch_path(@project.namespace, @project), class: 'btn btn-create' do = link_to new_namespace_project_branch_path(@project.namespace, @project), class: 'btn btn-create' do
%i.fa.fa-add-sign = icon('plus')
New branch New branch
&nbsp; &nbsp;
.dropdown.inline .dropdown.inline
......
%ul.center-top-menu.commit-ci-menu %ul.center-top-menu.no-top.no-bottom.commit-ci-menu
= nav_link(path: 'commit#show') do = nav_link(path: 'commit#show') do
= link_to namespace_project_commit_path(@project.namespace, @project, @commit.id) do = link_to namespace_project_commit_path(@project.namespace, @project, @commit.id) do
Changes Changes
......
...@@ -13,8 +13,9 @@ ...@@ -13,8 +13,9 @@
- unless @commit.parents.length > 1 - unless @commit.parents.length > 1
%li= link_to "Email Patches", namespace_project_commit_path(@project.namespace, @project, @commit, format: :patch) %li= link_to "Email Patches", namespace_project_commit_path(@project.namespace, @project, @commit, format: :patch)
%li= link_to "Plain Diff", namespace_project_commit_path(@project.namespace, @project, @commit, format: :diff) %li= link_to "Plain Diff", namespace_project_commit_path(@project.namespace, @project, @commit, format: :diff)
= link_to namespace_project_tree_path(@project.namespace, @project, @commit), class: "btn btn-primary btn-grouped" do = link_to namespace_project_tree_path(@project.namespace, @project, @commit), class: "btn btn-grouped" do
%span Browse Code » = icon('files-o')
Browse Files
%div %div
%p %p
......
- page_title "#{@commit.title} (#{@commit.short_id})", "Commits" - page_title "#{@commit.title} (#{@commit.short_id})", "Commits"
= render "projects/commits/header_title" = render "projects/commits/header_title"
= render "commit_box" = render "commit_box"
= render "ci_menu" if @ci_commit - if @ci_commit
= render "ci_menu"
- else
%div.block-connector
= render "projects/diffs/diffs", diffs: @diffs, project: @project = render "projects/diffs/diffs", diffs: @diffs, project: @project
= render "projects/notes/notes_with_form" = render "projects/notes/notes_with_form"
...@@ -7,11 +7,11 @@ ...@@ -7,11 +7,11 @@
= render "form" = render "form"
- if @commits.present? - if @commits.present?
.prepend-top-20 .prepend-top-default
= render "projects/commits/commit_list" = render "projects/commits/commit_list"
= render "projects/diffs/diffs", diffs: @diffs, project: @project = render "projects/diffs/diffs", diffs: @diffs, project: @project
- else - else
.light-well.prepend-top-20 .light-well.prepend-top-default
.center .center
%h4 %h4
There isn't anything to compare. There isn't anything to compare.
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
- diff_files = safe_diff_files(diffs) - diff_files = safe_diff_files(diffs)
.gray-content-block.second-block.oneline-block .gray-content-block.middle-block.oneline-block
.inline-parallel-buttons .inline-parallel-buttons
.btn-group .btn-group
= inline_diff_btn = inline_diff_btn
......
...@@ -2,19 +2,27 @@ ...@@ -2,19 +2,27 @@
.diff-header{id: "file-path-#{hexdigest(diff_file.file_path)}"} .diff-header{id: "file-path-#{hexdigest(diff_file.file_path)}"}
- if diff_file.diff.submodule? - if diff_file.diff.submodule?
%span %span
= icon('archive fw')
- submodule_item = project.repository.blob_at(@commit.id, diff_file.file_path) - submodule_item = project.repository.blob_at(@commit.id, diff_file.file_path)
= submodule_link(submodule_item, @commit.id, project.repository) %strong
= submodule_link(submodule_item, @commit.id, project.repository)
- else - else
%span %span
= blob_icon blob.mode, blob.name
= link_to "#diff-#{i}" do
%strong
= diff_file.new_path
- if diff_file.deleted_file - if diff_file.deleted_file
= "#{diff_file.old_path} deleted" deleted
- elsif diff_file.renamed_file - elsif diff_file.renamed_file
= "#{diff_file.old_path} renamed to #{diff_file.new_path}" renamed from
- else %strong
= diff_file.new_path = diff_file.old_path
- if diff_file.mode_changed? - if diff_file.mode_changed?
%span.file-mode= "#{diff_file.diff.a_mode}#{diff_file.diff.b_mode}" %small
= "#{diff_file.diff.a_mode}#{diff_file.diff.b_mode}"
.diff-controls .diff-controls
- if blob.text? - if blob.text?
......
...@@ -5,17 +5,16 @@ ...@@ -5,17 +5,16 @@
= render "home_panel" = render "home_panel"
.gray-content-block.center .gray-content-block.second-block.center
%h3.page-title %h3.page-title
The repository for this project is empty The repository for this project is empty
- if can?(current_user, :download_code, @project) - if can?(current_user, :push_code, @project)
%p %p
If you already have files you can push them using command line instructions below. If you already have files you can push them using command line instructions below.
%br %p
- if can?(current_user, :push_code, @project) Otherwise you can start with
Otherwise you can start with = link_to "adding README", new_readme_path, class: 'underlined-link'
= link_to "adding README", new_readme_path, class: 'underlined-link' file to this project.
file to this project.
- if can?(current_user, :download_code, @project) - if can?(current_user, :download_code, @project)
.prepend-top-20 .prepend-top-20
......
...@@ -6,35 +6,39 @@ ...@@ -6,35 +6,39 @@
.issue-title .issue-title
%span.issue-title-text %span.issue-title-text
= link_to_gfm issue.title, issue_path(issue), class: "row_title" = link_to_gfm issue.title, issue_path(issue), class: "row_title"
.issue-labels
- issue.labels.each do |label|
= link_to_label(label, project: issue.project)
.pull-right.light .pull-right.light
- if issue.closed? - if issue.closed?
%span %span
CLOSED CLOSED
- if issue.assignee - if issue.assignee
= link_to_member(@project, issue.assignee, name: false) = link_to_member(@project, issue.assignee, name: false, title: "Assigned to :name")
- note_count = issue.notes.user.count - note_count = issue.notes.user.count
- if note_count > 0 - if note_count > 0
&nbsp; &nbsp;
%span = link_to issue_path(issue) + "#notes" do
%i.fa.fa-comments = icon('comments')
= note_count = note_count
- else - else
&nbsp; &nbsp;
%span.issue-no-comments = link_to issue_path(issue) + "#notes", class: "issue-no-comments" do
%i.fa.fa-comments = icon('comments')
= 0 = 0
.issue-info .issue-info
= "#{issue.to_reference} opened #{time_ago_with_tooltip(issue.created_at, placement: 'bottom')} by #{link_to_member(@project, issue.author, avatar: false)}".html_safe #{issue.to_reference} &middot;
opened #{time_ago_with_tooltip(issue.created_at, placement: 'bottom')}
by #{link_to_member(@project, issue.author, avatar: false)}
- if issue.milestone - if issue.milestone
&nbsp; &nbsp;
%span = link_to namespace_project_issues_path(issue.project.namespace, issue.project, milestone_title: issue.milestone.title) do
%i.fa.fa-clock-o = icon('clock-o')
= issue.milestone.title = issue.milestone.title
- if issue.labels.any?
&nbsp;
- issue.labels.each do |label|
= link_to_label(label, project: issue.project)
- if issue.tasks? - if issue.tasks?
&nbsp;
%span.task-status %span.task-status
= issue.task_status = issue.task_status
......
...@@ -7,4 +7,4 @@ ...@@ -7,4 +7,4 @@
- if can? current_user, :admin_label, @project - if can? current_user, :admin_label, @project
= link_to 'Edit', edit_namespace_project_label_path(@project.namespace, @project, label), class: 'btn btn-sm' = link_to 'Edit', edit_namespace_project_label_path(@project.namespace, @project, label), class: 'btn btn-sm'
= link_to 'Remove', namespace_project_label_path(@project.namespace, @project, label), class: 'btn btn-sm btn-remove remove-row', method: :delete, remote: true, data: {confirm: "Remove this label? Are you sure?"} = link_to 'Delete', namespace_project_label_path(@project.namespace, @project, label), class: 'btn btn-sm btn-remove remove-row', method: :delete, remote: true, data: {confirm: "Remove this label? Are you sure?"}
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
.gray-content-block.top-block .gray-content-block.top-block
- if can? current_user, :admin_label, @project - if can? current_user, :admin_label, @project
= link_to new_namespace_project_label_path(@project.namespace, @project), class: "pull-right btn btn-new" do = link_to new_namespace_project_label_path(@project.namespace, @project), class: "pull-right btn btn-new" do
= icon('plus')
New label New label
.oneline .oneline
Labels can be applied to issues and merge requests. Labels can be applied to issues and merge requests.
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
= render 'shared/show_aside' = render 'shared/show_aside'
.gray-content-block.second-block.oneline-block .gray-content-block.middle-block.oneline-block
.row .row
.col-md-9 .col-md-9
.votes-holder.pull-right .votes-holder.pull-right
......
...@@ -3,48 +3,52 @@ ...@@ -3,48 +3,52 @@
.merge-request-title .merge-request-title
%span.merge-request-title-text %span.merge-request-title-text
= link_to_gfm merge_request.title, merge_request_path(merge_request), class: "row_title" = link_to_gfm merge_request.title, merge_request_path(merge_request), class: "row_title"
.merge-request-labels
- merge_request.labels.each do |label|
= link_to_label(label, project: merge_request.project)
.pull-right.light .pull-right.light
- if ci_commit - if ci_commit
= render_ci_status(ci_commit) = render_ci_status(ci_commit)
- if merge_request.merged? - if merge_request.merged?
%span %span
%i.fa.fa-check = icon('check')
MERGED MERGED
- elsif merge_request.closed? - elsif merge_request.closed?
%span %span
%i.fa.fa-ban = icon('ban')
CLOSED CLOSED
- note_count = merge_request.mr_and_commit_notes.user.count - note_count = merge_request.mr_and_commit_notes.user.count
- if merge_request.assignee - if merge_request.assignee
&nbsp; &nbsp;
= link_to_member(merge_request.source_project, merge_request.assignee, name: false) = link_to_member(merge_request.source_project, merge_request.assignee, name: false, title: "Assigned to :name")
- if note_count > 0 - if note_count > 0
&nbsp; &nbsp;
%span = link_to merge_request_path(merge_request) + "#notes" do
%i.fa.fa-comments = icon('comments')
= note_count = note_count
- else - else
&nbsp; &nbsp;
%span.merge-request-no-comments = link_to merge_request_path(merge_request) + "#notes", class: "merge-request-no-comments" do
%i.fa.fa-comments = icon('comments')
= 0 = 0
.merge-request-info .merge-request-info
= "##{merge_request.iid} opened #{time_ago_with_tooltip(merge_request.created_at, placement: 'bottom')} by #{link_to_member(@project, merge_request.author, avatar: false)}".html_safe \##{merge_request.iid} &middot;
- if merge_request.milestone_id? opened #{time_ago_with_tooltip(merge_request.created_at, placement: 'bottom')}
&nbsp; by #{link_to_member(@project, merge_request.author, avatar: false)}
%span
%i.fa.fa-clock-o
= merge_request.milestone.title
- if merge_request.target_project.default_branch != merge_request.target_branch - if merge_request.target_project.default_branch != merge_request.target_branch
&nbsp; &nbsp;
%span = link_to namespace_project_commits_path(merge_request.project.namespace, merge_request.project, merge_request.target_branch) do
%i.fa.fa-code-fork = icon('code-fork')
= merge_request.target_branch = merge_request.target_branch
- if merge_request.milestone
&nbsp;
= link_to namespace_project_merge_requests_path(merge_request.project.namespace, merge_request.project, milestone_title: merge_request.milestone.title) do
= icon('clock-o')
= merge_request.milestone.title
- if merge_request.labels.any?
&nbsp;
- merge_request.labels.each do |label|
= link_to_label(label, project: merge_request.project)
- if merge_request.tasks? - if merge_request.tasks?
&nbsp;
%span.task-status %span.task-status
= merge_request.task_status = merge_request.task_status
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
%h4 Compare failed %h4 Compare failed
%p We can't compare selected branches. It may be because of huge diff. Please try again or select different branches. %p We can't compare selected branches. It may be because of huge diff. Please try again or select different branches.
- else - else
.light-well.append-bottom-10 .light-well.append-bottom-default
.center .center
%h4 %h4
There isn't anything to merge. There isn't anything to merge.
...@@ -86,4 +86,3 @@ ...@@ -86,4 +86,3 @@
return; return;
} }
}); });
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
= f.hidden_field :target_branch = f.hidden_field :target_branch
.mr-compare.merge-request .mr-compare.merge-request
%ul.merge-request-tabs %ul.merge-request-tabs.center-top-menu.no-top.no-bottom
%li.commits-tab %li.commits-tab
= link_to url_for(params), data: {target: '#commits', action: 'commits', toggle: 'tab'} do = link_to url_for(params), data: {target: '#commits', action: 'commits', toggle: 'tab'} do
Commits Commits
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
.tab-content .tab-content
#commits.commits.tab-pane #commits.commits.tab-pane
= render "projects/commits/commits", project: @project = render "projects/merge_requests/show/commits"
#diffs.diffs.tab-pane.active #diffs.diffs.tab-pane.active
- if @diffs.present? - if @diffs.present?
= render "projects/diffs/diffs", diffs: @diffs, project: @project = render "projects/diffs/diffs", diffs: @diffs, project: @project
...@@ -57,4 +57,3 @@ ...@@ -57,4 +57,3 @@
diffs_loaded: true, diffs_loaded: true,
commits_loaded: true commits_loaded: true
}); });
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
.merge-request-details.issuable-details .merge-request-details.issuable-details
= render "projects/merge_requests/show/mr_title" = render "projects/merge_requests/show/mr_title"
= render "projects/merge_requests/show/mr_box" = render "projects/merge_requests/show/mr_box"
.append-bottom-20.mr-source-target.prepend-top-default .append-bottom-default.mr-source-target.prepend-top-default
- if @merge_request.open? - if @merge_request.open?
.pull-right .pull-right
- if @merge_request.source_branch_exists? - if @merge_request.source_branch_exists?
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
= link_to "command line", "#modal_merge_info", class: "how_to_merge_link vlink", title: "How To Merge", "data-toggle" => "modal" = link_to "command line", "#modal_merge_info", class: "how_to_merge_link vlink", title: "How To Merge", "data-toggle" => "modal"
- if @commits.present? - if @commits.present?
%ul.merge-request-tabs %ul.merge-request-tabs.center-top-menu.no-top.no-bottom
%li.notes-tab %li.notes-tab
= link_to namespace_project_merge_request_path(@project.namespace, @project, @merge_request), data: {target: '#notes', action: 'notes', toggle: 'tab'} do = link_to namespace_project_merge_request_path(@project.namespace, @project, @merge_request), data: {target: '#notes', action: 'notes', toggle: 'tab'} do
Discussion Discussion
......
.gray-content-block.second-block.oneline-block .gray-content-block.middle-block.oneline-block
= icon("sort-amount-desc") = icon("sort-amount-desc")
Most recent commits displayed first Most recent commits displayed first
......
...@@ -31,4 +31,4 @@ ...@@ -31,4 +31,4 @@
= link_to 'Close Milestone', namespace_project_milestone_path(@project.namespace, @project, milestone, milestone: {state_event: :close }), method: :put, remote: true, class: "btn btn-xs btn-close" = link_to 'Close Milestone', namespace_project_milestone_path(@project.namespace, @project, milestone, milestone: {state_event: :close }), method: :put, remote: true, class: "btn btn-xs btn-close"
= link_to namespace_project_milestone_path(milestone.project.namespace, milestone.project, milestone), data: { confirm: 'Are you sure?' }, method: :delete, class: "btn btn-xs btn-remove" do = link_to namespace_project_milestone_path(milestone.project.namespace, milestone.project, milestone), data: { confirm: 'Are you sure?' }, method: :delete, class: "btn btn-xs btn-remove" do
%i.fa.fa-trash-o %i.fa.fa-trash-o
Remove Delete
- page_title @milestone.title, "Milestones" - page_title @milestone.title, "Milestones"
= render "header_title" = render "header_title"
%h4.page-title .issuable-details
.issue-box{ class: issue_box_class(@milestone) } .page-title
- if @milestone.closed? .issue-box{ class: issue_box_class(@milestone) }
Closed - if @milestone.closed?
- elsif @milestone.expired? Closed
Expired - elsif @milestone.expired?
- else Expired
Open
Milestone ##{@milestone.iid}
%small.creator
= @milestone.expires_at
.pull-right
- if can?(current_user, :admin_milestone, @project)
= link_to edit_namespace_project_milestone_path(@project.namespace, @project, @milestone), class: "btn btn-grouped" do
%i.fa.fa-pencil-square-o
Edit
- if @milestone.active?
= link_to 'Close Milestone', namespace_project_milestone_path(@project.namespace, @project, @milestone, milestone: {state_event: :close }), method: :put, class: "btn btn-close btn-grouped"
- else - else
= link_to 'Reopen Milestone', namespace_project_milestone_path(@project.namespace, @project, @milestone, milestone: {state_event: :activate }), method: :put, class: "btn btn-reopen btn-grouped" Open
= link_to namespace_project_milestone_path(@project.namespace, @project, @milestone), data: { confirm: 'Are you sure?' }, method: :delete, class: "btn btn-grouped btn-remove" do Milestone ##{@milestone.iid}
%i.fa.fa-trash-o - if @milestone.expires_at
Remove %span.creator
&middot;
= @milestone.expires_at
.pull-right
- if can?(current_user, :admin_milestone, @project)
= link_to edit_namespace_project_milestone_path(@project.namespace, @project, @milestone), class: "btn btn-grouped" do
%i.fa.fa-pencil-square-o
Edit
- if @milestone.active?
= link_to 'Close Milestone', namespace_project_milestone_path(@project.namespace, @project, @milestone, milestone: {state_event: :close }), method: :put, class: "btn btn-close btn-grouped"
- else
= link_to 'Reopen Milestone', namespace_project_milestone_path(@project.namespace, @project, @milestone, milestone: {state_event: :activate }), method: :put, class: "btn btn-reopen btn-grouped"
= link_to namespace_project_milestone_path(@project.namespace, @project, @milestone), data: { confirm: 'Are you sure?' }, method: :delete, class: "btn btn-grouped btn-remove" do
%i.fa.fa-trash-o
Delete
.gray-content-block.middle-block
%h2.issue-title
= gfm escape_once(@milestone.title)
%div
- if @milestone.description.present?
.description
.wiki
= preserve do
= markdown @milestone.description
%hr
- if @milestone.issues.any? && @milestone.can_be_closed? - if @milestone.issues.any? && @milestone.can_be_closed?
.alert.alert-success .alert.alert-success.prepend-top-default
%span All issues for this milestone are closed. You may close milestone now. %span All issues for this milestone are closed. You may close milestone now.
%h3.issue-title .context.prepend-top-default
= gfm escape_once(@milestone.title)
%div
- if @milestone.description.present?
.description
.wiki
= preserve do
= markdown @milestone.description
%hr
.context
%p.lead %p.lead
Progress: Progress:
#{@milestone.closed_items_count} closed #{@milestone.closed_items_count} closed
...@@ -51,8 +55,7 @@ ...@@ -51,8 +55,7 @@
%span.pull-right= @milestone.expires_at %span.pull-right= @milestone.expires_at
= milestone_progress_bar(@milestone) = milestone_progress_bar(@milestone)
%ul.center-top-menu.no-top.no-bottom
%ul.nav.nav-tabs
%li.active %li.active
= link_to '#tab-issues', 'data-toggle' => 'tab' do = link_to '#tab-issues', 'data-toggle' => 'tab' do
Issues Issues
...@@ -66,17 +69,21 @@ ...@@ -66,17 +69,21 @@
Participants Participants
%span.badge= @users.count %span.badge= @users.count
.pull-right
- if can?(current_user, :create_issue, @project)
= link_to new_namespace_project_issue_path(@project.namespace, @project, issue: { milestone_id: @milestone.id }), class: "btn btn-grouped", title: "New Issue" do
%i.fa.fa-plus
New Issue
- if can?(current_user, :read_issue, @project)
= link_to 'Browse Issues', namespace_project_issues_path(@milestone.project.namespace, @milestone.project, milestone_title: @milestone.title), class: "btn edit-milestone-link btn-grouped"
.tab-content .tab-content
.tab-pane.active#tab-issues .tab-pane.active#tab-issues
.row .gray-content-block.middle-block
.pull-right
- if can?(current_user, :create_issue, @project)
= link_to new_namespace_project_issue_path(@project.namespace, @project, issue: { milestone_id: @milestone.id }), class: "btn btn-grouped", title: "New Issue" do
%i.fa.fa-plus
New Issue
- if can?(current_user, :read_issue, @project)
= link_to 'Browse Issues', namespace_project_issues_path(@milestone.project.namespace, @milestone.project, milestone_title: @milestone.title), class: "btn btn-grouped"
.oneline
All issues in this milestone
.row.prepend-top-default
.col-md-4 .col-md-4
= render('issues', title: 'Unstarted Issues (open and unassigned)', issues: @issues.opened.unassigned, id: 'unassigned') = render('issues', title: 'Unstarted Issues (open and unassigned)', issues: @issues.opened.unassigned, id: 'unassigned')
.col-md-4 .col-md-4
...@@ -85,7 +92,15 @@ ...@@ -85,7 +92,15 @@
= render('issues', title: 'Completed Issues (closed)', issues: @issues.closed, id: 'closed') = render('issues', title: 'Completed Issues (closed)', issues: @issues.closed, id: 'closed')
.tab-pane#tab-merge-requests .tab-pane#tab-merge-requests
.row .gray-content-block.middle-block
.pull-right
- if can?(current_user, :read_merge_request, @project)
= link_to 'Browse Merge Requests', namespace_project_merge_requests_path(@milestone.project.namespace, @milestone.project, milestone_title: @milestone.title), class: "btn btn-grouped"
.oneline
All merge requests in this milestone
.row.prepend-top-default
.col-md-3 .col-md-3
= render('merge_requests', title: 'Work in progress (open and unassigned)', merge_requests: @merge_requests.opened.unassigned, id: 'unassigned') = render('merge_requests', title: 'Work in progress (open and unassigned)', merge_requests: @merge_requests.opened.unassigned, id: 'unassigned')
.col-md-3 .col-md-3
...@@ -100,6 +115,10 @@ ...@@ -100,6 +115,10 @@
= render 'merge_request', merge_request: merge_request = render 'merge_request', merge_request: merge_request
.tab-pane#tab-participants .tab-pane#tab-participants
.gray-content-block.middle-block
.oneline
All participants to this milestone
%ul.bordered-list %ul.bordered-list
- @users.each do |user| - @users.each do |user|
%li %li
......
...@@ -14,6 +14,6 @@ ...@@ -14,6 +14,6 @@
= render 'projects/zen', f: f, attr: :description, classes: 'description js-quick-submit form-control' = render 'projects/zen', f: f, attr: :description, classes: 'description js-quick-submit form-control'
= render 'projects/notes/hints' = render 'projects/notes/hints'
.error-alert .error-alert
.prepend-top-default .form-actions.prepend-top-default
= f.submit 'Save changes', class: 'btn btn-save' = f.submit 'Save changes', class: 'btn btn-save'
= link_to "Cancel", namespace_project_tag_path(@project.namespace, @project, @tag.name), class: "btn btn-default btn-cancel" = link_to "Cancel", namespace_project_tag_path(@project.namespace, @project, @tag.name), class: "btn btn-default btn-cancel"
...@@ -3,10 +3,10 @@ ...@@ -3,10 +3,10 @@
- split_button = split_button || false - split_button = split_button || false
- if split_button == true - if split_button == true
%span.btn-group{class: btn_class} %span.btn-group{class: btn_class}
= link_to archive_namespace_project_repository_path(@project.namespace, @project, ref: ref, format: 'zip'), class: 'btn btn-success col-xs-10', rel: 'nofollow' do = link_to archive_namespace_project_repository_path(@project.namespace, @project, ref: ref, format: 'zip'), class: 'btn col-xs-10', rel: 'nofollow' do
%i.fa.fa-download %i.fa.fa-download
%span Download zip %span Download zip
%a.col-xs-2.btn.btn-success.dropdown-toggle{ 'data-toggle' => 'dropdown' } %a.col-xs-2.btn.dropdown-toggle{ 'data-toggle' => 'dropdown' }
%span.caret %span.caret
%span.sr-only %span.sr-only
Select Archive Format Select Archive Format
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
= render "home_panel" = render "home_panel"
.project-stats.gray-content-block .project-stats.gray-content-block.second-block
%ul.nav.nav-pills %ul.nav.nav-pills
%li %li
= link_to namespace_project_commits_path(@project.namespace, @project, current_ref) do = link_to namespace_project_commits_path(@project.namespace, @project, current_ref) do
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
- if can? current_user, :push_code, @project - if can? current_user, :push_code, @project
.pull-right .pull-right
= link_to new_namespace_project_tag_path(@project.namespace, @project), class: 'btn btn-create new-tag-btn' do = link_to new_namespace_project_tag_path(@project.namespace, @project), class: 'btn btn-create new-tag-btn' do
%i.fa.fa-add-sign = icon('plus')
New tag New tag
.oneline .oneline
Tags give the ability to mark specific points in history as being important Tags give the ability to mark specific points in history as being important
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
%i.fa.fa-angle-right %i.fa.fa-angle-right
&nbsp; &nbsp;
%small.light %small.light
= link_to @commit.short_id, namespace_project_commit_path(@project.namespace, @project, @commit) = link_to @commit.short_id, namespace_project_commit_path(@project.namespace, @project, @commit), class: "monospace"
&ndash; &ndash;
= truncate(@commit.title, length: 50) = truncate(@commit.title, length: 50)
= link_to 'History', namespace_project_commits_path(@project.namespace, @project, @id), class: 'pull-right' = link_to 'History', namespace_project_commits_path(@project.namespace, @project, @id), class: 'pull-right'
......
...@@ -3,8 +3,10 @@ ...@@ -3,8 +3,10 @@
.panel.panel-default.panel-small .panel.panel-default.panel-small
- project = group[0] - project = group[0]
.panel-heading .panel-heading
= link_to_project project = link_to project.name_with_namespace, namespace_project_issues_path(project.namespace, project)
= link_to 'show all', namespace_project_issues_path(project.namespace, project), class: 'pull-right' - if can?(current_user, :create_issue, project)
.pull-right
= link_to 'New issue', new_namespace_project_issue_path(project.namespace, project)
%ul.well-list.issues-list %ul.well-list.issues-list
- group[1].each do |issue| - group[1].each do |issue|
...@@ -12,4 +14,3 @@ ...@@ -12,4 +14,3 @@
= paginate @issues, theme: "gitlab" = paginate @issues, theme: "gitlab"
- else - else
.nothing-here-block No issues to show .nothing-here-block No issues to show
...@@ -3,8 +3,11 @@ ...@@ -3,8 +3,11 @@
.panel.panel-default.panel-small .panel.panel-default.panel-small
- project = group[0] - project = group[0]
.panel-heading .panel-heading
= link_to_project project = link_to project.name_with_namespace, namespace_project_merge_requests_path(project.namespace, project)
= link_to 'show all', namespace_project_merge_requests_path(project.namespace, project), class: 'pull-right' - if can?(current_user, :create_merge_request, project)
.pull-right
= link_to 'New merge request', new_namespace_project_merge_request_path(project.namespace, project)
%ul.well-list.mr-list %ul.well-list.mr-list
- group[1].each do |merge_request| - group[1].each do |merge_request|
= render 'projects/merge_requests/merge_request', merge_request: merge_request = render 'projects/merge_requests/merge_request', merge_request: merge_request
......
= form_for [@project.namespace.becomes(Namespace), @project, issuable], remote: true, html: {class: 'issuable-context-form inline-update js-issuable-update'} do |f| = form_for [@project.namespace.becomes(Namespace), @project, issuable], remote: true, html: {class: 'issuable-context-form inline-update js-issuable-update'} do |f|
%div.prepend-top-20 %div.prepend-top-default
.issuable-context-title .issuable-context-title
%label %label
Assignee: Assignee:
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
- if can?(current_user, :"admin_#{issuable.to_ability_name}", @project) - if can?(current_user, :"admin_#{issuable.to_ability_name}", @project)
= users_select_tag("#{issuable.class.table_name.singularize}[assignee_id]", placeholder: 'Select assignee', class: 'custom-form-control js-select2 js-assignee', selected: issuable.assignee_id, project: @target_project, null_user: true, current_user: true) = users_select_tag("#{issuable.class.table_name.singularize}[assignee_id]", placeholder: 'Select assignee', class: 'custom-form-control js-select2 js-assignee', selected: issuable.assignee_id, project: @target_project, null_user: true, current_user: true)
%div.prepend-top-20.clearfix %div.prepend-top-default.clearfix
.issuable-context-title .issuable-context-title
%label %label
Milestone: Milestone:
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
- if current_user - if current_user
- subscribed = issuable.subscribed?(current_user) - subscribed = issuable.subscribed?(current_user)
%div.prepend-top-20.clearfix %div.prepend-top-default.clearfix
.issuable-context-title .issuable-context-title
%label %label
Subscription: Subscription:
......
...@@ -93,7 +93,8 @@ ...@@ -93,7 +93,8 @@
%p.help-block %p.help-block
= link_to 'Change branches', mr_change_branches_path(@merge_request) = link_to 'Change branches', mr_change_branches_path(@merge_request)
.form-actions - is_footer = !(issuable.is_a?(MergeRequest) && issuable.new_record?)
.gray-content-block{class: (is_footer ? "footer-block" : "middle-block")}
- if !issuable.project.empty_repo? && (guide_url = contribution_guide_path(issuable.project)) && !issuable.persisted? - if !issuable.project.empty_repo? && (guide_url = contribution_guide_path(issuable.project)) && !issuable.persisted?
%p %p
Please review the Please review the
......
.snippet-details .issuable-details
.page-title .page-title
.snippet-box{class: visibility_level_color(@snippet.visibility_level)} .snippet-box.has_tooltip{class: visibility_level_color(@snippet.visibility_level), title: snippet_visibility_level_description(@snippet.visibility_level), data: { container: 'body' }}
= visibility_level_icon(@snippet.visibility_level) = visibility_level_icon(@snippet.visibility_level, fw: false)
= visibility_level_label(@snippet.visibility_level) = visibility_level_label(@snippet.visibility_level)
%span.snippet-id Snippet ##{@snippet.id} Snippet ##{@snippet.id}
%span.creator %span.creator
&middot; created by #{link_to_member(@project, @snippet.author, size: 24)} &middot; created by #{link_to_member(@project, @snippet.author, size: 24)}
&middot; &middot;
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
= render "projects/snippets/actions" = render "projects/snippets/actions"
- else - else
= render "snippets/actions" = render "snippets/actions"
.gray-content-block.middle-block .gray-content-block.middle-block
%h2.snippet-title %h2.issue-title
= gfm escape_once(@snippet.title) = gfm escape_once(@snippet.title)
...@@ -32,7 +32,7 @@ Rails.application.configure do ...@@ -32,7 +32,7 @@ Rails.application.configure do
# config.force_ssl = true # config.force_ssl = true
# See everything in the log (default is :info) # See everything in the log (default is :info)
# config.log_level = :debug config.log_level = :info
# Suppress 'Rendered template ...' messages in the log # Suppress 'Rendered template ...' messages in the log
# source: http://stackoverflow.com/a/16369363 # source: http://stackoverflow.com/a/16369363
......
...@@ -6,6 +6,9 @@ If a user is both in a project group and in the project itself, the highest perm ...@@ -6,6 +6,9 @@ If a user is both in a project group and in the project itself, the highest perm
If a user is a GitLab administrator they receive all permissions. If a user is a GitLab administrator they receive all permissions.
On public projects the Guest role is not enforced.
All users will be able to create issues, leave comments, and pull or download the project code.
To add or import a user, you can follow the [project users and members To add or import a user, you can follow the [project users and members
documentation](doc/workflow/add-user/add-user.md). documentation](doc/workflow/add-user/add-user.md).
...@@ -15,8 +18,8 @@ documentation](doc/workflow/add-user/add-user.md). ...@@ -15,8 +18,8 @@ documentation](doc/workflow/add-user/add-user.md).
|---------------------------------------|---------|------------|-------------|----------|--------| |---------------------------------------|---------|------------|-------------|----------|--------|
| Create new issue | ✓ | ✓ | ✓ | ✓ | ✓ | | Create new issue | ✓ | ✓ | ✓ | ✓ | ✓ |
| Leave comments | ✓ | ✓ | ✓ | ✓ | ✓ | | Leave comments | ✓ | ✓ | ✓ | ✓ | ✓ |
| Pull project code | | ✓ | ✓ | ✓ | ✓ | | Pull project code | | ✓ | ✓ | ✓ | ✓ |
| Download project | | ✓ | ✓ | ✓ | ✓ | | Download project | | ✓ | ✓ | ✓ | ✓ |
| Create code snippets | | ✓ | ✓ | ✓ | ✓ | | Create code snippets | | ✓ | ✓ | ✓ | ✓ |
| Manage issue tracker | | ✓ | ✓ | ✓ | ✓ | | Manage issue tracker | | ✓ | ✓ | ✓ | ✓ |
| Manage labels | | ✓ | ✓ | ✓ | ✓ | | Manage labels | | ✓ | ✓ | ✓ | ✓ |
......
...@@ -6,7 +6,8 @@ For example from 7.14.0 to 7.14.3, also see the [semantic versioning specificati ...@@ -6,7 +6,8 @@ For example from 7.14.0 to 7.14.3, also see the [semantic versioning specificati
### 0. Backup ### 0. Backup
It's useful to make a backup just in case things go south: It's useful to make a backup just in case things go south:
(With MySQL, this may require granting "LOCK TABLES" privileges to the GitLab user on the database version) (With MySQL, this may require granting "LOCK TABLES" privileges to the GitLab
user on the database version)
```bash ```bash
cd /home/git/gitlab cd /home/git/gitlab
...@@ -15,19 +16,23 @@ sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production ...@@ -15,19 +16,23 @@ sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production
### 1. Stop server ### 1. Stop server
sudo service gitlab stop ```bash
sudo service gitlab stop
```
### 2. Get latest code for the stable branch ### 2. Get latest code for the stable branch
In the commands below, replace `LATEST_TAG` with the latest GitLab tag you want
to update to, for example `v8.0.3`. Use `git tag -l 'v*.[0-9]' --sort='v:refname'`
to see a list of all tags. Make sure to update patch versions only (check your
current version with `cat VERSION`).
```bash ```bash
cd /home/git/gitlab cd /home/git/gitlab
sudo -u git -H git fetch --all sudo -u git -H git fetch --all
sudo -u git -H git checkout -- Gemfile.lock db/schema.rb sudo -u git -H git checkout -- Gemfile.lock db/schema.rb
sudo -u git -H git checkout LATEST_TAG -b LATEST_TAG sudo -u git -H git checkout LATEST_TAG -b LATEST_TAG
``` ```
Replace `LATEST_TAG` with the latest GitLab tag you want to update to, for example `v8.0.3`.
Use `git tag -l 'v*.[0-9]' --sort='v:refname'` to see a list of all tags.
Make sure to update patch versions only (check your current version with `cat VERSION`)
### 3. Update gitlab-shell to the corresponding version ### 3. Update gitlab-shell to the corresponding version
...@@ -37,12 +42,20 @@ sudo -u git -H git fetch ...@@ -37,12 +42,20 @@ sudo -u git -H git fetch
sudo -u git -H git checkout v`cat /home/git/gitlab/GITLAB_SHELL_VERSION` -b v`cat /home/git/gitlab/GITLAB_SHELL_VERSION` sudo -u git -H git checkout v`cat /home/git/gitlab/GITLAB_SHELL_VERSION` -b v`cat /home/git/gitlab/GITLAB_SHELL_VERSION`
``` ```
### 4. Install libs, migrations, etc. ### 4. Update gitlab-workhorse to the corresponding version
```bash
cd /home/git/gitlab-workhorse
sudo -u git -H git fetch
sudo -u git -H git checkout v`cat /home/git/gitlab/GITLAB_WORKHORSE_VERSION` -b v`cat /home/git/gitlab/GITLAB_WORKHORSE_VERSION`
```
### 5. Install libs, migrations, etc.
```bash ```bash
cd /home/git/gitlab cd /home/git/gitlab
#PostgreSQL # PostgreSQL
sudo -u git -H bundle install --without development test mysql --deployment sudo -u git -H bundle install --without development test mysql --deployment
# MySQL # MySQL
...@@ -52,19 +65,25 @@ sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production ...@@ -52,19 +65,25 @@ sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production
sudo -u git -H bundle exec rake assets:clean assets:precompile cache:clear RAILS_ENV=production sudo -u git -H bundle exec rake assets:clean assets:precompile cache:clear RAILS_ENV=production
``` ```
### 5. Start application ### 6. Start application
sudo service gitlab start ```bash
sudo service nginx restart sudo service gitlab start
sudo service nginx restart
```
### 6. Check application status ### 7. Check application status
Check if GitLab and its environment are configured correctly: Check if GitLab and its environment are configured correctly:
sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production ```bash
sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production
```
To make sure you didn't miss anything run a more thorough check with: To make sure you didn't miss anything run a more thorough check with:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production ```bash
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production
```
If all items are green, then congratulations upgrade complete! If all items are green, then congratulations upgrade complete!
...@@ -17,7 +17,7 @@ class Spinach::Features::AdminIssuesLabels < Spinach::FeatureSteps ...@@ -17,7 +17,7 @@ class Spinach::Features::AdminIssuesLabels < Spinach::FeatureSteps
step 'I remove label \'bug\'' do step 'I remove label \'bug\'' do
page.within "#label_#{bug_label.id}" do page.within "#label_#{bug_label.id}" do
click_link 'Remove' click_link 'Delete'
end end
end end
......
...@@ -9,7 +9,7 @@ class Spinach::Features::ProjectIssuesLabels < Spinach::FeatureSteps ...@@ -9,7 +9,7 @@ class Spinach::Features::ProjectIssuesLabels < Spinach::FeatureSteps
step 'I remove label \'bug\'' do step 'I remove label \'bug\'' do
page.within "#label_#{bug_label.id}" do page.within "#label_#{bug_label.id}" do
click_link 'Remove' click_link 'Delete'
end end
end end
......
...@@ -63,7 +63,7 @@ class Spinach::Features::ProjectIssuesMilestones < Spinach::FeatureSteps ...@@ -63,7 +63,7 @@ class Spinach::Features::ProjectIssuesMilestones < Spinach::FeatureSteps
end end
step 'I click link to remove milestone' do step 'I click link to remove milestone' do
click_link 'Remove' click_link 'Delete'
end end
step 'I should see no milestones' do step 'I should see no milestones' do
......
...@@ -87,7 +87,7 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps ...@@ -87,7 +87,7 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps
end end
step 'I click link "Diff"' do step 'I click link "Diff"' do
click_link 'Preview changes' click_link 'Preview Changes'
end end
step 'I click on "Commit Changes"' do step 'I click on "Commit Changes"' do
...@@ -192,7 +192,7 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps ...@@ -192,7 +192,7 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps
end end
step 'I see Browse dir link' do step 'I see Browse dir link' do
expect(page).to have_link 'Browse Dir »' expect(page).to have_link 'Browse Directory »'
expect(page).not_to have_link 'Browse Code »' expect(page).not_to have_link 'Browse Code »'
end end
...@@ -204,13 +204,13 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps ...@@ -204,13 +204,13 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps
step 'I see Browse file link' do step 'I see Browse file link' do
expect(page).to have_link 'Browse File »' expect(page).to have_link 'Browse File »'
expect(page).not_to have_link 'Browse Code »' expect(page).not_to have_link 'Browse Files »'
end end
step 'I see Browse code link' do step 'I see Browse code link' do
expect(page).to have_link 'Browse Code »' expect(page).to have_link 'Browse Files »'
expect(page).not_to have_link 'Browse File »' expect(page).not_to have_link 'Browse File »'
expect(page).not_to have_link 'Browse Dir »' expect(page).not_to have_link 'Browse Directory »'
end end
step 'I click on Permalink' do step 'I click on Permalink' do
......
...@@ -260,7 +260,7 @@ module Gitlab ...@@ -260,7 +260,7 @@ module Gitlab
end end
def link_to_project(object) def link_to_project(object)
if object && !object.projects.exists?(@project) if object && !object.projects.exists?(@project.id)
object.projects << @project object.projects << @project
object.save object.save
end end
......
require 'spec_helper'
describe Admin::ImpersonationController do
let(:admin) { create(:admin) }
before do
sign_in(admin)
end
describe 'CREATE #impersonation when blocked' do
let(:blocked_user) { create(:user, state: :blocked) }
it 'does not allow impersonation' do
post :create, id: blocked_user.username
expect(flash[:alert]).to eq 'You cannot impersonate a blocked user'
end
end
end
...@@ -128,6 +128,16 @@ describe "Admin::Users", feature: true do ...@@ -128,6 +128,16 @@ describe "Admin::Users", feature: true do
expect(page).not_to have_content('Impersonate') expect(page).not_to have_content('Impersonate')
end end
it 'should not show impersonate button for blocked user' do
another_user.block
visit admin_user_path(another_user)
expect(page).not_to have_content('Impersonate')
another_user.activate
end
end end
context 'when impersonating' do context 'when impersonating' do
......
...@@ -247,7 +247,7 @@ describe Notify do ...@@ -247,7 +247,7 @@ describe Notify do
end end
describe 'that have been reassigned' do describe 'that have been reassigned' do
subject { Notify.reassigned_issue_email(recipient.id, issue.id, previous_assignee.id, current_user) } subject { Notify.reassigned_issue_email(recipient.id, issue.id, previous_assignee.id, current_user.id) }
it_behaves_like 'a multiple recipients email' it_behaves_like 'a multiple recipients email'
it_behaves_like 'an answer to an existing thread', 'issue' it_behaves_like 'an answer to an existing thread', 'issue'
...@@ -278,7 +278,7 @@ describe Notify do ...@@ -278,7 +278,7 @@ describe Notify do
describe 'status changed' do describe 'status changed' do
let(:status) { 'closed' } let(:status) { 'closed' }
subject { Notify.issue_status_changed_email(recipient.id, issue.id, status, current_user) } subject { Notify.issue_status_changed_email(recipient.id, issue.id, status, current_user.id) }
it_behaves_like 'an answer to an existing thread', 'issue' it_behaves_like 'an answer to an existing thread', 'issue'
it_behaves_like 'it should show Gmail Actions View Issue link' it_behaves_like 'it should show Gmail Actions View Issue link'
...@@ -382,7 +382,7 @@ describe Notify do ...@@ -382,7 +382,7 @@ describe Notify do
describe 'status changed' do describe 'status changed' do
let(:status) { 'reopened' } let(:status) { 'reopened' }
subject { Notify.merge_request_status_email(recipient.id, merge_request.id, status, current_user) } subject { Notify.merge_request_status_email(recipient.id, merge_request.id, status, current_user.id) }
it_behaves_like 'an answer to an existing thread', 'merge_request' it_behaves_like 'an answer to an existing thread', 'merge_request'
it_behaves_like 'it should show Gmail Actions View Merge request link' it_behaves_like 'it should show Gmail Actions View Merge request link'
...@@ -597,8 +597,10 @@ describe Notify do ...@@ -597,8 +597,10 @@ describe Notify do
let(:user) { create(:user, email: 'old-email@mail.com') } let(:user) { create(:user, email: 'old-email@mail.com') }
before do before do
user.email = "new-email@mail.com" perform_enqueued_jobs do
user.save user.email = "new-email@mail.com"
user.save
end
end end
subject { ActionMailer::Base.deliveries.last } subject { ActionMailer::Base.deliveries.last }
......
...@@ -444,7 +444,9 @@ describe Project do ...@@ -444,7 +444,9 @@ describe Project do
before do before do
2.times do 2.times do
create(:note_on_commit, project: project2, created_at: date) # Little fix for special issue related to Fractional Seconds support for MySQL.
# See: https://github.com/rails/rails/pull/14359/files
create(:note_on_commit, project: project2, created_at: date + 1)
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment