summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG4
-rw-r--r--README.md19
-rw-r--r--app/assets/javascripts/dashboard.js.coffee2
-rw-r--r--app/assets/stylesheets/application.scss1
-rw-r--r--app/assets/stylesheets/generic/buttons.scss28
-rw-r--r--app/assets/stylesheets/generic/issue_box.scss51
-rw-r--r--app/assets/stylesheets/generic/lists.scss9
-rw-r--r--app/assets/stylesheets/generic/ui_box.scss173
-rw-r--r--app/assets/stylesheets/gl_bootstrap.scss99
-rw-r--r--app/assets/stylesheets/main/variables.scss19
-rw-r--r--app/assets/stylesheets/sections/dashboard.scss17
-rw-r--r--app/assets/stylesheets/sections/help.scss17
-rw-r--r--app/assets/stylesheets/sections/merge_requests.scss6
-rw-r--r--app/controllers/groups_controller.rb16
-rw-r--r--app/controllers/help_controller.rb11
-rw-r--r--app/controllers/projects/branches_controller.rb3
-rw-r--r--app/controllers/projects/tags_controller.rb7
-rw-r--r--app/helpers/search_helper.rb18
-rw-r--r--app/models/commit.rb4
-rw-r--r--app/services/create_tag_service.rb13
-rw-r--r--app/views/admin/background_jobs/show.html.haml8
-rw-r--r--app/views/admin/groups/show.html.haml20
-rw-r--r--app/views/admin/hooks/index.html.haml6
-rw-r--r--app/views/admin/projects/index.html.haml6
-rw-r--r--app/views/admin/projects/show.html.haml18
-rw-r--r--app/views/admin/users/index.html.haml6
-rw-r--r--app/views/admin/users/show.html.haml12
-rw-r--r--app/views/dashboard/_groups.html.haml4
-rw-r--r--app/views/dashboard/_projects.html.haml4
-rw-r--r--app/views/errors/access_denied.html.haml2
-rw-r--r--app/views/groups/_projects.html.haml6
-rw-r--r--app/views/groups/_settings_nav.html.haml10
-rw-r--r--app/views/groups/edit.html.haml135
-rw-r--r--app/views/groups/members.html.haml6
-rw-r--r--app/views/groups/projects.html.haml29
-rw-r--r--app/views/help/_layout.html.haml6
-rw-r--r--app/views/help/index.html.haml61
-rw-r--r--app/views/help/show.html.haml3
-rw-r--r--app/views/profiles/emails/index.html.haml4
-rw-r--r--app/views/profiles/groups/index.html.haml4
-rw-r--r--app/views/profiles/keys/index.html.haml6
-rw-r--r--app/views/profiles/keys/new.html.haml2
-rw-r--r--app/views/profiles/keys/show.html.haml4
-rw-r--r--app/views/projects/_visibility_level.html.haml2
-rw-r--r--app/views/projects/branches/_branch.html.haml2
-rw-r--r--app/views/projects/branches/destroy.js.haml3
-rw-r--r--app/views/projects/commits/_head.html.haml2
-rw-r--r--app/views/projects/compare/show.html.haml4
-rw-r--r--app/views/projects/deploy_keys/_form.html.haml2
-rw-r--r--app/views/projects/edit.html.haml60
-rw-r--r--app/views/projects/hooks/index.html.haml6
-rw-r--r--app/views/projects/issues/_form.html.haml2
-rw-r--r--app/views/projects/issues/_issues.html.haml2
-rw-r--r--app/views/projects/issues/show.html.haml6
-rw-r--r--app/views/projects/merge_requests/_form.html.haml3
-rw-r--r--app/views/projects/merge_requests/_new_submit.html.haml7
-rw-r--r--app/views/projects/merge_requests/index.html.haml2
-rw-r--r--app/views/projects/merge_requests/show/_commits.html.haml4
-rw-r--r--app/views/projects/merge_requests/show/_mr_box.html.haml4
-rw-r--r--app/views/projects/milestones/_form.html.haml2
-rw-r--r--app/views/projects/milestones/_issues.html.haml4
-rw-r--r--app/views/projects/milestones/index.html.haml2
-rw-r--r--app/views/projects/milestones/show.html.haml12
-rw-r--r--app/views/projects/notes/_form.html.haml2
-rw-r--r--app/views/projects/protected_branches/index.html.haml4
-rw-r--r--app/views/projects/tags/_tag.html.haml2
-rw-r--r--app/views/projects/team_members/_group_members.html.haml4
-rw-r--r--app/views/projects/team_members/_team.html.haml4
-rw-r--r--app/views/projects/team_members/index.html.haml2
-rw-r--r--app/views/projects/wikis/_form.html.haml3
-rw-r--r--app/views/shared/_issues.html.haml4
-rw-r--r--app/views/shared/_merge_requests.html.haml4
-rw-r--r--app/views/users/_profile.html.haml4
-rw-r--r--app/views/users/_projects.html.haml4
-rw-r--r--config/routes.rb16
-rw-r--r--doc/api/repositories.md34
-rw-r--r--doc/install/installation.md4
-rw-r--r--doc/install/requirements.md6
-rw-r--r--doc/permissions/permissions.md1
-rw-r--r--doc/update/6.6-to-6.7.md2
-rw-r--r--doc/update/6.7-to-6.8.md2
-rw-r--r--doc/update/mysql_to_postgresql.md39
-rw-r--r--doc/update/upgrader.md9
-rw-r--r--doc/workflow/README.md4
-rw-r--r--features/steps/group/group.rb8
-rw-r--r--features/steps/help.rb6
-rw-r--r--lib/api/repositories.rb16
-rw-r--r--lib/gitlab/git_access.rb3
-rwxr-xr-xlib/support/init.d/gitlab1
-rw-r--r--lib/tasks/gitlab/check.rake4
-rw-r--r--spec/features/security/group/group_access_spec.rb12
-rw-r--r--spec/requests/api/repositories_spec.rb18
-rw-r--r--spec/routing/routing_spec.rb16
93 files changed, 642 insertions, 606 deletions
diff --git a/CHANGELOG b/CHANGELOG
index c8a969912e2..97d1299bae6 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -12,6 +12,10 @@ v 7.0.0
- Make it easier to implement other CI services for GitLab
- Group masters can create projects in group
- Deprecate ruby 1.9.3 support
+ - Only masters can rewrite/remove git tags
+
+v 6.9.2
+ - Revert the commit that broke the LDAP user filter
v 6.9.1
- Fix scroll to highlighted line
diff --git a/README.md b/README.md
index 10b3c9a8288..7bff30b35e8 100644
--- a/README.md
+++ b/README.md
@@ -29,7 +29,7 @@
### Resources
-* [GitLab.com](https://www.gitlab.com/) includes information about [subscriptions](https://www.gitlab.com/subscription/), [consultancy](https://www.gitlab.com/consultancy/), the [community](https://www.gitlab.com/community/) and the [hosted GitLab Cloud](https://www.gitlab.com/cloud/).
+* [www.gitlab.com](https://www.gitlab.com/) includes information about [subscriptions](https://www.gitlab.com/subscription/), [consultancy](https://www.gitlab.com/consultancy/), the [community](https://www.gitlab.com/community/) and the [hosted GitLab.com](https://www.gitlab.com/gitlab-com/).
* [GitLab Enterprise Edition](https://www.gitlab.com/gitlab-ee/) offers additional features aimed at larger organizations.
@@ -51,13 +51,13 @@
Please see [the installation page on the GitLab website](https://www.gitlab.com/installation/).
-### New versions and upgrading
+### New versions
-Since 2011 GitLab is released on the 22nd of every month. Every new release includes an [upgrade guide](doc/update) and new features are detailed in the [Changelog](CHANGELOG).
+Since 2011 a minor or major version of GitLab is released on the 22nd of every month. Patch and security releases come out when needed. New features are detailed on the [blog](https://www.gitlab.com/blog/) and in the [changelog](CHANGELOG). For more information about the release process see the release [documentation](https://gitlab.com/gitlab-org/gitlab-ce/tree/master/doc/release). Features that will likely be in the next releases can be found on the [feature request forum](http://feedback.gitlab.com/forums/176466-general) with the status [started](http://feedback.gitlab.com/forums/176466-general/status/796456) and [completed](http://feedback.gitlab.com/forums/176466-general/status/796457).
-It is recommended to follow a monthly upgrade schedule. Security releases come out when needed. For more information about the release process see the documentation for [monthly](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/release/monthly.md) and [security](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/release/security.md) releases.
+### Upgrading
-* Features that will be in the next releases are listed on the [feature request forum](http://feedback.gitlab.com/forums/176466-general) with the status [started](http://feedback.gitlab.com/forums/176466-general/status/796456) and [completed](http://feedback.gitlab.com/forums/176466-general/status/796457).
+For updating the the Omnibus installation please see the [update documentation](https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/doc/update.md). For manual installations there is an [upgrader script](doc/update/upgrader.md) and there are [upgrade guides](doc/update).
### Run in production mode
@@ -71,14 +71,15 @@ or by directly calling the script
Please login with root / 5iveL!fe
-### Run in development mode
-
-Consider setting up the development environment with [the cookbook](https://gitlab.com/gitlab-org/cookbook-gitlab/blob/master/README.md#installation).
+### Install a development environment
-Copy the example development unicorn configuration file
+We recommend setting up your development environment with [the cookbook](https://gitlab.com/gitlab-org/cookbook-gitlab/blob/master/README.md#installation).
+If you do not use the cookbook you might need to copy the example development unicorn configuration file
cp config/unicorn.rb.example.development config/unicorn.rb
+### Run in development mode
+
Start it with [Foreman](https://github.com/ddollar/foreman)
bundle exec foreman start -p 3000
diff --git a/app/assets/javascripts/dashboard.js.coffee b/app/assets/javascripts/dashboard.js.coffee
index d2bd9e7362b..c4a0ccd9c2a 100644
--- a/app/assets/javascripts/dashboard.js.coffee
+++ b/app/assets/javascripts/dashboard.js.coffee
@@ -4,7 +4,7 @@ class Dashboard
$(".dash-filter").keyup ->
terms = $(this).val()
- uiBox = $(this).parents('.ui-box').first()
+ uiBox = $(this).parents('.panel').first()
if terms == "" || terms == undefined
uiBox.find(".dash-list li").show()
else
diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss
index 0b372a87a11..630d2aa429b 100644
--- a/app/assets/stylesheets/application.scss
+++ b/app/assets/stylesheets/application.scss
@@ -34,6 +34,7 @@
/**
* Page specific styles (issues, projects etc):
*/
+
@import "sections/*";
/**
diff --git a/app/assets/stylesheets/generic/buttons.scss b/app/assets/stylesheets/generic/buttons.scss
index dd0a2938cfe..a9849aa487c 100644
--- a/app/assets/stylesheets/generic/buttons.scss
+++ b/app/assets/stylesheets/generic/buttons.scss
@@ -59,8 +59,8 @@
&.btn-primary {
color: #ffffff;
- background-color: #429bca;
- border-color: #358ebd;
+ background-color: $bg_primary;
+ border-color: $border_primary;
&.hover,
&:hover,
@@ -74,8 +74,8 @@
&.btn-success {
color: #ffffff;
- background-color: #5cb85c;
- border-color: #4cae4c;
+ background-color: $bg_success;
+ border-color: $border_success;
&.hover,
@@ -90,8 +90,8 @@
&.btn-danger {
color: #ffffff;
- background-color: #d9534f;
- border-color: #d43f3a;
+ background-color: $bg_danger;
+ border-color: $border_danger;
&.hover,
@@ -104,6 +104,22 @@
}
}
+ &.btn-warning {
+ color: #ffffff;
+ background-color: $bg_warning;
+ border-color: $border_warning;
+
+
+ &.hover,
+ &:hover,
+ &.disabled,
+ &[disabled] {
+ color: #ffffff;
+ background-color: #e38c02;
+ border-color: #e38c02;
+ }
+ }
+
&.btn-new {
@extend .btn-success;
}
diff --git a/app/assets/stylesheets/generic/issue_box.scss b/app/assets/stylesheets/generic/issue_box.scss
index bd692417989..3cb64d69a9f 100644
--- a/app/assets/stylesheets/generic/issue_box.scss
+++ b/app/assets/stylesheets/generic/issue_box.scss
@@ -17,52 +17,36 @@
&.issue-box-closed {
border-color: $border_danger;
.state {
- background-color: $bg_light_danger;
+ background-color: $bg_danger;
+ color: #FFF;
border-color: $border_danger;
- color: $color_danger;
- .state-label {
- background-color: $bg_danger;
- color: #FFF;
- }
}
}
&.issue-box-merged {
border-color: $border_primary;
.state {
- background-color: $bg_light_primary;
+ background-color: $bg_primary;
+ color: #FFF;
border-color: $border_primary;
- color: $color_primary;
- .state-label {
- background-color: $bg_primary;
- color: #FFF;
- }
}
}
&.issue-box-open {
border-color: $border_success;
.state {
- background-color: $bg_light_success;
border-color: $border_success;
- color: $color_success;
- .state-label {
- background-color: $bg_success;
- color: #FFF;
- }
+ background-color: $bg_success;
+ color: #FFF;
}
}
&.issue-box-expired {
border-color: #cea61b;
.state {
- background-color: #fcf8e3;
border-color: #faebcc;
- color: #8a6d3b;
- .state-label {
- background: #cea61b;
- color: #FFF;
- }
+ background: #cea61b;
+ color: #FFF;
}
}
@@ -72,12 +56,12 @@
.state {
border-bottom: 1px solid #DDD;
- line-height: 32px;
+ padding: 10px 25px;
}
.title {
- font-size: 22px;
- font-weight: 500;
+ font-size: 26px;
+ font-weight: normal;
line-height: 1.5;
margin: 0;
color: #333;
@@ -115,14 +99,15 @@
.state-label {
font-size: 14px;
- padding: 1px 25px;
- text-align: center;
- text-shadow: none;
- display: inline-block;
- line-height: 34px;
+ float: left;
+ font-weight: bold;
}
.creator {
- padding: 2px 15px;
+ float: right;
+ a {
+ color: #FFF;
+ text-decoration: underline;
+ }
}
}
diff --git a/app/assets/stylesheets/generic/lists.scss b/app/assets/stylesheets/generic/lists.scss
index 963768044d5..2e3559f3c8c 100644
--- a/app/assets/stylesheets/generic/lists.scss
+++ b/app/assets/stylesheets/generic/lists.scss
@@ -72,6 +72,15 @@
font-size: 14px;
line-height: 18px;
}
+
+ .row_title {
+ font-weight: 500;
+ color: #444;
+ &:hover {
+ color: #444;
+ text-decoration: underline;
+ }
+ }
}
}
diff --git a/app/assets/stylesheets/generic/ui_box.scss b/app/assets/stylesheets/generic/ui_box.scss
deleted file mode 100644
index 7a977eae70d..00000000000
--- a/app/assets/stylesheets/generic/ui_box.scss
+++ /dev/null
@@ -1,173 +0,0 @@
-/**
- * UI box:
- * Block element for separating information on page.
- * Used for storing issues lists, grouped data.
- * You can have multiple ui boxes on one page
- *
- * Classes:
- * .ui-box - for any block & widgets
- * .ui-box.ui-box-small - same but with smaller title
- * .ui-box.ui-box-danger - with red title
- *
- * Ex. 1: List
- * .ui-box
- * .title
- * # title here
- * %ul
- * # content here
- *
- * Ex. 2: Block data
- * .ui-box
- * .title
- * # title here
- * .body
- * # content here
- *
- */
-
-.ui-box {
- background: #FFF;
- margin-bottom: 20px;
- border: 1px solid #DDD;
- word-wrap: break-word;
-
- img {
- max-width: 100%;
- }
-
- pre {
- code {
- background: none !important;
- }
- }
-
- ul {
- margin: 0;
- padding: 0;
- }
-
- .title {
- background-color: #EEE;
- border-bottom: 1px solid #DDD;
- color: #666;
- font-size: 16px;
- text-shadow: 0 1px 1px #fff;
- padding: 0 10px;
- font-size: 14px;
- line-height: 40px;
- font-weight: normal;
- margin: 0;
-
- > a {
- text-shadow: 0 1px 1px #fff;
- }
-
- form {
- margin-bottom: 0;
- margin-top: 0;
- }
-
- .btn {
- vertical-align: middle;
- padding: 4px 12px;
- @include box-shadow(0 0px 1px 1px #f2f2f2);
- }
-
- .nav-pills {
- > li {
- > a {
- padding: 13px;
- margin: 0;
- font-size: 13px;
- }
- &.active {
- > a {
- background: #D5D5D5;
- color: $style_color;
- @include border-radius(0);
- border-radius: 0;
- border-left: 1px solid #CCC;
- border-right: 1px solid #CCC;
- }
- }
- }
- }
- }
-
- .body {
- padding: 10px;
- }
-
- &.padded {
- h5, .title {
- margin: -20px;
- margin-bottom: 0;
- padding: 5px 20px;
- }
- }
-
- .row_title {
- font-weight: 500;
- color: #444;
- &:hover {
- color: #444;
- text-decoration: underline;
- }
- }
-
- .form-holder {
- padding-top: 20px;
- form {
- margin-bottom: 0;
- legend {
- text-indent: 10px;
- }
- .form-actions {
- margin-bottom: 0;
- }
- }
- }
-}
-
-/*
- * Small box
- */
-.ui-box.ui-box-small {
- margin-bottom: 10px;
-
- .title {
- font-size: 13px;
- line-height: 30px;
-
- a {
- color: #666;
- &:hover {
- text-decoration: underline;
- }
- }
- }
-}
-
-/*
- * Danger box
- */
-.ui-box.ui-box-danger {
- background: #f7f7f7;
- border: none;
-
- .title {
- background: #D65;
- color: #fff;
- text-shadow: none;
- font-weight: 500;
- }
-}
-
-/*
- * Block under tw-bootstrap tabs
- */
-.tab-pane {
- .ui-box {
- margin: 3px 3px 25px 3px;
- }
-}
diff --git a/app/assets/stylesheets/gl_bootstrap.scss b/app/assets/stylesheets/gl_bootstrap.scss
index 8676f07b1a2..3312c762ed1 100644
--- a/app/assets/stylesheets/gl_bootstrap.scss
+++ b/app/assets/stylesheets/gl_bootstrap.scss
@@ -7,8 +7,8 @@
*/
$font-size-base: 13px !default;
-$nav-pills-active-link-hover-bg: $bg_style_color;
-$pagination-active-bg: $bg_style_color;
+$nav-pills-active-link-hover-bg: $bg_primary;
+$pagination-active-bg: $bg_primary;
// Core variables and mixins
@import "bootstrap/variables";
@@ -221,3 +221,98 @@ ul.breadcrumb {
position: relative;
white-space: nowrap;
}
+
+/**
+ * Add some extra stuff to panels
+ *
+ */
+.panel {
+ @include border-radius(0px);
+
+ .panel-heading {
+ @include border-radius(0px);
+ font-size: 14px;
+ line-height: 18px;
+
+ .panel-head-actions {
+ position: relative;
+ top: -7px;
+ float: right;
+ }
+ }
+
+ .panel-body {
+ form {
+ margin: 0;
+ }
+
+ .form-actions {
+ margin-bottom: 0;
+ background: #FFF;
+ }
+ }
+
+ &.panel-small {
+ .panel-heading {
+ padding: 6px 15px;
+ }
+ }
+}
+
+.panel-default {
+ .panel-heading {
+ background-color: #EEE;
+ }
+}
+
+.panel-danger {
+ border-color: $border_danger;
+ .panel-heading {
+ color: #ffffff;
+ background-color: $bg_danger;
+ border-color: $border_danger;
+ a {
+ color: #FFF;
+ text-decoration: underline;
+ }
+ }
+}
+
+.panel-success {
+ border-color: $border_success;
+ .panel-heading {
+ color: #ffffff;
+ background-color: $bg_success;
+ border-color: $border_success;
+ a {
+ color: #FFF;
+ text-decoration: underline;
+ }
+ }
+}
+
+.panel-primary {
+ border-color: $border_primary;
+ .panel-heading {
+ color: #ffffff;
+ background-color: $bg_primary;
+ border-color: $border_primary;
+ a {
+ color: #FFF;
+ text-decoration: underline;
+ }
+ }
+}
+
+.panel-warning {
+ border-color: $border_warning;
+ .panel-heading {
+ color: #ffffff;
+ background-color: $bg_warning;
+ border-color: $border_warning;
+ a {
+ color: #FFF;
+ text-decoration: underline;
+ }
+ }
+}
diff --git a/app/assets/stylesheets/main/variables.scss b/app/assets/stylesheets/main/variables.scss
index f133777de56..6ea6a8303f4 100644
--- a/app/assets/stylesheets/main/variables.scss
+++ b/app/assets/stylesheets/main/variables.scss
@@ -11,27 +11,26 @@ $hover: #D9EDF7;
/*
* Success colors (green)
*/
-$border_success: #4cae4c;
-$bg_success: #5cb85c;
-$bg_light_success: #dff0d8;
-$color_success: #3c763d;
+$border_success: #469408;
+$bg_success: #469408;
/*
* Danger colors (red)
*/
$border_danger: #d43f3a;
$bg_danger: #d9534f;
-$bg_light_danger: #f2dede;
-$color_danger: #a94442;
/*
* Primary colors (blue)
*/
-$border_primary: #358ebd;
-$bg_primary: #429bca;
-$bg_light_primary: #d9edf7;
-$color_primary: #31708f;
+$border_primary: #446e9b;
+$bg_primary: #446e9b;
+/*
+ * Warning colors (yellow)
+ */
+$bg_warning: #d9831f;
+$border_warning: #d9831f;
/**
* Commit Diff Colors
diff --git a/app/assets/stylesheets/sections/dashboard.scss b/app/assets/stylesheets/sections/dashboard.scss
index e70757e0406..0ec21ff50fa 100644
--- a/app/assets/stylesheets/sections/dashboard.scss
+++ b/app/assets/stylesheets/sections/dashboard.scss
@@ -1,10 +1,11 @@
.dashboard {
.side {
- .ui-box {
- margin: 0px;
- box-shadow: none;
-
- .nav-projects-tabs li { padding: 0; }
+ .panel {
+ .panel-heading {
+ background: #EEE;
+ border-top-left-radius: 0;
+ }
+ border-top-left-radius: 0;
}
}
}
@@ -24,9 +25,7 @@
.dashboard {
.dash-filter {
- margin: 7px 0;
- padding: 4px 6px;
- width: 220px;
+ width: 205px;
float: left;
height: inherit;
}
@@ -34,7 +33,7 @@
@media (max-width: 1200px) {
.dashboard .dash-filter {
- width: 150px;
+ width: 140px;
}
}
diff --git a/app/assets/stylesheets/sections/help.scss b/app/assets/stylesheets/sections/help.scss
new file mode 100644
index 00000000000..178a735941d
--- /dev/null
+++ b/app/assets/stylesheets/sections/help.scss
@@ -0,0 +1,17 @@
+.documentation {
+ padding-bottom: 10px;
+ p {
+ padding: 10px 14px;
+ margin: 0;
+ }
+
+ li {
+ line-height: 24px;
+ color: #888;
+
+ a {
+ font-size: 14px;
+ margin-right: 3px;
+ }
+ }
+}
diff --git a/app/assets/stylesheets/sections/merge_requests.scss b/app/assets/stylesheets/sections/merge_requests.scss
index cac4cb66aa4..5d716ddec3b 100644
--- a/app/assets/stylesheets/sections/merge_requests.scss
+++ b/app/assets/stylesheets/sections/merge_requests.scss
@@ -106,12 +106,6 @@
}
.mr-state-widget {
- @include border-radius(0px);
-
- .panel-heading {
- @include border-radius(0px);
- }
-
.panel-body {
h4 {
margin-top: 0px;
diff --git a/app/controllers/groups_controller.rb b/app/controllers/groups_controller.rb
index ddaae6f0e8c..a2629c51384 100644
--- a/app/controllers/groups_controller.rb
+++ b/app/controllers/groups_controller.rb
@@ -5,11 +5,11 @@ class GroupsController < ApplicationController
# Authorize
before_filter :authorize_read_group!, except: [:new, :create]
- before_filter :authorize_admin_group!, only: [:edit, :update, :destroy]
+ before_filter :authorize_admin_group!, only: [:edit, :update, :destroy, :projects]
before_filter :authorize_create_group!, only: [:new, :create]
# Load group projects
- before_filter :projects, except: [:new, :create]
+ before_filter :load_projects, except: [:new, :create, :projects, :edit, :update]
before_filter :default_filter, only: [:issues, :merge_requests]
@@ -79,9 +79,13 @@ class GroupsController < ApplicationController
def edit
end
+ def projects
+ @projects = @group.projects.page(params[:page])
+ end
+
def update
if @group.update_attributes(params[:group])
- redirect_to @group, notice: 'Group was successfully updated.'
+ redirect_to edit_group_path(@group), notice: 'Group was successfully updated.'
else
render action: "edit"
end
@@ -99,17 +103,17 @@ class GroupsController < ApplicationController
@group ||= Group.find_by(path: params[:id])
end
- def projects
+ def load_projects
@projects ||= ProjectsFinder.new.execute(current_user, group: group).sorted_by_activity.non_archived
end
def project_ids
- projects.pluck(:id)
+ @projects.pluck(:id)
end
# Dont allow unauthorized access to group
def authorize_read_group!
- unless @group and (projects.present? or can?(current_user, :read_group, @group))
+ unless @group and (@projects.present? or can?(current_user, :read_group, @group))
if current_user.nil?
return authenticate_user!
else
diff --git a/app/controllers/help_controller.rb b/app/controllers/help_controller.rb
index 051cbdfaf05..a4fcd4b29e8 100644
--- a/app/controllers/help_controller.rb
+++ b/app/controllers/help_controller.rb
@@ -13,6 +13,17 @@ class HelpController < ApplicationController
end
end
+ def show
+ @category = params[:category]
+ @file = params[:file]
+
+ if File.exists?(Rails.root.join('doc', @category, @file + '.md'))
+ render 'show'
+ else
+ not_found!
+ end
+ end
+
def shortcuts
end
end
diff --git a/app/controllers/projects/branches_controller.rb b/app/controllers/projects/branches_controller.rb
index ab8892bbf0b..3c8e7ec73f6 100644
--- a/app/controllers/projects/branches_controller.rb
+++ b/app/controllers/projects/branches_controller.rb
@@ -24,10 +24,11 @@ class Projects::BranchesController < Projects::ApplicationController
def destroy
DeleteBranchService.new.execute(project, params[:id], current_user)
+ @branch_name = params[:id]
respond_to do |format|
format.html { redirect_to project_branches_path(@project) }
- format.js { render nothing: true }
+ format.js
end
end
end
diff --git a/app/controllers/projects/tags_controller.rb b/app/controllers/projects/tags_controller.rb
index 0b99165bf62..e03a9f4d66d 100644
--- a/app/controllers/projects/tags_controller.rb
+++ b/app/controllers/projects/tags_controller.rb
@@ -13,11 +13,8 @@ class Projects::TagsController < Projects::ApplicationController
end
def create
- @repository.add_tag(params[:tag_name], params[:ref])
-
- if new_tag = @repository.find_tag(params[:tag_name])
- Event.create_ref_event(@project, current_user, new_tag, 'add', 'refs/tags')
- end
+ @tag = CreateTagService.new.execute(@project, params[:tag_name],
+ params[:ref], current_user)
redirect_to project_tags_path(@project)
end
diff --git a/app/helpers/search_helper.rb b/app/helpers/search_helper.rb
index d7f3da7e537..01c31205695 100644
--- a/app/helpers/search_helper.rb
+++ b/app/helpers/search_helper.rb
@@ -33,15 +33,15 @@ module SearchHelper
# Autocomplete results for internal help pages
def help_autocomplete
[
- { label: "help: API Help", url: help_api_path },
- { label: "help: Markdown Help", url: help_markdown_path },
- { label: "help: Permissions Help", url: help_permissions_path },
- { label: "help: Public Access Help", url: help_public_access_path },
- { label: "help: Rake Tasks Help", url: help_raketasks_path },
- { label: "help: SSH Keys Help", url: help_ssh_path },
- { label: "help: System Hooks Help", url: help_system_hooks_path },
- { label: "help: Web Hooks Help", url: help_web_hooks_path },
- { label: "help: Workflow Help", url: help_workflow_path },
+ { label: "help: API Help", url: help_page_path("api", "README") },
+ { label: "help: Markdown Help", url: help_page_path("markdown", "markdown") },
+ { label: "help: Permissions Help", url: help_page_path("permissions", "permissions") },
+ { label: "help: Public Access Help", url: help_page_path("public_access", "public_access") },
+ { label: "help: Rake Tasks Help", url: help_page_path("raketasks", "README") },
+ { label: "help: SSH Keys Help", url: help_page_path("ssh", "README") },
+ { label: "help: System Hooks Help", url: help_page_path("system_hooks", "system_hooks") },
+ { label: "help: Web Hooks Help", url: help_page_path("web_hooks", "web_hooks") },
+ { label: "help: Workflow Help", url: help_page_path("workflow", "README") },
]
end
diff --git a/app/models/commit.rb b/app/models/commit.rb
index c313aeb7572..81875e1be2d 100644
--- a/app/models/commit.rb
+++ b/app/models/commit.rb
@@ -13,8 +13,8 @@ class Commit
DIFF_SAFE_FILES = 100
DIFF_SAFE_LINES = 5000
# Commits above this size will not be rendered in HTML
- DIFF_HARD_LIMIT_FILES = 500
- DIFF_HARD_LIMIT_LINES = 10000
+ DIFF_HARD_LIMIT_FILES = 1000
+ DIFF_HARD_LIMIT_LINES = 50000
class << self
def decorate(commits)
diff --git a/app/services/create_tag_service.rb b/app/services/create_tag_service.rb
new file mode 100644
index 00000000000..97766677405
--- /dev/null
+++ b/app/services/create_tag_service.rb
@@ -0,0 +1,13 @@
+class CreateTagService
+ def execute(project, tag_name, ref, current_user)
+ repository = project.repository
+ repository.add_tag(tag_name, ref)
+ new_tag = repository.find_tag(tag_name)
+
+ if new_tag
+ Event.create_ref_event(project, current_user, new_tag, 'add', 'refs/tags')
+ end
+
+ new_tag
+ end
+end
diff --git a/app/views/admin/background_jobs/show.html.haml b/app/views/admin/background_jobs/show.html.haml
index 32f77cc1a70..c79d1280dd9 100644
--- a/app/views/admin/background_jobs/show.html.haml
+++ b/app/views/admin/background_jobs/show.html.haml
@@ -3,9 +3,9 @@
%hr
-.ui-box
- .title Sidekiq running processes
- .body
+.panel.panel-default
+ .panel-heading Sidekiq running processes
+ .panel-body
- if @sidekiq_processes.empty?
%h4.cred
%i.icon-warning-sign
@@ -40,5 +40,5 @@
-.ui-box
+.panel.panel-default
%iframe{src: sidekiq_path, width: '100%', height: 900, style: "border: none"}
diff --git a/app/views/admin/groups/show.html.haml b/app/views/admin/groups/show.html.haml
index 6055865b4cb..183203aac75 100644
--- a/app/views/admin/groups/show.html.haml
+++ b/app/views/admin/groups/show.html.haml
@@ -7,8 +7,8 @@
%hr
.row
.col-md-6
- .ui-box
- .title
+ .panel.panel-default
+ .panel-heading
Group info:
%ul.well-list
%li
@@ -29,8 +29,8 @@
%strong
= @group.created_at.stamp("March 1, 1999")
- .ui-box
- .title
+ .panel.panel-default
+ .panel-heading
Projects
%small
(#{@group.projects.count})
@@ -45,13 +45,13 @@
%span.monospace= project.path_with_namespace + ".git"
.col-md-6
- .ui-box
- .title
+ .panel.panel-default
+ .panel-heading
Add user(s) to the group:
- .body.form-holder
+ .panel-body.form-holder
%p.light
Read more about project permissions
- %strong= link_to "here", help_permissions_path, class: "vlink"
+ %strong= link_to "here", help_page_path("permissions", "permissions"), class: "vlink"
= form_tag project_teams_update_admin_group_path(@group), id: "new_team_member", class: "bulk_import", method: :put do
%div
@@ -60,8 +60,8 @@
= select_tag :group_access, options_for_select(UsersGroup.group_access_roles), class: "project-access-select select2"
%hr
= submit_tag 'Add users into group', class: "btn btn-create"
- .ui-box
- .title
+ .panel.panel-default
+ .panel-heading
%strong #{@group.name}
Group Members
%small
diff --git a/app/views/admin/hooks/index.html.haml b/app/views/admin/hooks/index.html.haml
index 60773c20097..0c5db0805f9 100644
--- a/app/views/admin/hooks/index.html.haml
+++ b/app/views/admin/hooks/index.html.haml
@@ -2,7 +2,7 @@
System hooks
%p.light
- #{link_to "System hooks ", help_system_hooks_path, class: "vlink"} can be
+ #{link_to "System hooks ", help_page_path("system_hooks", "system_hooks"), class: "vlink"} can be
used for binding events when GitLab creates a User or Project.
%hr
@@ -22,8 +22,8 @@
%hr
-if @hooks.any?
- .ui-box
- .title
+ .panel.panel-default
+ .panel-heading
System hooks (#{@hooks.count})
%ul.well-list
- @hooks.each do |hook|
diff --git a/app/views/admin/projects/index.html.haml b/app/views/admin/projects/index.html.haml
index 51ad702154f..7a23b7020cc 100644
--- a/app/views/admin/projects/index.html.haml
+++ b/app/views/admin/projects/index.html.haml
@@ -37,10 +37,10 @@
= link_to "Reset", admin_projects_path, class: "btn"
.col-md-8
- .ui-box
- .title
+ .panel.panel-default
+ .panel-heading
Projects (#{@projects.total_count})
- .pull-right
+ .panel-head-actions
.dropdown.inline
%a.dropdown-toggle.btn{href: '#', "data-toggle" => "dropdown"}
%span.light sort:
diff --git a/app/views/admin/projects/show.html.haml b/app/views/admin/projects/show.html.haml
index 11f07743ace..3f25eb7fdb9 100644
--- a/app/views/admin/projects/show.html.haml
+++ b/app/views/admin/projects/show.html.haml
@@ -6,8 +6,8 @@
%hr
.row
.col-md-6
- .ui-box
- .title
+ .panel.panel-default
+ .panel-heading
Project info:
%ul.well-list
%li
@@ -75,10 +75,10 @@
= visibility_level_icon(@project.visibility_level)
= visibility_level_label(@project.visibility_level)
- .ui-box
- .title
+ .panel.panel-default
+ .panel-heading
Transfer project
- .body
+ .panel-body
= form_for @project, url: transfer_admin_project_path(@project), method: :put, html: { class: 'form-horizontal' } do |f|
.form-group
= f.label :namespace_id, "Namespace", class: 'control-label'
@@ -92,8 +92,8 @@
.col-md-6
- if @group
- .ui-box
- .title
+ .panel.panel-default
+ .panel-heading
%strong #{@group.name}
group members (#{@group.users_groups.count})
.pull-right
@@ -103,8 +103,8 @@
- @group.users_groups.order('group_access DESC').each do |member|
= render 'users_groups/users_group', member: member, show_controls: false
- .ui-box
- .title
+ .panel.panel-default
+ .panel-heading
Project members
%small
(#{@project.users.count})
diff --git a/app/views/admin/users/index.html.haml b/app/views/admin/users/index.html.haml
index f42ae7c6a01..b8a18224443 100644
--- a/app/views/admin/users/index.html.haml
+++ b/app/views/admin/users/index.html.haml
@@ -28,10 +28,10 @@
= link_to 'Reset', admin_users_path, class: "btn btn-cancel"
.col-md-9
- .ui-box
- .title
+ .panel.panel-default
+ .panel-heading
Users (#{@users.total_count})
- .pull-right
+ .panel-head-actions
= link_to 'New User', new_admin_user_path, class: "btn btn-new"
%ul.well-list
- @users.each do |user|
diff --git a/app/views/admin/users/show.html.haml b/app/views/admin/users/show.html.haml
index 764b34499ab..28c91c2c3e2 100644
--- a/app/views/admin/users/show.html.haml
+++ b/app/views/admin/users/show.html.haml
@@ -14,8 +14,8 @@
.row
.col-md-6
- .ui-box
- .title
+ .panel.panel-default
+ .panel-heading
Account:
.pull-right
= image_tag avatar_icon(@user.email, 32), class: "avatar s32"
@@ -118,8 +118,8 @@
.col-md-6
- if @user.users_groups.present?
- .ui-box
- .title Groups:
+ .panel.panel-default
+ .panel-heading Groups:
%ul.well-list
- @user.users_groups.each do |user_group|
- group = user_group.group
@@ -132,8 +132,8 @@
= link_to group_users_group_path(group, user_group), data: { confirm: remove_user_from_group_message(group, @user) }, method: :delete, remote: true, class: "btn-tiny btn btn-remove", title: 'Remove user from group' do
%i.icon-remove.icon-white
- .ui-box
- .title Projects (#{@projects.count})
+ .panel.panel-default
+ .panel-heading Projects (#{@projects.count})
%ul.well-list
- @projects.sort_by(&:name_with_namespace).each do |project|
- tm = project.team.find_tm(@user.id)
diff --git a/app/views/dashboard/_groups.html.haml b/app/views/dashboard/_groups.html.haml
index a6bc946bedc..cb9c18b7966 100644
--- a/app/views/dashboard/_groups.html.haml
+++ b/app/views/dashboard/_groups.html.haml
@@ -1,5 +1,5 @@
-.ui-box
- .title.clearfix
+.panel.panel-default
+ .panel-heading.clearfix
= search_field_tag :filter_group, nil, placeholder: 'Filter by name', class: 'dash-filter form-control'
- if current_user.can_create_group?
%span.pull-right
diff --git a/app/views/dashboard/_projects.html.haml b/app/views/dashboard/_projects.html.haml
index 44c7a4b8c80..f2cd57504c1 100644
--- a/app/views/dashboard/_projects.html.haml
+++ b/app/views/dashboard/_projects.html.haml
@@ -1,5 +1,5 @@
-.ui-box
- .title.clearfix
+.panel.panel-default
+ .panel-heading.clearfix
= search_field_tag :filter_projects, nil, placeholder: 'Filter by name', class: 'dash-filter form-control'
- if current_user.can_create_project?
%span.pull-right
diff --git a/app/views/errors/access_denied.html.haml b/app/views/errors/access_denied.html.haml
index 6aa78f0c2a8..e005a7c4409 100644
--- a/app/views/errors/access_denied.html.haml
+++ b/app/views/errors/access_denied.html.haml
@@ -2,4 +2,4 @@
%h3.page-title Access Denied
%hr
%p You are not allowed to access this page.
-%p Read more about project permissions #{link_to "here", help_permissions_path, class: "vlink"}
+%p Read more about project permissions #{link_to "here", help_page_path("permissions", "permissions"), class: "vlink"}
diff --git a/app/views/groups/_projects.html.haml b/app/views/groups/_projects.html.haml
index 4ded28058ed..a6ca41877a4 100644
--- a/app/views/groups/_projects.html.haml
+++ b/app/views/groups/_projects.html.haml
@@ -1,8 +1,8 @@
-.ui-box
- .title
+.panel.panel-default
+ .panel-heading
Projects (#{projects.count})
- if can? current_user, :create_projects, @group
- %span.pull-right
+ .panel-head-actions
= link_to new_project_path(namespace_id: @group.id), class: "btn btn-new" do
%i.icon-plus
New project
diff --git a/app/views/groups/_settings_nav.html.haml b/app/views/groups/_settings_nav.html.haml
new file mode 100644
index 00000000000..32eae31a47d
--- /dev/null
+++ b/app/views/groups/_settings_nav.html.haml
@@ -0,0 +1,10 @@
+%ul.nav.nav-pills.nav-stacked.nav-stacked-menu
+ = nav_link(path: 'groups#edit') do
+ = link_to edit_group_path(@group) do
+ %i.icon-edit
+ Group
+ = nav_link(path: 'groups#projects') do
+ = link_to projects_group_path(@group) do
+ %i.icon-folder-close
+ Projects
+
diff --git a/app/views/groups/edit.html.haml b/app/views/groups/edit.html.haml
index 2a5614cff6c..97f22df044f 100644
--- a/app/views/groups/edit.html.haml
+++ b/app/views/groups/edit.html.haml
@@ -1,95 +1,56 @@
.row
.col-md-2
- %ul.nav.nav-pills.nav-stacked.nav-stacked-menu
- %li.active
- = link_to '#tab-edit', 'data-toggle' => 'tab' do
- %i.icon-edit
- Group
- %li
- = link_to '#tab-projects', 'data-toggle' => 'tab' do
- %i.icon-folder-close
- Projects
- %li
- = link_to '#tab-remove', 'data-toggle' => 'tab' do
- %i.icon-remove-sign
- Remove
-
+ = render 'settings_nav'
.col-md-10
- .tab-content
- .tab-pane.active#tab-edit
- .ui-box
- .title
- %strong= @group.name
- group settings:
- %div.form-holder
- = form_for @group, html: { multipart: true, class: "form-horizontal" }, authenticity_token: true do |f|
- - if @group.errors.any?
- .alert.alert-danger
- %span= @group.errors.full_messages.first
- .form-group
- = f.label :name, class: 'control-label' do
- Group name
- .col-sm-10
- = f.text_field :name, placeholder: "Ex. OpenSource", class: "form-control left"
-
- .form-group.group-description-holder
- = f.label :description, "Details", class: 'control-label'
- .col-sm-10
- = f.text_area :description, maxlength: 250, class: "form-control js-gfm-input", rows: 4
+ .panel.panel-default
+ .panel-heading
+ %strong= @group.name
+ group settings:
+ .panel-body
+ = form_for @group, html: { multipart: true, class: "form-horizontal" }, authenticity_token: true do |f|
+ - if @group.errors.any?
+ .alert.alert-danger
+ %span= @group.errors.full_messages.first
+ .form-group
+ = f.label :name, class: 'control-label' do
+ Group name
+ .col-sm-10
+ = f.text_field :name, placeholder: "Ex. OpenSource", class: "form-control left"
- .form-group
- .col-sm-2
- .col-sm-10
- = image_tag group_icon(@group.to_param), alt: '', class: 'avatar s160'
- %p.light
- - if @group.avatar?
- You can change your group avatar here
- - else
- You can upload a group avatar here
- %a.choose-btn.btn.btn-small.js-choose-group-avatar-button
- %i.icon-paper-clip
- %span Choose File ...
- &nbsp;
- %span.file_name.js-avatar-filename File name...
- = f.file_field :avatar, class: "js-group-avatar-input hidden"
- .light The maximum file size allowed is 100KB.
- - if @group.avatar?
- %hr
- = link_to 'Remove avatar', group_avatar_path(@group.to_param), data: { confirm: "Group avatar will be removed. Are you sure?"}, method: :delete, class: "btn btn-remove btn-small remove-avatar"
+ .form-group.group-description-holder
+ = f.label :description, "Details", class: 'control-label'
+ .col-sm-10
+ = f.text_area :description, maxlength: 250, class: "form-control js-gfm-input", rows: 4
- .form-actions
- = f.submit 'Save group', class: "btn btn-save"
+ .form-group
+ .col-sm-2
+ .col-sm-10
+ = image_tag group_icon(@group.to_param), alt: '', class: 'avatar s160'
+ %p.light
+ - if @group.avatar?
+ You can change your group avatar here
+ - else
+ You can upload a group avatar here
+ %a.choose-btn.btn.btn-small.js-choose-group-avatar-button
+ %i.icon-paper-clip
+ %span Choose File ...
+ &nbsp;
+ %span.file_name.js-avatar-filename File name...
+ = f.file_field :avatar, class: "js-group-avatar-input hidden"
+ .light The maximum file size allowed is 100KB.
+ - if @group.avatar?
+ %hr
+ = link_to 'Remove avatar', group_avatar_path(@group.to_param), data: { confirm: "Group avatar will be removed. Are you sure?"}, method: :delete, class: "btn btn-remove btn-small remove-avatar"
- .tab-pane#tab-projects
- .ui-box
- .title
- %strong= @group.name
- projects:
- - if can? current_user, :manage_group, @group
- %span.pull-right
- = link_to new_project_path(namespace_id: @group.id), class: "btn btn-tiny" do
- %i.icon-plus
- New Project
- %ul.well-list
- - @group.projects.each do |project|
- %li
- .list-item-name
- = visibility_level_icon(project.visibility_level)
- = link_to project.name_with_namespace, project
- .pull-right
- = link_to 'Members', project_team_index_path(project), id: "edit_#{dom_id(project)}", class: "btn btn-small"
- = link_to 'Edit', edit_project_path(project), id: "edit_#{dom_id(project)}", class: "btn btn-small"
- = link_to 'Remove', project, data: { confirm: remove_project_message(project)}, method: :delete, class: "btn btn-small btn-remove"
- - if @group.projects.blank?
- .nothing-here-block This group has no projects yet
+ .form-actions
+ = f.submit 'Save group', class: "btn btn-save"
- .tab-pane#tab-remove
- .ui-box.ui-box-danger
- .title Remove group
- .body
- %p
- Removing group will cause all child projects and resources to be removed.
- %p
- %strong Removed group can not be restored!
+ .panel.panel-danger
+ .panel-heading Remove group
+ .panel-body
+ %p
+ Removing group will cause all child projects and resources to be removed.
+ %br
+ %strong Removed group can not be restored!
- = link_to 'Remove Group', @group, data: {confirm: 'Removed group can not be restored! Are you sure?'}, method: :delete, class: "btn btn-remove"
+ = link_to 'Remove Group', @group, data: {confirm: 'Removed group can not be restored! Are you sure?'}, method: :delete, class: "btn btn-remove"
diff --git a/app/views/groups/members.html.haml b/app/views/groups/members.html.haml
index fa44ee2ae1a..19819c96124 100644
--- a/app/views/groups/members.html.haml
+++ b/app/views/groups/members.html.haml
@@ -5,7 +5,7 @@
%p.light
Members of group have access to all group projects.
Read more about permissions
- %strong= link_to "here", help_permissions_path, class: "vlink"
+ %strong= link_to "here", help_page_path("permissions", "permissions"), class: "vlink"
%hr
@@ -24,8 +24,8 @@
.js-toggle-content.hide.new-group-member-holder
= render "new_group_member"
-.ui-box.prepend-top-20
- .title
+.panel.panel-default.prepend-top-20
+ .panel-heading
%strong #{@group.name}
group members
%small
diff --git a/app/views/groups/projects.html.haml b/app/views/groups/projects.html.haml
new file mode 100644
index 00000000000..a5e752d776f
--- /dev/null
+++ b/app/views/groups/projects.html.haml
@@ -0,0 +1,29 @@
+.row
+ .col-md-2
+ = render 'settings_nav'
+ .col-md-10
+ .panel.panel-default
+ .panel-heading
+ %strong= @group.name
+ projects:
+ - if can? current_user, :manage_group, @group
+ .panel-head-actions
+ = link_to new_project_path(namespace_id: @group.id), class: "btn btn-new" do
+ %i.icon-plus
+ New Project
+ %ul.well-list
+ - @projects.each do |project|
+ %li
+ .list-item-name
+ = visibility_level_icon(project.visibility_level)
+ %strong= link_to project.name_with_namespace, project
+ %span.label.label-gray
+ = repository_size(project)
+ .pull-right
+ = link_to 'Members', project_team_index_path(project), id: "edit_#{dom_id(project)}", class: "btn btn-small"
+ = link_to 'Edit', edit_project_path(project), id: "edit_#{dom_id(project)}", class: "btn btn-small"
+ = link_to 'Remove', project, data: { confirm: remove_project_message(project)}, method: :delete, class: "btn btn-small btn-remove"
+ - if @projects.blank?
+ .nothing-here-block This group has no projects yet
+
+ = paginate @projects, theme: "gitlab"
diff --git a/app/views/help/_layout.html.haml b/app/views/help/_layout.html.haml
index 201d63ca243..93a746c60ea 100644
--- a/app/views/help/_layout.html.haml
+++ b/app/views/help/_layout.html.haml
@@ -1,12 +1,6 @@
.row
.col-md-3
%h3.page-title Help
- %ul.nav.nav-pills.nav-stacked
- - links = {:"Workflow" => help_workflow_path, :"SSH Keys" => help_ssh_path, :"GitLab Markdown" => help_markdown_path, :"Permissions" => help_permissions_path, :"API" => help_api_path, :"Web Hooks" => help_web_hooks_path, :"Rake Tasks" => help_raketasks_path, :"System Hooks" => help_system_hooks_path, :"Public Access" => help_public_access_path, :"Security" => help_security_path}
- - links.each do |title,path|
- %li{class: current_page?(path) ? 'active' : nil}
- = link_to title, path
-
.col-md-9
.wiki
= yield
diff --git a/app/views/help/index.html.haml b/app/views/help/index.html.haml
index 724fe1d6b3a..1b714429f14 100644
--- a/app/views/help/index.html.haml
+++ b/app/views/help/index.html.haml
@@ -18,8 +18,8 @@
.row
.col-md-4
- .ui-box
- .title
+ .panel.panel-default
+ .panel-heading
Quick help
%ul.well-list
%li
@@ -33,53 +33,12 @@
Use
= link_to "shortcuts", '#', onclick: "new Shortcuts()"
- .col-md-4
- .ui-box
- .title
- User documentation
- %ul.well-list
- %li
- %strong= link_to "Workflow", help_workflow_path
- %p Learn how to use Git and GitLab together.
-
- %li
- %strong= link_to "SSH keys", help_ssh_path
- %p Setup secure access to your projects.
-
- %li
- %strong= link_to "GitLab Markdown", help_markdown_path
- %p Learn what you can do with GitLab's advanced formatting system.
-
- %li
- %strong= link_to "Permissions", help_permissions_path
- %p Get familiar with GitLab's permission levels.
+ .col-md-8
+ .panel.panel-default.documentation
+ .panel-heading Documentation
- %li
- %strong= link_to "API", help_api_file_path(category: 'README')
- %p Explore how you can access GitLab via a simple and powerful API.
-
- %li
- %strong= link_to "Web Hooks", help_web_hooks_path
- %p Let GitLab notify you when new code has been pushed to your project.
-
- .col-md-4
- .ui-box
- .title
- Admin documentation
- %ul.well-list
-
- %li
- %strong= link_to "Rake Tasks", help_raketasks_path
- %p Explore what GitLab has in store for you to make administration easier.
-
- %li
- %strong= link_to "System Hooks", help_system_hooks_path
- %p Let GitLab notify you when certain management tasks need to be carried out.
-
- %li
- %strong= link_to "Public Access", help_public_access_path
- %p Learn how you can allow public access to a project.
-
- %li
- %strong= link_to "Security", help_security_path
- %p Learn what you can do to secure your GitLab instance.
+ = preserve do
+ - readme_text = File.read(Rails.root.join("doc", "README.md"))
+ - text = readme_text.dup
+ - readme_text.scan(/\]\(([^(]+)\)/) { |match| text.gsub!(match.first, "help/#{match.first}") }
+ = markdown text
diff --git a/app/views/help/show.html.haml b/app/views/help/show.html.haml
new file mode 100644
index 00000000000..e9fc6163c79
--- /dev/null
+++ b/app/views/help/show.html.haml
@@ -0,0 +1,3 @@
+.col-md-12
+ .documentation
+ = markdown File.read(Rails.root.join('doc', @category, @file + '.md'))
diff --git a/app/views/profiles/emails/index.html.haml b/app/views/profiles/emails/index.html.haml
index b5f1e438ccb..ca980db2f3c 100644
--- a/app/views/profiles/emails/index.html.haml
+++ b/app/views/profiles/emails/index.html.haml
@@ -9,8 +9,8 @@
%hr
-.ui-box
- .title
+.panel.panel-default
+ .panel-heading
Emails (#{@emails.count + 1})
%ul.well-list#emails-table
%li
diff --git a/app/views/profiles/groups/index.html.haml b/app/views/profiles/groups/index.html.haml
index cebc0b6bccb..2efe72b1bb3 100644
--- a/app/views/profiles/groups/index.html.haml
+++ b/app/views/profiles/groups/index.html.haml
@@ -8,8 +8,8 @@
%p.light
Group members have access to all a group's projects
%hr
-.ui-box
- .title
+.panel.panel-default
+ .panel-heading
%strong Groups
(#{@user_groups.count})
%ul.well-list
diff --git a/app/views/profiles/keys/index.html.haml b/app/views/profiles/keys/index.html.haml
index 71a4ca91d42..aabfd57c286 100644
--- a/app/views/profiles/keys/index.html.haml
+++ b/app/views/profiles/keys/index.html.haml
@@ -6,12 +6,12 @@
SSH keys allow you to establish a secure connection between your computer and GitLab
%br
Before you can add an SSH key you need to
- = link_to "generate it", help_ssh_path
+ = link_to "generate it", help_page_path("ssh", "README")
%hr
-.ui-box
- .title
+.panel.panel-default
+ .panel-heading
SSH Keys (#{@keys.count})
%ul.well-list#keys-table
= render @keys
diff --git a/app/views/profiles/keys/new.html.haml b/app/views/profiles/keys/new.html.haml
index 3d5a947948d..126afa55540 100644
--- a/app/views/profiles/keys/new.html.haml
+++ b/app/views/profiles/keys/new.html.haml
@@ -1,6 +1,6 @@
%h3.page-title Add an SSH Key
%p.light
- Paste your public key here. Read more about how to generate a key on #{link_to "the SSH help page", help_ssh_path}.
+ Paste your public key here. Read more about how to generate a key on #{link_to "the SSH help page", help_page_path("ssh", "README")}.
%hr
= render 'form'
diff --git a/app/views/profiles/keys/show.html.haml b/app/views/profiles/keys/show.html.haml
index b6724a7cb5d..c4fc1bb269c 100644
--- a/app/views/profiles/keys/show.html.haml
+++ b/app/views/profiles/keys/show.html.haml
@@ -1,7 +1,7 @@
.row
.col-md-4
- .ui-box
- .title
+ .panel.panel-default
+ .panel-heading
SSH Key
%ul.well-list
%li
diff --git a/app/views/projects/_visibility_level.html.haml b/app/views/projects/_visibility_level.html.haml
index eb38fce0ecf..5f34e66b3ed 100644
--- a/app/views/projects/_visibility_level.html.haml
+++ b/app/views/projects/_visibility_level.html.haml
@@ -1,7 +1,7 @@
.form-group.project-visibility-level-holder
= f.label :visibility_level, class: 'control-label' do
Visibility Level
- = link_to "(?)", help_public_access_path
+ = link_to "(?)", help_page_path("public_access", "public_access")
.col-sm-10
- if can_change_visibility_level
- Gitlab::VisibilityLevel.values.each do |level|
diff --git a/app/views/projects/branches/_branch.html.haml b/app/views/projects/branches/_branch.html.haml
index 2abcd00ee81..54a7b934dd7 100644
--- a/app/views/projects/branches/_branch.html.haml
+++ b/app/views/projects/branches/_branch.html.haml
@@ -1,5 +1,5 @@
- commit = @repository.commit(branch.target)
-%li
+%li(class="js-branch-#{branch.name}")
%h4
= link_to project_tree_path(@project, branch.name) do
%strong= truncate(branch.name, length: 60)
diff --git a/app/views/projects/branches/destroy.js.haml b/app/views/projects/branches/destroy.js.haml
new file mode 100644
index 00000000000..ec1661c0aaa
--- /dev/null
+++ b/app/views/projects/branches/destroy.js.haml
@@ -0,0 +1,3 @@
+:plain
+ $(".js-branch-#{@branch_name}").remove();
+ $('.js-totalbranch-count').html("#{@repository.branches.size}")
diff --git a/app/views/projects/commits/_head.html.haml b/app/views/projects/commits/_head.html.haml
index 0facfc4b5f1..1bb4d9bfab4 100644
--- a/app/views/projects/commits/_head.html.haml
+++ b/app/views/projects/commits/_head.html.haml
@@ -9,7 +9,7 @@
= nav_link(html_options: {class: branches_tab_class}) do
= link_to project_branches_path(@project) do
Branches
- %span.badge= @repository.branches.size
+ %span.badge.js-totalbranch-count= @repository.branches.size
= nav_link(controller: :tags) do
= link_to project_tags_path(@project) do
diff --git a/app/views/projects/compare/show.html.haml b/app/views/projects/compare/show.html.haml
index 57331bff31b..88122a73bba 100644
--- a/app/views/projects/compare/show.html.haml
+++ b/app/views/projects/compare/show.html.haml
@@ -6,8 +6,8 @@
= render "form"
- if @commits.present?
- %div.ui-box
- .title
+ %div.panel.panel-default
+ .panel-heading
Commits (#{@commits.count})
- if @commits.size > MergeRequestDiff::COMMITS_SAFE_SIZE
%ul.well-list
diff --git a/app/views/projects/deploy_keys/_form.html.haml b/app/views/projects/deploy_keys/_form.html.haml
index ebb92b36b47..162ef05b367 100644
--- a/app/views/projects/deploy_keys/_form.html.haml
+++ b/app/views/projects/deploy_keys/_form.html.haml
@@ -14,7 +14,7 @@
.col-sm-10
%p.light
Paste a machine public key here. Read more about how to generate it
- = link_to "here", help_ssh_path
+ = link_to "here", help_page_path("ssh", "README")
= f.text_area :key, class: "form-control thin_area", rows: 5
.form-actions
diff --git a/app/views/projects/edit.html.haml b/app/views/projects/edit.html.haml
index 10674ccae46..59dcf3a6ff0 100644
--- a/app/views/projects/edit.html.haml
+++ b/app/views/projects/edit.html.haml
@@ -6,7 +6,7 @@
Project settings:
%p.light Some settings, such as "Transfer Project", are hidden inside the danger area below
%hr
- .form-holder
+ .panel-body
= form_for @project, remote: true, html: { class: "edit_project form-horizontal" } do |f|
%fieldset
.form-group.project_name_holder
@@ -106,13 +106,13 @@
.js-toggle-content.hide
- if can? current_user, :archive_project, @project
- .ui-box.ui-box-danger
- .title
+ .panel.panel-default.panel.panel-warning
+ .panel-heading
- if @project.archived?
Unarchive project
- else
Archive project
- .body
+ .panel-body
- if @project.archived?
%p
Unarchiving the project will mark its repository as active.
@@ -132,15 +132,34 @@
%strong Archived projects cannot be committed to!
= link_to 'Archive', archive_project_path(@project),
data: { confirm: "Are you sure that you want to archive this project?\nAn archived project cannot be committed to." },
- method: :post, class: "btn btn-remove"
+ method: :post, class: "btn btn-warning"
- else
.nothing-here-block Only the project owner can archive a project
+ .panel.panel-default.panel.panel-warning
+ .panel-heading Rename repository
+ .errors-holder
+ .panel-body
+ = form_for(@project, html: { class: 'form-horizontal' }) do |f|
+ .form-group
+ = f.label :path, class: 'control-label' do
+ %span Path
+ .col-sm-9
+ .form-group
+ .input-group
+ = f.text_field :path, class: 'form-control'
+ %span.input-group-addon .git
+ %ul
+ %li Be careful. Renaming a project's repository can have unintended side effects.
+ %li You will need to update your local repositories to point to the new location.
+ .form-actions
+ = f.submit 'Rename', class: "btn btn-warning"
+
- if can?(current_user, :change_namespace, @project)
- .ui-box.ui-box-danger
- .title Transfer project
+ .panel.panel-default.panel.panel-danger
+ .panel-heading Transfer project
.errors-holder
- .form-holder
+ .panel-body
= form_for(@project, url: transfer_project_path(@project), method: :put, remote: true, html: { class: 'transfer-project form-horizontal' }) do |f|
.form-group
= f.label :namespace_id, class: 'control-label' do
@@ -157,29 +176,10 @@
- else
.nothing-here-block Only the project owner can transfer a project
- .ui-box.ui-box-danger
- .title Rename repository
- .errors-holder
- .form-holder
- = form_for(@project, html: { class: 'form-horizontal' }) do |f|
- .form-group
- = f.label :path, class: 'control-label' do
- %span Path
- .col-sm-9
- .form-group
- .input-group
- = f.text_field :path, class: 'form-control'
- %span.input-group-addon .git
- %ul
- %li Be careful. Renaming a project's repository can have unintended side effects.
- %li You will need to update your local repositories to point to the new location.
- .form-actions
- = f.submit 'Rename', class: "btn btn-remove"
-
- if can?(current_user, :remove_project, @project)
- .ui-box.ui-box-danger
- .title Remove project
- .body
+ .panel.panel-default.panel.panel-danger
+ .panel-heading Remove project
+ .panel-body
%p
Removing the project will delete its repository and all related resources including issues, merge requests etc.
%br
diff --git a/app/views/projects/hooks/index.html.haml b/app/views/projects/hooks/index.html.haml
index 866fd6f6066..9a003c87f68 100644
--- a/app/views/projects/hooks/index.html.haml
+++ b/app/views/projects/hooks/index.html.haml
@@ -2,7 +2,7 @@
Web hooks
%p.light
- #{link_to "Web hooks ", help_web_hooks_path, class: "vlink"} can be
+ #{link_to "Web hooks ", help_page_path("web_hooks", "web_hooks"), class: "vlink"} can be
used for binding events when something is happening within the project.
%hr.clearfix
@@ -51,8 +51,8 @@
= f.submit "Add Web Hook", class: "btn btn-create"
-if @hooks.any?
- .ui-box
- .title
+ .panel.panel-default
+ .panel-heading
Web hooks (#{@hooks.count})
%ul.well-list
- @hooks.each do |hook|
diff --git a/app/views/projects/issues/_form.html.haml b/app/views/projects/issues/_form.html.haml
index 6e61fc8524f..120d70eaa6f 100644
--- a/app/views/projects/issues/_form.html.haml
+++ b/app/views/projects/issues/_form.html.haml
@@ -22,7 +22,7 @@
.col-sm-10
= f.text_area :description, class: 'form-control js-gfm-input markdown-area', rows: 14
.col-sm-12.hint
- .pull-left Issues are parsed with #{link_to "GitLab Flavored Markdown", help_markdown_path, target: '_blank'}.
+ .pull-left Issues are parsed with #{link_to "GitLab Flavored Markdown", help_page_path("markdown", "markdown"), target: '_blank'}.
.pull-right Attach images (JPG, PNG, GIF) by dragging & dropping, #{link_to "selecting them", '#', class: 'markdown-selector' } or pasting from the clipboard.
.clearfix
.error-alert
diff --git a/app/views/projects/issues/_issues.html.haml b/app/views/projects/issues/_issues.html.haml
index e85ff3a7865..1d0dcd7f074 100644
--- a/app/views/projects/issues/_issues.html.haml
+++ b/app/views/projects/issues/_issues.html.haml
@@ -61,7 +61,7 @@
= hidden_field_tag :status, params[:status]
= button_tag "Update issues", class: "btn update_selected_issues btn-save"
-.ui-box
+.panel.panel-default
%ul.well-list.issues-list
= render @issues
- if @issues.blank?
diff --git a/app/views/projects/issues/show.html.haml b/app/views/projects/issues/show.html.haml
index 2c816e788de..695eb225754 100644
--- a/app/views/projects/issues/show.html.haml
+++ b/app/views/projects/issues/show.html.haml
@@ -32,13 +32,13 @@
.issue-box{ class: issue_box_class(@issue) }
.state.clearfix
- .state-label.col-sm-2.col-xs-12
+ .state-label
- if @issue.closed?
Closed
- else
Open
- %span.creator.col-sm-9.col-xs-12
+ .creator
Created by #{link_to_member(@project, @issue.author)} #{time_ago_with_tooltip(@issue.created_at)}
%h4.title
@@ -73,4 +73,4 @@
= label.name
&nbsp;
-.voting_notes#notes= render "projects/notes/notes_with_form" \ No newline at end of file
+.voting_notes#notes= render "projects/notes/notes_with_form"
diff --git a/app/views/projects/merge_requests/_form.html.haml b/app/views/projects/merge_requests/_form.html.haml
index facc6a63f3b..27ea53c006e 100644
--- a/app/views/projects/merge_requests/_form.html.haml
+++ b/app/views/projects/merge_requests/_form.html.haml
@@ -24,9 +24,8 @@
.col-sm-10
= f.text_area :description, class: "form-control js-gfm-input markdown-area", rows: 14
.col-sm-12.hint
- .pull-left Description is parsed with #{link_to "GitLab Flavored Markdown", help_markdown_path, target: '_blank'}.
+ .pull-left Description is parsed with #{link_to "GitLab Flavored Markdown", help_page_path("markdown", "markdown"), target: '_blank'}.
.pull-right Attach images (JPG, PNG, GIF) by dragging & dropping, #{link_to "selecting them", '#', class: 'markdown-selector' } or pasting from the clipboard.
-
.clearfix
.error-alert
%hr
diff --git a/app/views/projects/merge_requests/_new_submit.html.haml b/app/views/projects/merge_requests/_new_submit.html.haml
index bf0e40f9a1f..553bc30ee08 100644
--- a/app/views/projects/merge_requests/_new_submit.html.haml
+++ b/app/views/projects/merge_requests/_new_submit.html.haml
@@ -25,9 +25,8 @@
= f.label :description, "Description"
= f.text_area :description, class: "form-control js-gfm-input markdown-area", rows: 10
.col-sm-12.hint
- .pull-left Description is parsed with #{link_to "GitLab Flavored Markdown", help_markdown_path, target: '_blank'}.
+ .pull-left Description is parsed with #{link_to "GitLab Flavored Markdown", help_page_path("markdown", "markdown"), target: '_blank'}.
.pull-right Attach images (JPG, PNG, GIF) by dragging & dropping, #{link_to "selecting them", '#', class: 'markdown-selector' } or pasting from the clipboard.
-
.clearfix
.error-alert
.form-group
@@ -59,8 +58,8 @@
= f.submit 'Submit merge request', class: "btn btn-create"
.mr-compare
- %div.ui-box
- .title
+ %div.panel.panel-default
+ .panel-heading
Commits (#{@commits.count})
- if @commits.size > MergeRequestDiff::COMMITS_SAFE_SIZE
%ul.well-list
diff --git a/app/views/projects/merge_requests/index.html.haml b/app/views/projects/merge_requests/index.html.haml
index 12a72edb224..232d398c530 100644
--- a/app/views/projects/merge_requests/index.html.haml
+++ b/app/views/projects/merge_requests/index.html.haml
@@ -61,7 +61,7 @@
.pull-right
= render 'shared/sort_dropdown'
- .ui-box
+ .panel.panel-default
%ul.well-list.mr-list
= render @merge_requests
- if @merge_requests.blank?
diff --git a/app/views/projects/merge_requests/show/_commits.html.haml b/app/views/projects/merge_requests/show/_commits.html.haml
index f69146e1a37..e62ab9d9d30 100644
--- a/app/views/projects/merge_requests/show/_commits.html.haml
+++ b/app/views/projects/merge_requests/show/_commits.html.haml
@@ -1,6 +1,6 @@
- if @commits.present?
- .ui-box
- .title
+ .panel.panel-default
+ .panel-heading
%i.icon-list
Commits (#{@commits.count})
.commits
diff --git a/app/views/projects/merge_requests/show/_mr_box.html.haml b/app/views/projects/merge_requests/show/_mr_box.html.haml
index 435e916c6dc..f1aaba2010d 100644
--- a/app/views/projects/merge_requests/show/_mr_box.html.haml
+++ b/app/views/projects/merge_requests/show/_mr_box.html.haml
@@ -1,6 +1,6 @@
.issue-box{ class: issue_box_class(@merge_request) }
.state.clearfix
- %span.state-label.col-sm-2.col-xs-12
+ .state-label
- if @merge_request.merged?
Merged
- elsif @merge_request.closed?
@@ -8,7 +8,7 @@
- else
Open
- %span.creator.col-sm-9.col-xs-12
+ .creator
Created by #{link_to_member(@project, @merge_request.author)} #{time_ago_with_tooltip(@merge_request.created_at)}
%h4.title
diff --git a/app/views/projects/milestones/_form.html.haml b/app/views/projects/milestones/_form.html.haml
index 2233a8838c3..9f3e0c44b25 100644
--- a/app/views/projects/milestones/_form.html.haml
+++ b/app/views/projects/milestones/_form.html.haml
@@ -23,7 +23,7 @@
.col-sm-10
= f.text_area :description, maxlength: 2000, class: "form-control markdown-area", rows: 10
.hint
- .pull-left Milestones are parsed with #{link_to "GitLab Flavored Markdown", help_markdown_path, target: '_blank'}.
+ .pull-left Milestones are parsed with #{link_to "GitLab Flavored Markdown", help_page_path("markdown", "markdown"), target: '_blank'}.
.pull-left Attach images (JPG, PNG, GIF) by dragging & dropping, #{link_to "selecting them", '#', class: 'markdown-selector' } or pasting from the clipboard.
.clearfix
.error-alert
diff --git a/app/views/projects/milestones/_issues.html.haml b/app/views/projects/milestones/_issues.html.haml
index c277dcc5364..83eb327975b 100644
--- a/app/views/projects/milestones/_issues.html.haml
+++ b/app/views/projects/milestones/_issues.html.haml
@@ -1,5 +1,5 @@
-.ui-box
- .title= title
+.panel.panel-default
+ .panel-heading= title
%ul.well-list
- issues.each do |issue|
%li
diff --git a/app/views/projects/milestones/index.html.haml b/app/views/projects/milestones/index.html.haml
index 3537650ad43..15635b299f4 100644
--- a/app/views/projects/milestones/index.html.haml
+++ b/app/views/projects/milestones/index.html.haml
@@ -20,7 +20,7 @@
= link_to project_milestones_path(@project, f: "all") do
All
.col-md-9
- .ui-box
+ .panel.panel-default
%ul.well-list
= render @milestones
diff --git a/app/views/projects/milestones/show.html.haml b/app/views/projects/milestones/show.html.haml
index 0fe5ac25b5e..d355f258827 100644
--- a/app/views/projects/milestones/show.html.haml
+++ b/app/views/projects/milestones/show.html.haml
@@ -22,14 +22,14 @@
.issue-box{ class: issue_box_class(@milestone) }
.state.clearfix
- .state-label.col-sm-2.col-xs-12
+ .state-label
- if @milestone.closed?
Closed
- elsif @milestone.expired?
Expired
- else
Open
- %span.creator.col-sm-9.col-xs-12
+ .creator
= @milestone.expires_at
%h4.title
@@ -84,14 +84,14 @@
.tab-pane#tab-merge-requests
.row
.col-md-6
- .ui-box
- .title Open
+ .panel.panel-default
+ .panel-heading Open
%ul.well-list
- @merge_requests.opened.each do |merge_request|
= render 'merge_request', merge_request: merge_request
.col-md-6
- .ui-box
- .title Closed
+ .panel.panel-default
+ .panel-heading Closed
%ul.well-list
- @merge_requests.closed.each do |merge_request|
= render 'merge_request', merge_request: merge_request
diff --git a/app/views/projects/notes/_form.html.haml b/app/views/projects/notes/_form.html.haml
index 25ebaca9305..f6a21f79952 100644
--- a/app/views/projects/notes/_form.html.haml
+++ b/app/views/projects/notes/_form.html.haml
@@ -17,7 +17,7 @@
= f.text_area :note, size: 255, class: 'note_text js-note-text js-gfm-input markdown-area'
.light.clearfix.hint
- .pull-left Comments are parsed with #{link_to "GitLab Flavored Markdown", help_markdown_path, target: '_blank'}.
+ .pull-left Comments are parsed with #{link_to "GitLab Flavored Markdown", help_page_path("markdown", "markdown"), target: '_blank'}
.pull-right Attach images (JPG, PNG, GIF) by dragging & dropping, #{link_to "selecting them", '#', class: 'markdown-selector' } or pasting from the clipboard.
.error-alert
.note-preview-holder.hide
diff --git a/app/views/projects/protected_branches/index.html.haml b/app/views/projects/protected_branches/index.html.haml
index e51bf1d3a8c..a51a4cc224a 100644
--- a/app/views/projects/protected_branches/index.html.haml
+++ b/app/views/projects/protected_branches/index.html.haml
@@ -5,10 +5,10 @@
.bs-callout.bs-callout-info
%p Protected branches designed to
%ul
- %li prevent push for all except #{link_to "masters", help_permissions_path, class: "vlink"}.
+ %li prevent push for all except #{link_to "masters", help_page_path("permissions", "permissions"), class: "vlink"}.
%li prevent branch from force push
%li prevent branch from removal
- %p Read more about project permissions #{link_to "here", help_permissions_path, class: "underlined-link"}
+ %p Read more about project permissions #{link_to "here", help_page_path("permissions", "permissions"), class: "underlined-link"}
- if can? current_user, :admin_project, @project
= form_for [@project, @protected_branch], html: { class: 'form-horizontal' } do |f|
diff --git a/app/views/projects/tags/_tag.html.haml b/app/views/projects/tags/_tag.html.haml
index 6629e47ad38..67d771c9707 100644
--- a/app/views/projects/tags/_tag.html.haml
+++ b/app/views/projects/tags/_tag.html.haml
@@ -17,6 +17,6 @@
- if can? current_user, :download_code, @project
= render 'projects/repositories/download_archive', ref: tag.name, btn_class: 'btn-grouped btn-group-small'
- if can?(current_user, :admin_project, @project)
- = link_to project_tag_path(@project, tag.name), class: 'btn btn-small remove-row grouped', method: :delete, data: { confirm: 'Removed tag cannot be restored. Are you sure?'}, remote: true do
+ = link_to project_tag_path(@project, tag.name), class: 'btn btn-small btn-remove remove-row grouped', method: :delete, data: { confirm: 'Removed tag cannot be restored. Are you sure?'}, remote: true do
%i.icon-trash
diff --git a/app/views/projects/team_members/_group_members.html.haml b/app/views/projects/team_members/_group_members.html.haml
index eceec6627b9..83c4b6f87d5 100644
--- a/app/views/projects/team_members/_group_members.html.haml
+++ b/app/views/projects/team_members/_group_members.html.haml
@@ -1,6 +1,6 @@
- group_users_count = @group.users_groups.count
-.ui-box
- .title
+.panel.panel-default
+ .panel-heading
%strong #{@group.name}
group members (#{group_users_count})
.pull-right
diff --git a/app/views/projects/team_members/_team.html.haml b/app/views/projects/team_members/_team.html.haml
index 2daf6847665..0e5b8176132 100644
--- a/app/views/projects/team_members/_team.html.haml
+++ b/app/views/projects/team_members/_team.html.haml
@@ -1,7 +1,7 @@
.team-table
- can_admin_project = (can? current_user, :admin_project, @project)
- .ui-box
- .title
+ .panel.panel-default
+ .panel-heading
%strong #{@project.name}
project members (#{members.count})
%ul.well-list
diff --git a/app/views/projects/team_members/index.html.haml b/app/views/projects/team_members/index.html.haml
index 6eccaafe3de..ddb3b9d4a9d 100644
--- a/app/views/projects/team_members/index.html.haml
+++ b/app/views/projects/team_members/index.html.haml
@@ -10,7 +10,7 @@
%p.light
Read more about project permissions
- %strong= link_to "here", help_permissions_path, class: "vlink"
+ %strong= link_to "here", help_page_path("permissions", "permissions"), class: "vlink"
= render "team", members: @users_projects
- if @group
= render "group_members"
diff --git a/app/views/projects/wikis/_form.html.haml b/app/views/projects/wikis/_form.html.haml
index 303cec8e982..a0a56b84a10 100644
--- a/app/views/projects/wikis/_form.html.haml
+++ b/app/views/projects/wikis/_form.html.haml
@@ -24,9 +24,8 @@
.col-sm-10
= f.text_area :content, class: 'form-control js-gfm-input markdown-area', rows: 18
.col-sm-12.hint
- .pull-left Wiki content is parsed with #{link_to "GitLab Flavored Markdown", help_markdown_path, target: '_blank'}.
+ .pull-left Wiki content is parsed with #{link_to "GitLab Flavored Markdown", help_page_path("markdown", "markdown"), target: '_blank'}
.pull-right Attach images (JPG, PNG, GIF) by dragging & dropping, #{link_to "selecting them", '#', class: 'markdown-selector' } or pasting from the clipboard.
-
.clearfix
.error-alert
.form-group
diff --git a/app/views/shared/_issues.html.haml b/app/views/shared/_issues.html.haml
index 087b6632e8d..e976f897dc9 100644
--- a/app/views/shared/_issues.html.haml
+++ b/app/views/shared/_issues.html.haml
@@ -1,8 +1,8 @@
- if @issues.any?
- @issues.group_by(&:project).each do |group|
- .ui-box.ui-box-small
+ .panel.panel-default.panel-small
- project = group[0]
- .title
+ .panel-heading
= link_to_project project
= link_to 'show all', project_issues_path(project), class: 'pull-right'
diff --git a/app/views/shared/_merge_requests.html.haml b/app/views/shared/_merge_requests.html.haml
index f40b7be4864..39a1ee38f8e 100644
--- a/app/views/shared/_merge_requests.html.haml
+++ b/app/views/shared/_merge_requests.html.haml
@@ -1,8 +1,8 @@
- if @merge_requests.any?
- @merge_requests.group_by(&:target_project).each do |group|
- .ui-box.ui-box-small
+ .panel.panel-default.panel-small
- project = group[0]
- .title
+ .panel-heading
= link_to_project project
= link_to 'show all', project_merge_requests_path(project), class: 'pull-right'
%ul.well-list.mr-list
diff --git a/app/views/users/_profile.html.haml b/app/views/users/_profile.html.haml
index 7ffd43e837d..3b44959baad 100644
--- a/app/views/users/_profile.html.haml
+++ b/app/views/users/_profile.html.haml
@@ -1,5 +1,5 @@
-.ui-box
- .title
+.panel.panel-default
+ .panel-heading
Profile
%ul.well-list
%li
diff --git a/app/views/users/_projects.html.haml b/app/views/users/_projects.html.haml
index a61c6ba5b86..2d97c4545b9 100644
--- a/app/views/users/_projects.html.haml
+++ b/app/views/users/_projects.html.haml
@@ -1,5 +1,5 @@
-.ui-box
- .title Projects
+.panel.panel-default
+ .panel-heading Projects
%ul.well-list
- @projects.each do |project|
%li
diff --git a/config/routes.rb b/config/routes.rb
index ada9bb1d77a..7c2ab6bd1dd 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -31,19 +31,10 @@ Gitlab::Application.routes.draw do
#
# Help
#
- get 'help' => 'help#index'
- get 'help/api' => 'help#api'
- get 'help/api/:category' => 'help#api', as: 'help_api_file'
- get 'help/markdown' => 'help#markdown'
- get 'help/permissions' => 'help#permissions'
- get 'help/public_access' => 'help#public_access'
- get 'help/raketasks' => 'help#raketasks'
- get 'help/ssh' => 'help#ssh'
- get 'help/system_hooks' => 'help#system_hooks'
- get 'help/web_hooks' => 'help#web_hooks'
- get 'help/workflow' => 'help#workflow'
+
+ get 'help' => 'help#index'
+ get 'help/:category/:file' => 'help#show', as: :help_page
get 'help/shortcuts'
- get 'help/security'
#
# Global snippets
@@ -155,6 +146,7 @@ Gitlab::Application.routes.draw do
get :issues
get :merge_requests
get :members
+ get :projects
end
resources :users_groups, only: [:create, :update, :destroy]
diff --git a/doc/api/repositories.md b/doc/api/repositories.md
index ecb0fa3f6a0..26ae3e87232 100644
--- a/doc/api/repositories.md
+++ b/doc/api/repositories.md
@@ -37,6 +37,40 @@ Parameters:
]
```
+## Create a new tag
+
+Creates new tag in the repository that points to the supplied ref.
+
+```
+POST /projects/:id/repository/tags
+```
+
+Parameters:
+
++ `id` (required) - The ID of a project
++ `tag_name` (required) - The name of a tag
++ `ref` (required) - Create tag using commit sha, another tag name, or branch name.
+
+```json
+[
+ {
+ "name": "v1.0.0",
+ "commit": {
+ "id": "2695effb5807a22ff3d138d593fd856244e155e7",
+ "parents": [],
+ "message": "Initial commit",
+ "authored_date": "2012-05-28T04:42:42-07:00",
+ "author_name": "John Smith",
+ "author email": "john@example.com",
+ "committer_name": "Jack Smith",
+ "committed_date": "2012-05-28T04:42:42-07:00",
+ "committer_email": "jack@example.com"
+ },
+ "protected": false
+ }
+]
+```
+
## List repository tree
Get a list of repository files and directories in a project.
diff --git a/doc/install/installation.md b/doc/install/installation.md
index 00eab62c070..0dc28d8da82 100644
--- a/doc/install/installation.md
+++ b/doc/install/installation.md
@@ -181,7 +181,7 @@ You can change `6-9-stable` to `master` if you want the *bleeding edge* version,
# Create directory for satellites
sudo -u git -H mkdir /home/git/gitlab-satellites
- sudo chmod u+rwx,g+rx,o-rwx /home/git/gitlab-satellites
+ sudo chmod u+rwx,g=rx,o-rwx /home/git/gitlab-satellites
# Make sure GitLab can write to the tmp/pids/ and tmp/sockets/ directories
sudo chmod -R u+rwX tmp/pids/
@@ -254,7 +254,7 @@ GitLab Shell is an ssh access and repository management software developed speci
cd /home/git/gitlab
# Run the installation task for gitlab-shell (replace `REDIS_URL` if needed):
- sudo -u git -H bundle exec rake gitlab:shell:install[v1.9.4] REDIS_URL=redis://localhost:6379 RAILS_ENV=production
+ sudo -u git -H bundle exec rake gitlab:shell:install[v1.9.5] REDIS_URL=redis://localhost:6379 RAILS_ENV=production
# By default, the gitlab-shell config is generated from your main gitlab config. You can review (and modify) it as follows:
sudo -u git -H editor /home/git/gitlab-shell/config.yml
diff --git a/doc/install/requirements.md b/doc/install/requirements.md
index 3b8335e2725..f8d2a423c08 100644
--- a/doc/install/requirements.md
+++ b/doc/install/requirements.md
@@ -49,9 +49,9 @@ We love [JRuby](http://jruby.org/) and [Rubinius](http://rubini.us/)) but GitLab
- **2 cores** is the **recommended** number of cores and supports up to 500 users
- 4 cores supports up to 2,000 users
- 8 cores supports up to 5,000 users
-- 16 cores supports up to 10,0000 users
-- 32 cores supports up to 20,0000 users
-- 64 cores supports up to 40,0000 users
+- 16 cores supports up to 10,000 users
+- 32 cores supports up to 20,000 users
+- 64 cores supports up to 40,000 users
## Memory
diff --git a/doc/permissions/permissions.md b/doc/permissions/permissions.md
index 95b47a86129..40d748c057e 100644
--- a/doc/permissions/permissions.md
+++ b/doc/permissions/permissions.md
@@ -27,6 +27,7 @@ If a user is a GitLab administrator they receive all permissions.
|Add new team members| |||✓|✓|
|Push to protected branches| |||✓|✓|
|Enable/Disable branch protection| |||✓|✓|
+|Rewrite/remove git tags| |||✓|✓|
|Edit project| |||✓|✓|
|Add Deploy Keys to project| |||✓|✓|
|Configure Project Hooks| |||✓|✓|
diff --git a/doc/update/6.6-to-6.7.md b/doc/update/6.6-to-6.7.md
index 61a63057d08..3093923007a 100644
--- a/doc/update/6.6-to-6.7.md
+++ b/doc/update/6.6-to-6.7.md
@@ -69,7 +69,7 @@ sudo -u git -H gzip /home/git/gitlab/log/*.log.1
sudo -u git -H gzip /home/git/gitlab-shell/gitlab-shell.log.1
# Close access to gitlab-satellites for others
-sudo chmod u+rwx,g+rx,o-rwx /home/git/gitlab-satellites
+sudo chmod u+rwx,g=rx,o-rwx /home/git/gitlab-satellites
```
diff --git a/doc/update/6.7-to-6.8.md b/doc/update/6.7-to-6.8.md
index cb19d235819..1afcb9f9c69 100644
--- a/doc/update/6.7-to-6.8.md
+++ b/doc/update/6.7-to-6.8.md
@@ -65,7 +65,7 @@ sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab
sudo chmod +x /etc/init.d/gitlab
# Close access to gitlab-satellites for others
-sudo chmod u+rwx,g+rx,o-rwx /home/git/gitlab-satellites
+sudo chmod u+rwx,g=rx,o-rwx /home/git/gitlab-satellites
```
### 5. Update config files
diff --git a/doc/update/mysql_to_postgresql.md b/doc/update/mysql_to_postgresql.md
index acd1e33f599..5083bef1e26 100644
--- a/doc/update/mysql_to_postgresql.md
+++ b/doc/update/mysql_to_postgresql.md
@@ -34,21 +34,48 @@ The lanyrd database converter script does not preserve all indexes, so we have
to recreate them ourselves after migrating from MySQL. It is not necessary to
shut down GitLab for this process.
+
+### For non-omnibus installations
+
+On non-omnibus installations (distributed using Git) we retrieve the index
+declarations from version control using `git stash`.
+
```
# Clone the database converter on your Postgres-backed GitLab server
cd /tmp
git clone https://github.com/gitlabhq/mysql-postgresql-converter.git
-# Stash changes to db/schema.rb to make sure we can find the right index statements
cd /home/git/gitlab
+
+# Stash changes to db/schema.rb to make sure we can find the right index statements
sudo -u git -H git stash
-# Generate the `CREATE INDEX CONCURRENTLY` statements based on schema.rb
-cd /tmp/mysql-to-postgresql-converter
-ruby index_create_statements.rb /home/git/gitlab/db/schema.rb > index_create_statements.psql
+# Generate add_index.rb
+ruby /tmp/mysql-postgresql-converter/add_index_statements.rb db/schema.rb > /tmp/mysql-postgresql-converter/add_index.rb
+
+# Create the indexes
+sudo -u git -H bundle exec rails runner -e production 'eval $stdin.read' < /tmp/mysql-postgresql-converter/add_index.rb
+```
+
+### For omnibus-gitlab installations
+
+On omnibus-gitlab we need to get the index declarations from a file called
+`schema.rb.bundled`. For versions older than 6.9, we need to download the file.
+
+```
+# Clone the database converter on your Postgres-backed GitLab server
+cd /tmp
+/opt/gitlab/embedded/bin/git clone https://github.com/gitlabhq/mysql-postgresql-converter.git
+cd /tmp/mysql-postgresql-converter
+
+# Download schema.rb.bundled if necessary
+test -e /opt/gitlab/embedded/service/gitlab-rails/db/schema.rb.bundled || sudo /opt/gitlab/embedded/bin/curl -o /opt/gitlab/embedded/service/gitlab-rails/db/schema.rb.bundled https://gitlab.com/gitlab-org/gitlab-ce/raw/v6.9.1/db/schema.rb
+
+# Generate add_index.rb
+/opt/gitlab/embedded/bin/ruby add_index_statements.rb /opt/gitlab/embedded/service/gitlab-rails/db/schema.rb.bundled > add_index.rb
-# Execute the SQL statements against the GitLab database
-sudo -u git psql -f index_create_statements.psql -d gitlabhq_production
+# Create the indexes
+/opt/gitlab/bin/gitlab-rails runner 'eval $stdin.read' < add_index.rb
```
## Converting a GitLab backup file from MySQL to Postgres
diff --git a/doc/update/upgrader.md b/doc/update/upgrader.md
index b3947fa2deb..19faca4ec4e 100644
--- a/doc/update/upgrader.md
+++ b/doc/update/upgrader.md
@@ -18,11 +18,12 @@ __GitLab Upgrader is available only for GitLab version 6.4.2 or higher__
### 2. Run gitlab upgrade tool
+ # Starting with GitLab version 7.0 upgrader script has been moved to bin directory
cd /home/git/gitlab
- sudo -u git -H ruby bin/upgrade.rb
+ if [ -f bin/upgrade.rb ]; then sudo -u git -H ruby bin/upgrade.rb; else sudo -u git -H ruby script/upgrade.rb; fi
# to perform a non-interactive install (no user input required) you can add -y
- # sudo -u git -H ruby bin/upgrade.rb -y
+ # if [ -f bin/upgrade.rb ]; then sudo -u git -H ruby bin/upgrade.rb -y; else sudo -u git -H ruby script/upgrade.rb -y; fi
### 3. Start application
@@ -55,6 +56,8 @@ Here is a one line command with step 1 to 4 for the next time you upgrade:
```bash
cd /home/git/gitlab; sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production; \
- sudo service gitlab stop; sudo -u git -H ruby bin/upgrade.rb -y; sudo service gitlab start; \
+ sudo service gitlab stop; \
+ if [ -f bin/upgrade.rb ]; then sudo -u git -H ruby bin/upgrade.rb -y; else sudo -u git -H ruby script/upgrade.rb -y; fi; \
+ sudo service gitlab start; \
sudo service nginx restart; sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production
```
diff --git a/doc/workflow/README.md b/doc/workflow/README.md
index efc28d06e71..39b3059e077 100644
--- a/doc/workflow/README.md
+++ b/doc/workflow/README.md
@@ -1,2 +1,2 @@
-+ [Workflow](workflow/workflow.md)
-+ [Project Features](workflow/project_features.md)
++ [Workflow](workflow.md)
++ [Project Features](project_features.md)
diff --git a/features/steps/group/group.rb b/features/steps/group/group.rb
index 5e0c71581f1..f321428592f 100644
--- a/features/steps/group/group.rb
+++ b/features/steps/group/group.rb
@@ -38,22 +38,22 @@ class Groups < Spinach::FeatureSteps
end
Then 'I should see user "John Doe" in team list' do
- projects_with_access = find(".ui-box .well-list")
+ projects_with_access = find(".panel .well-list")
projects_with_access.should have_content("John Doe")
end
Then 'I should not see user "John Doe" in team list' do
- projects_with_access = find(".ui-box .well-list")
+ projects_with_access = find(".panel .well-list")
projects_with_access.should_not have_content("John Doe")
end
Then 'I should see user "Mary Jane" in team list' do
- projects_with_access = find(".ui-box .well-list")
+ projects_with_access = find(".panel .well-list")
projects_with_access.should have_content("Mary Jane")
end
Then 'I should not see user "Mary Jane" in team list' do
- projects_with_access = find(".ui-box .well-list")
+ projects_with_access = find(".panel .well-list")
projects_with_access.should_not have_content("Mary Jane")
end
diff --git a/features/steps/help.rb b/features/steps/help.rb
index 5ea2c5daeeb..bfb3a38a29f 100644
--- a/features/steps/help.rb
+++ b/features/steps/help.rb
@@ -8,14 +8,14 @@ class Spinach::Features::Help < Spinach::FeatureSteps
end
step 'I visit the "Rake Tasks" help page' do
- visit help_raketasks_path
+ visit help_page_path("raketasks", "maintenance")
end
step 'I should see "Rake Tasks" page markdown rendered' do
- page.should have_content "GitLab provides some specific rake tasks to enable special features or perform maintenance tasks"
+ page.should have_content "Gather information about GitLab and the system it runs on"
end
step 'Header "Rebuild project satellites" should have correct ids and links' do
- header_should_have_correct_id_and_link(3, '(Re-)Create satellite repos', 're-create-satellite-repos')
+ header_should_have_correct_id_and_link(3, '(Re-)Create satellite repos', 're-create-satellite-repos', '.documentation')
end
end
diff --git a/lib/api/repositories.rb b/lib/api/repositories.rb
index a587d4a7bdf..03806d9343b 100644
--- a/lib/api/repositories.rb
+++ b/lib/api/repositories.rb
@@ -26,6 +26,22 @@ module API
present user_project.repo.tags.sort_by(&:name).reverse, with: Entities::RepoObject, project: user_project
end
+ # Create tag
+ #
+ # Parameters:
+ # id (required) - The ID of a project
+ # tag_name (required) - The name of the tag
+ # ref (required) - Create tag from commit sha or branch
+ # Example Request:
+ # POST /projects/:id/repository/tags
+ post ':id/repository/tags' do
+ authorize_push_project
+ @tag = CreateTagService.new.execute(user_project, params[:tag_name],
+ params[:ref], current_user)
+
+ present @tag, with: Entities::RepoObject, project: user_project
+ end
+
# Get a project repository tree
#
# Parameters:
diff --git a/lib/gitlab/git_access.rb b/lib/gitlab/git_access.rb
index 2f8b55aaca0..38b3d82e2f4 100644
--- a/lib/gitlab/git_access.rb
+++ b/lib/gitlab/git_access.rb
@@ -53,6 +53,9 @@ module Gitlab
else
:push_code_to_protected_branches
end
+ elsif project.repository && project.repository.tag_names.include?(ref)
+ # Prevent any changes to existing git tag unless user has permissions
+ :admin_project
else
:push_code
end
diff --git a/lib/support/init.d/gitlab b/lib/support/init.d/gitlab
index 5c1ce2dadab..b066a1a6935 100755
--- a/lib/support/init.d/gitlab
+++ b/lib/support/init.d/gitlab
@@ -12,6 +12,7 @@
# Default-Stop: 0 1 6
# Short-Description: GitLab git repository management
# Description: GitLab git repository management
+# chkconfig: - 85 14
### END INIT INFO
diff --git a/lib/tasks/gitlab/check.rake b/lib/tasks/gitlab/check.rake
index ad5e04ecab9..362693b0603 100644
--- a/lib/tasks/gitlab/check.rake
+++ b/lib/tasks/gitlab/check.rake
@@ -458,7 +458,7 @@ namespace :gitlab do
else
puts "no".red
try_fixing_it(
- "sudo chmod u+rwx,g+rx,o-rwx #{satellites_path}",
+ "sudo chmod u+rwx,g=rx,o-rwx #{satellites_path}",
)
for_more_information(
see_installation_guide_section "GitLab"
@@ -779,7 +779,7 @@ namespace :gitlab do
end
def check_gitlab_shell
- required_version = Gitlab::VersionInfo.new(1, 9, 4)
+ required_version = Gitlab::VersionInfo.new(1, 9, 5)
current_version = Gitlab::VersionInfo.parse(gitlab_shell_version)
print "GitLab Shell version >= #{required_version} ? ... "
diff --git a/spec/features/security/group/group_access_spec.rb b/spec/features/security/group/group_access_spec.rb
index b65e1d2dbf6..44de499e6d2 100644
--- a/spec/features/security/group/group_access_spec.rb
+++ b/spec/features/security/group/group_access_spec.rb
@@ -82,5 +82,17 @@ describe "Group access", feature: true do
it { should be_denied_for :user }
it { should be_denied_for :visitor }
end
+
+ describe "GET /groups/:path/projects" do
+ subject { projects_group_path(group) }
+
+ it { should be_allowed_for owner }
+ it { should be_denied_for master }
+ it { should be_denied_for reporter }
+ it { should be_allowed_for :admin }
+ it { should be_denied_for guest }
+ it { should be_denied_for :user }
+ it { should be_denied_for :visitor }
+ end
end
end
diff --git a/spec/requests/api/repositories_spec.rb b/spec/requests/api/repositories_spec.rb
index a902a1542cc..5afb3bddcb7 100644
--- a/spec/requests/api/repositories_spec.rb
+++ b/spec/requests/api/repositories_spec.rb
@@ -23,6 +23,24 @@ describe API::API, api: true do
end
end
+ describe 'POST /projects/:id/repository/tags' do
+ it 'should create a new tag' do
+ post api("/projects/#{project.id}/repository/tags", user),
+ tag_name: 'v1.0.0',
+ ref: 'master'
+
+ response.status.should == 201
+ json_response['name'].should == 'v1.0.0'
+ end
+ it 'should deny for user without push access' do
+ post api("/projects/#{project.id}/repository/tags", user2),
+ tag_name: 'v1.0.0',
+ ref: '621491c677087aa243f165eab467bfdfbee00be1'
+
+ response.status.should == 403
+ end
+ end
+
describe "GET /projects/:id/repository/tree" do
context "authorized user" do
before { project.team << [user2, :reporter] }
diff --git a/spec/routing/routing_spec.rb b/spec/routing/routing_spec.rb
index a2d2a35140c..7bfd5d0b998 100644
--- a/spec/routing/routing_spec.rb
+++ b/spec/routing/routing_spec.rb
@@ -79,35 +79,35 @@ describe HelpController, "routing" do
end
it "to #permissions" do
- get("/help/permissions").should route_to('help#permissions')
+ get("/help/permissions/permissions").should route_to('help#show', category: "permissions", file: "permissions")
end
it "to #workflow" do
- get("/help/workflow").should route_to('help#workflow')
+ get("/help/workflow/README").should route_to('help#show', category: "workflow", file: "README")
end
it "to #api" do
- get("/help/api").should route_to('help#api')
+ get("/help/api/README").should route_to('help#show', category: "api", file: "README")
end
it "to #web_hooks" do
- get("/help/web_hooks").should route_to('help#web_hooks')
+ get("/help/web_hooks/web_hooks").should route_to('help#show', category: "web_hooks", file: "web_hooks")
end
it "to #system_hooks" do
- get("/help/system_hooks").should route_to('help#system_hooks')
+ get("/help/system_hooks/system_hooks").should route_to('help#show', category: "system_hooks", file: "system_hooks")
end
it "to #markdown" do
- get("/help/markdown").should route_to('help#markdown')
+ get("/help/markdown/markdown").should route_to('help#show',category: "markdown", file: "markdown")
end
it "to #ssh" do
- get("/help/ssh").should route_to('help#ssh')
+ get("/help/ssh/README").should route_to('help#show', category: "ssh", file: "README")
end
it "to #raketasks" do
- get("/help/raketasks").should route_to('help#raketasks')
+ get("/help/raketasks/README").should route_to('help#show', category: "raketasks", file: "README")
end
end