Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
2122d7b9
Commit
2122d7b9
authored
Sep 18, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into ci-build-list
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parents
e8666898
1eb3dde4
Changes
87
Show whitespace changes
Inline
Side-by-side
Showing
87 changed files
with
227 additions
and
171 deletions
+227
-171
CHANGELOG
CHANGELOG
+1
-0
Gemfile.lock
Gemfile.lock
+0
-3
app/controllers/admin/application_settings_controller.rb
app/controllers/admin/application_settings_controller.rb
+1
-0
app/controllers/ci/application_controller.rb
app/controllers/ci/application_controller.rb
+1
-3
app/controllers/ci/projects_controller.rb
app/controllers/ci/projects_controller.rb
+9
-15
app/finders/trending_projects_finder.rb
app/finders/trending_projects_finder.rb
+4
-13
app/helpers/groups_helper.rb
app/helpers/groups_helper.rb
+5
-5
app/helpers/projects_helper.rb
app/helpers/projects_helper.rb
+0
-35
app/views/admin/application_settings/_form.html.haml
app/views/admin/application_settings/_form.html.haml
+5
-0
app/views/ci/projects/_form.html.haml
app/views/ci/projects/_form.html.haml
+0
-1
app/views/ci/projects/_gl_projects.html.haml
app/views/ci/projects/_gl_projects.html.haml
+0
-15
app/views/ci/projects/_project.html.haml
app/views/ci/projects/_project.html.haml
+38
-22
app/views/ci/projects/_search.html.haml
app/views/ci/projects/_search.html.haml
+1
-7
app/views/ci/projects/gitlab.html.haml
app/views/ci/projects/gitlab.html.haml
+0
-27
app/views/ci/projects/index.html.haml
app/views/ci/projects/index.html.haml
+25
-8
app/views/groups/milestones/_header_title.html.haml
app/views/groups/milestones/_header_title.html.haml
+1
-0
app/views/groups/milestones/show.html.haml
app/views/groups/milestones/show.html.haml
+2
-0
app/views/help/index.html.haml
app/views/help/index.html.haml
+3
-0
app/views/layouts/ci/_nav_admin.html.haml
app/views/layouts/ci/_nav_admin.html.haml
+2
-2
app/views/layouts/dashboard.html.haml
app/views/layouts/dashboard.html.haml
+1
-2
app/views/layouts/group.html.haml
app/views/layouts/group.html.haml
+2
-3
app/views/layouts/group_settings.html.haml
app/views/layouts/group_settings.html.haml
+1
-0
app/views/layouts/nav/_dashboard.html.haml
app/views/layouts/nav/_dashboard.html.haml
+2
-0
app/views/layouts/profile.html.haml
app/views/layouts/profile.html.haml
+1
-2
app/views/layouts/project.html.haml
app/views/layouts/project.html.haml
+2
-2
app/views/layouts/project_settings.html.haml
app/views/layouts/project_settings.html.haml
+1
-0
app/views/projects/activity.html.haml
app/views/projects/activity.html.haml
+2
-0
app/views/projects/blame/show.html.haml
app/views/projects/blame/show.html.haml
+2
-0
app/views/projects/blob/_header_title.html.haml
app/views/projects/blob/_header_title.html.haml
+1
-0
app/views/projects/blob/edit.html.haml
app/views/projects/blob/edit.html.haml
+2
-0
app/views/projects/blob/new.html.haml
app/views/projects/blob/new.html.haml
+3
-0
app/views/projects/blob/show.html.haml
app/views/projects/blob/show.html.haml
+1
-0
app/views/projects/branches/index.html.haml
app/views/projects/branches/index.html.haml
+1
-0
app/views/projects/branches/new.html.haml
app/views/projects/branches/new.html.haml
+2
-0
app/views/projects/commit/show.html.haml
app/views/projects/commit/show.html.haml
+1
-0
app/views/projects/commits/_header_title.html.haml
app/views/projects/commits/_header_title.html.haml
+1
-0
app/views/projects/commits/show.html.haml
app/views/projects/commits/show.html.haml
+1
-0
app/views/projects/compare/index.html.haml
app/views/projects/compare/index.html.haml
+1
-0
app/views/projects/compare/show.html.haml
app/views/projects/compare/show.html.haml
+1
-0
app/views/projects/graphs/_header_title.html.haml
app/views/projects/graphs/_header_title.html.haml
+1
-0
app/views/projects/graphs/commits.html.haml
app/views/projects/graphs/commits.html.haml
+2
-1
app/views/projects/graphs/show.html.haml
app/views/projects/graphs/show.html.haml
+2
-1
app/views/projects/issues/_header_title.html.haml
app/views/projects/issues/_header_title.html.haml
+1
-0
app/views/projects/issues/index.html.haml
app/views/projects/issues/index.html.haml
+2
-0
app/views/projects/issues/new.html.haml
app/views/projects/issues/new.html.haml
+2
-0
app/views/projects/issues/show.html.haml
app/views/projects/issues/show.html.haml
+2
-0
app/views/projects/labels/_header_title.html.haml
app/views/projects/labels/_header_title.html.haml
+1
-0
app/views/projects/labels/edit.html.haml
app/views/projects/labels/edit.html.haml
+2
-0
app/views/projects/labels/index.html.haml
app/views/projects/labels/index.html.haml
+1
-0
app/views/projects/labels/new.html.haml
app/views/projects/labels/new.html.haml
+2
-0
app/views/projects/merge_requests/_header_title.html.haml
app/views/projects/merge_requests/_header_title.html.haml
+1
-0
app/views/projects/merge_requests/_show.html.haml
app/views/projects/merge_requests/_show.html.haml
+2
-0
app/views/projects/merge_requests/edit.html.haml
app/views/projects/merge_requests/edit.html.haml
+2
-0
app/views/projects/merge_requests/index.html.haml
app/views/projects/merge_requests/index.html.haml
+2
-0
app/views/projects/merge_requests/invalid.html.haml
app/views/projects/merge_requests/invalid.html.haml
+2
-0
app/views/projects/merge_requests/new.html.haml
app/views/projects/merge_requests/new.html.haml
+2
-0
app/views/projects/milestones/_header_title.html.haml
app/views/projects/milestones/_header_title.html.haml
+1
-0
app/views/projects/milestones/edit.html.haml
app/views/projects/milestones/edit.html.haml
+1
-0
app/views/projects/milestones/index.html.haml
app/views/projects/milestones/index.html.haml
+1
-0
app/views/projects/milestones/new.html.haml
app/views/projects/milestones/new.html.haml
+1
-0
app/views/projects/milestones/show.html.haml
app/views/projects/milestones/show.html.haml
+2
-0
app/views/projects/network/show.html.haml
app/views/projects/network/show.html.haml
+1
-0
app/views/projects/project_members/_header_title.html.haml
app/views/projects/project_members/_header_title.html.haml
+1
-0
app/views/projects/project_members/import.html.haml
app/views/projects/project_members/import.html.haml
+2
-0
app/views/projects/project_members/index.html.haml
app/views/projects/project_members/index.html.haml
+1
-0
app/views/projects/snippets/_header_title.html.haml
app/views/projects/snippets/_header_title.html.haml
+1
-0
app/views/projects/snippets/edit.html.haml
app/views/projects/snippets/edit.html.haml
+2
-0
app/views/projects/snippets/index.html.haml
app/views/projects/snippets/index.html.haml
+2
-0
app/views/projects/snippets/new.html.haml
app/views/projects/snippets/new.html.haml
+2
-0
app/views/projects/snippets/show.html.haml
app/views/projects/snippets/show.html.haml
+2
-0
app/views/projects/tags/index.html.haml
app/views/projects/tags/index.html.haml
+1
-0
app/views/projects/tags/new.html.haml
app/views/projects/tags/new.html.haml
+2
-0
app/views/projects/tree/show.html.haml
app/views/projects/tree/show.html.haml
+1
-0
app/views/projects/wikis/_header_title.html.haml
app/views/projects/wikis/_header_title.html.haml
+1
-0
app/views/projects/wikis/edit.html.haml
app/views/projects/wikis/edit.html.haml
+2
-0
app/views/projects/wikis/empty.html.haml
app/views/projects/wikis/empty.html.haml
+2
-0
app/views/projects/wikis/git_access.html.haml
app/views/projects/wikis/git_access.html.haml
+2
-0
app/views/projects/wikis/history.html.haml
app/views/projects/wikis/history.html.haml
+3
-1
app/views/projects/wikis/pages.html.haml
app/views/projects/wikis/pages.html.haml
+2
-0
app/views/projects/wikis/show.html.haml
app/views/projects/wikis/show.html.haml
+3
-1
app/views/shared/projects/_list.html.haml
app/views/shared/projects/_list.html.haml
+1
-1
db/migrate/20150916114643_add_help_page_text_to_application_settings.rb
...50916114643_add_help_page_text_to_application_settings.rb
+5
-0
db/schema.rb
db/schema.rb
+1
-0
doc/ssh/README.md
doc/ssh/README.md
+2
-0
features/steps/admin/settings.rb
features/steps/admin/settings.rb
+1
-0
lib/ci/project_list_builder.rb
lib/ci/project_list_builder.rb
+21
-0
spec/controllers/ci/projects_controller_spec.rb
spec/controllers/ci/projects_controller_spec.rb
+1
-1
No files found.
CHANGELOG
View file @
2122d7b9
...
...
@@ -53,6 +53,7 @@ v 8.0.0 (unreleased)
- Add FogBugz project import (Jared Szechy)
- Sort users autocomplete lists by user (Allister Antosik)
- Webhook for issue now contains repository field (Jungkook Park)
- Add ability to add custom text to the help page (Jeroen van Baarsen)
v 7.14.3
- No changes
...
...
Gemfile.lock
View file @
2122d7b9
...
...
@@ -928,6 +928,3 @@ DEPENDENCIES
webmock (~> 1.21.0)
whenever (~> 0.8.4)
wikicloth (= 0.8.1)
BUNDLED WITH
1.10.6
app/controllers/admin/application_settings_controller.rb
View file @
2122d7b9
...
...
@@ -46,6 +46,7 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController
:gravatar_enabled
,
:twitter_sharing_enabled
,
:sign_in_text
,
:help_page_text
,
:home_page_url
,
:after_sign_out_path
,
:max_attachment_size
,
...
...
app/controllers/ci/application_controller.rb
View file @
2122d7b9
...
...
@@ -10,9 +10,7 @@ module Ci
def
authenticate_public_page!
unless
project
.
public
unless
current_user
redirect_to
(
new_user_sessions_path
)
and
return
end
authenticate_user!
return
access_denied!
unless
can?
(
current_user
,
:read_project
,
gl_project
)
end
...
...
app/controllers/ci/projects_controller.rb
View file @
2122d7b9
...
...
@@ -5,38 +5,32 @@ module Ci
before_action
:authenticate_user!
,
except:
[
:build
,
:badge
,
:index
,
:show
]
before_action
:authenticate_public_page!
,
only: :show
before_action
:project
,
only:
[
:build
,
:integration
,
:show
,
:badge
,
:edit
,
:update
,
:destroy
,
:toggle_shared_runners
,
:dumped_yaml
]
before_action
:authorize_access_project!
,
except:
[
:build
,
:
gitlab
,
:
badge
,
:index
,
:show
,
:new
,
:create
]
before_action
:authorize_access_project!
,
except:
[
:build
,
:badge
,
:index
,
:show
,
:new
,
:create
]
before_action
:authorize_manage_project!
,
only:
[
:edit
,
:integration
,
:update
,
:destroy
,
:toggle_shared_runners
,
:dumped_yaml
]
before_action
:authenticate_token!
,
only:
[
:build
]
before_action
:no_cache
,
only:
[
:badge
]
protect_from_forgery
except: :build
layout
'ci/project'
,
except:
[
:index
,
:gitlab
]
layout
'ci/project'
,
except:
:index
def
index
@projects
=
Ci
::
Project
.
ordered_by_last_commit_date
.
public_only
.
page
(
params
[
:page
])
unless
current_user
end
def
gitlab
@limit
,
@offset
=
(
params
[
:limit
]
||
PROJECTS_BATCH
).
to_i
,
(
params
[
:offset
]
||
0
).
to_i
@page
=
@offset
==
0
?
1
:
(
@offset
/
@limit
+
1
)
@gl_projects
=
current_user
.
authorized_projects
@gl_projects
=
@gl_projects
.
where
(
"name LIKE ?"
,
"%
#{
params
[
:search
]
}
%"
)
if
params
[
:search
]
@gl_projects
=
@gl_projects
.
page
(
@page
).
per
(
@limit
)
if
current_user
@projects
=
ProjectListBuilder
.
new
.
execute
(
current_user
,
params
[
:search
])
@projects
=
Ci
::
Project
.
where
(
gitlab_id:
@gl_projects
.
map
(
&
:id
)).
ordered_by_last_commit_date
@total_count
=
@gl_projects
.
size
@projects
=
@projects
.
page
(
@page
).
per
(
@limit
)
@gl_projects
=
@gl_projects
.
where
.
not
(
id:
@projects
.
map
(
&
:gitlab_id
))
@total_count
=
@projects
.
size
end
respond_to
do
|
format
|
format
.
json
do
pager_json
(
"ci/projects/
gitlab
"
,
@total_count
)
pager_json
(
"ci/projects/
index
"
,
@total_count
)
end
format
.
html
end
rescue
@error
=
'Failed to fetch GitLab projects'
end
def
show
...
...
app/finders/trending_projects_finder.rb
View file @
2122d7b9
...
...
@@ -2,21 +2,12 @@ class TrendingProjectsFinder
def
execute
(
current_user
,
start_date
=
nil
)
start_date
||=
Date
.
today
-
1
.
month
projects
=
projects_for
(
current_user
)
# Determine trending projects based on comments count
# for period of time - ex. month
trending_project_ids
=
Note
.
select
(
"notes.project_id, count(notes.project_id) as pcount"
).
where
(
'notes.created_at > ?'
,
start_date
).
group
(
"project_id"
).
reorder
(
"pcount DESC"
).
map
(
&
:project_id
)
sql_order_ids
=
trending_project_ids
.
reverse
.
map
{
|
project_id
|
"id =
#{
project_id
}
"
}.
join
(
", "
)
# Get list of projects that user allowed to see
projects
=
projects_for
(
current_user
)
projects
.
where
(
id:
trending_project_ids
).
reorder
(
sql_order_ids
)
projects
.
joins
(
:notes
).
where
(
'notes.created_at > ?'
,
start_date
).
group
(
"projects.id"
).
reorder
(
"count(notes.id) DESC"
)
end
private
...
...
app/helpers/groups_helper.rb
View file @
2122d7b9
...
...
@@ -31,12 +31,12 @@ module GroupsHelper
end
end
def
group_title
(
group
,
name
,
url
)
def
group_title
(
group
,
name
=
nil
,
url
=
nil
)
full_title
=
link_to
(
simple_sanitize
(
group
.
name
),
group_path
(
group
))
full_title
+=
' · '
.
html_safe
+
link_to
(
simple_sanitize
(
name
),
url
)
if
name
content_tag
:span
do
link_to
(
simple_sanitize
(
group
.
name
),
group_path
(
group
)
)
+
' · '
.
html_safe
+
link_to
(
simple_sanitize
(
name
),
url
)
full_title
end
end
end
app/helpers/projects_helper.rb
View file @
2122d7b9
...
...
@@ -317,41 +317,6 @@ module ProjectsHelper
@ref
||
@repository
.
try
(
:root_ref
)
end
def
detect_project_title
(
project
)
name
,
url
=
if
current_controller?
'wikis'
[
'Wiki'
,
get_project_wiki_path
(
project
)]
elsif
current_controller?
'project_members'
[
'Members'
,
namespace_project_project_members_path
(
project
.
namespace
,
project
)]
elsif
current_controller?
'labels'
[
'Labels'
,
namespace_project_labels_path
(
project
.
namespace
,
project
)]
elsif
current_controller?
'members'
[
'Members'
,
project_files_path
(
project
)]
elsif
current_controller?
'commits'
[
'Commits'
,
project_commits_path
(
project
)]
elsif
current_controller?
'graphs'
[
'Graphs'
,
namespace_project_graph_path
(
project
.
namespace
,
project
,
current_ref
)]
elsif
current_controller?
'network'
[
'Network'
,
namespace_project_network_path
(
project
.
namespace
,
project
,
current_ref
)]
elsif
current_controller?
'milestones'
[
'Milestones'
,
namespace_project_milestones_path
(
project
.
namespace
,
project
)]
elsif
current_controller?
'snippets'
[
'Snippets'
,
namespace_project_snippets_path
(
project
.
namespace
,
project
)]
elsif
current_controller?
'issues'
[
'Issues'
,
namespace_project_issues_path
(
project
.
namespace
,
project
)]
elsif
current_controller?
'merge_requests'
[
'Merge Requests'
,
namespace_project_merge_requests_path
(
project
.
namespace
,
project
)]
elsif
current_controller?
'tree'
,
'blob'
[
'Files'
,
project_files_path
(
project
)]
elsif
current_path?
'projects#activity'
[
'Activity'
,
activity_project_path
(
project
)]
else
[
nil
,
nil
]
end
project_title
(
project
,
name
,
url
)
end
private
def
filename_path
(
project
,
filename
)
...
...
app/views/admin/application_settings/_form.html.haml
View file @
2122d7b9
...
...
@@ -118,6 +118,11 @@
.col-sm-10
=
f
.
text_area
:sign_in_text
,
class:
'form-control'
,
rows:
4
.help-block
Markdown enabled
.form-group
=
f
.
label
:help_page_text
,
class:
'control-label col-sm-2'
.col-sm-10
=
f
.
text_area
:help_page_text
,
class:
'form-control'
,
rows:
4
.help-block
Markdown enabled
.form-actions
=
f
.
submit
'Save'
,
class:
'btn btn-primary'
app/views/ci/projects/_form.html.haml
View file @
2122d7b9
...
...
@@ -96,6 +96,5 @@
.form-actions
=
f
.
submit
'Save changes'
,
class:
'btn btn-save'
=
link_to
'Cancel'
,
projects_path
,
class:
'btn'
-
unless
@project
.
new_record?
=
link_to
'Remove Project'
,
ci_project_path
(
@project
),
method: :delete
,
data:
{
confirm:
'Project will be removed. Are you sure?'
},
class:
'btn btn-danger pull-right'
app/views/ci/projects/_gl_projects.html.haml
deleted
100644 → 0
View file @
e8666898
-
@gl_projects
.
sort_by
(
&
:name_with_namespace
).
each
do
|
project
|
%tr
.light
%td
=
project
.
name_with_namespace
%td
%small
Not added to CI
%td
%td
-
if
Ci
::
Project
.
already_added?
(
project
)
%strong
.cgreen
Added
-
else
=
form_tag
ci_projects_path
do
=
hidden_field_tag
:project
,
project
.
to_json
(
methods:
[
:name_with_namespace
,
:path_with_namespace
,
:ssh_url_to_repo
])
=
submit_tag
'Add project to CI'
,
class:
'btn btn-default btn-sm'
app/views/ci/projects/_project.html.haml
View file @
2122d7b9
-
last_commit
=
project
.
last_commit
%tr
{
class:
commit_status_css_class
(
last_commit
)
}
-
if
project
.
gitlab_ci_project
-
ci_project
=
project
.
gitlab_ci_project
-
last_commit
=
ci_project
.
last_commit
%tr
{
class:
commit_status_css_class
(
last_commit
)
}
%td
=
link_to
[
:ci
,
project
]
do
=
project
.
name
=
link_to
[
:ci
,
ci_
project
]
do
=
ci_
project
.
name
%td
-
if
last_commit
#{
last_commit
.
status
}
(
#{
commit_link
(
last_commit
)
}
)
-
if
project
.
last_commit_date
=
time_ago_in_words
project
.
last_commit_date
%span
.ci-status
<
=
last_commit
.
status
=
commit_link
(
last_commit
)
&
middot
;
-
if
ci_project
.
last_commit_date
=
time_ago_in_words
ci_project
.
last_commit_date
ago
-
else
No
builds
yet
%td
-
if
project
.
public
-
if
ci_
project
.
public
%i
.fa.fa-globe
Public
-
else
%i
.fa.fa-lock
Private
%td
=
project
.
commits
.
count
=
ci_project
.
commits
.
count
-
else
%tr
.light
%td
=
project
.
name_with_namespace
%td
%small
Not
added
to
CI
%td
%td
=
form_tag
ci_projects_path
do
=
hidden_field_tag
:project
,
project
.
to_json
(
methods:
[
:name_with_namespace
,
:path_with_namespace
,
:ssh_url_to_repo
])
=
submit_tag
'Add project to CI'
,
class:
'btn btn-default btn-sm'
app/views/ci/projects/_search.html.haml
View file @
2122d7b9
...
...
@@ -5,13 +5,7 @@
.input-group-addon
%i
.fa.fa-search
:coffeescript
$('.ci-search-form').submit ->
NProgress.start()
query = $('.ci-search-form .search-input').val()
$.get '
#{
gitlab_ci_projects_path
}
', { search: query }, (data) ->
$(".projects").html data.html
NProgress.done()
CiPager.init "
#{
gitlab_ci_projects_path
}
" + "?search=" + query,
#{
Ci
::
ProjectsController
::
PROJECTS_BATCH
}
, false
CiPager.init "
#{
ci_projects_path
}
" + "?search=" + query,
#{
Ci
::
ProjectsController
::
PROJECTS_BATCH
}
, false
false
app/views/ci/projects/gitlab.html.haml
deleted
100644 → 0
View file @
e8666898
-
if
@offset
==
0
.gray-content-block.clearfix.light.second-block
.pull-left.fetch-status
-
if
params
[
:search
].
present?
by keyword: "
#{
params
[
:search
]
}
",
#{
@total_count
}
projects,
#{
@projects
.
size
}
of them added to CI
.wide-table-holder
%table
.table.projects-table.content-list
%thead
%tr
%th
Project Name
%th
Last commit
%th
Access
%th
Commits
=
render
@projects
=
render
"gl_projects"
%p
.text-center.hide.loading
%i
.fa.fa-refresh.fa-spin
-
else
=
render
@projects
=
render
"gl_projects"
app/views/ci/projects/index.html.haml
View file @
2122d7b9
-
if
current_user
-
if
@offset
>
0
=
render
@projects
-
else
.gray-content-block.top-block
=
render
"search"
.projects
%p
.fetch-status.light
.gray-content-block.clearfix.light.second-block
.pull-left.fetch-status
-
if
params
[
:search
].
present?
by keyword: "
#{
params
[
:search
]
}
",
#{
@total_count
}
projects
.wide-table-holder
%table
.table.projects-table.content-list
%thead
%tr
%th
Project Name
%th
Last commit
%th
Access
%th
Commits
=
render
@projects
%p
.text-center.hide.loading
%i
.fa.fa-refresh.fa-spin
:coffeescript
$.get '
#{
gitlab_ci_projects_path
}
', (data) ->
$(".projects").html data.html
CiPager.init "
#{
gitlab_ci_projects_path
}
",
#{
Ci
::
ProjectsController
::
PROJECTS_BATCH
}
, false
CiPager.init "
#{
ci_projects_path
}
",
#{
Ci
::
ProjectsController
::
PROJECTS_BATCH
}
, false
-
else
=
render
'public'
app/views/groups/milestones/_header_title.html.haml
0 → 100644
View file @
2122d7b9
-
header_title
group_title
(
@group
,
"Milestones"
,
group_milestones_path
(
@group
))
app/views/groups/milestones/show.html.haml
View file @
2122d7b9
-
page_title
@group_milestone
.
title
,
"Milestones"
=
render
"header_title"
%h4
.page-title
.issue-box
{
class:
"issue-box-#{@group_milestone.closed? ? 'closed' : 'open'}"
}
-
if
@group_milestone
.
closed?
...
...
app/views/help/index.html.haml
View file @
2122d7b9
...
...
@@ -17,6 +17,9 @@
Used by more than 100,000 organizations, GitLab is the most popular solution to manage git repositories on-premises.
%br
Read more about GitLab at
#{
link_to
promo_host
,
promo_url
,
target:
'_blank'
}
.
-
if
current_application_settings
.
help_page_text
.
present?
%hr
=
markdown
(
current_application_settings
.
help_page_text
)
%hr
...
...
app/views/layouts/ci/_nav_admin.html.haml
View file @
2122d7b9
%ul
.nav.nav-sidebar
=
nav_link
do
=
link_to
admin_root_path
,
title:
'Back to
dashboard
'
,
data:
{
placement:
'right'
},
class:
'back-link'
do
=
link_to
admin_root_path
,
title:
'Back to
admin
'
,
data:
{
placement:
'right'
},
class:
'back-link'
do
=
icon
(
'caret-square-o-left fw'
)
%span
Back to
A
dmin
Back to
a
dmin
%li
.separate-item
=
nav_link
path:
'projects#index'
do
...
...
app/views/layouts/dashboard.html.haml
View file @
2122d7b9
-
page_title
"Dashboard"
-
unless
@header_title
-
header_title
"Dashboard"
,
root_path
-
header_title
"Dashboard"
,
root_path
unless
header_title
-
sidebar
"dashboard"
=
render
template:
"layouts/application"
app/views/layouts/group.html.haml
View file @
2122d7b9
-
page_title
@group
.
name
-
unless
@header_title
-
header_title
@group
.
name
,
group_path
(
@group
)
-
header_title
group_title
(
@group
)
unless
header_title
-
sidebar
"group"
unless
sidebar
=
render
template:
"layouts/application"
app/views/layouts/group_settings.html.haml
View file @
2122d7b9
-
page_title
"Settings"
-
header_title
group_title
(
@group
,
"Settings"
,
edit_group_path
(
@group
))
-
sidebar
"group_settings"
=
render
template:
"layouts/group"
app/views/layouts/nav/_dashboard.html.haml
View file @
2122d7b9
...
...
@@ -46,6 +46,8 @@
=
icon
(
'question-circle fw'
)
%span
Help
%li
.separate-item
=
nav_link
(
controller: :profile
)
do
=
link_to
profile_path
,
title:
'Profile settings'
,
data:
{
placement:
'bottom'
}
do
=
icon
(
'user fw'
)
...
...
app/views/layouts/profile.html.haml
View file @
2122d7b9
-
page_title
"Profile Settings"
-
unless
@header_title
-
header_title
"Profile Settings"
,
profile_path
-
header_title
"Profile Settings"
,
profile_path
unless
header_title
-
sidebar
"profile"
=
render
template:
"layouts/application"
app/views/layouts/project.html.haml
View file @
2122d7b9
-
page_title
@project
.
name_with_namespace
-
header_title
detect_project_title
(
@project
)
-
header_title
project_title
(
@project
)
unless
header_title
-
sidebar
"project"
unless
sidebar
-
content_for
:scripts_body_top
do
...
...
app/views/layouts/project_settings.html.haml
View file @
2122d7b9
-
page_title
"Settings"
-
header_title
project_title
(
@project
,
"Settings"
,
edit_project_path
(
@project
))
-
sidebar
"project_settings"
=
render
template:
"layouts/project"
app/views/projects/activity.html.haml
View file @
2122d7b9
-
page_title
"Activity"
-
header_title
project_title
(
@project
,
"Activity"
,
activity_project_path
(
@project
))
=
render
'projects/activity'
app/views/projects/blame/show.html.haml
View file @
2122d7b9
-
page_title
"Blame"
,
@blob
.
path
,
@ref
-
header_title
project_title
(
@project
,
"Files"
,
project_files_path
(
@project
))
%h3
.page-title
Blame view
#tree-holder
.tree-holder
...
...
app/views/projects/blob/_header_title.html.haml
0 → 100644
View file @
2122d7b9
-
header_title
project_title
(
@project
,
"Files"
,
project_files_path
(
@project
))
app/views/projects/blob/edit.html.haml
View file @
2122d7b9
-
page_title
"Edit"
,
@blob
.
path
,
@ref
=
render
"header_title"
.file-editor
%ul
.center-top-menu.no-bottom.js-edit-mode
%li
.active
...
...
app/views/projects/blob/new.html.haml
View file @
2122d7b9
-
page_title
"New File"
,
@path
.
presence
,
@ref
=
render
"header_title"
.gray-content-block.top-block
Create a new file or
=
link_to
'upload'
,
'#modal-upload-blob'
,
...
...
app/views/projects/blob/show.html.haml
View file @
2122d7b9
-
page_title
@blob
.
path
,
@ref
=
render
"header_title"
=
render
'projects/last_push'
...
...
app/views/projects/branches/index.html.haml
View file @
2122d7b9
-
page_title
"Branches"
=
render
"projects/commits/header_title"
=
render
"projects/commits/head"
.gray-content-block
.pull-right
...
...
app/views/projects/branches/new.html.haml
View file @
2122d7b9
-
page_title
"New Branch"
=
render
"projects/commits/header_title"
-
if
@error
.alert.alert-danger
%button
{
type:
"button"
,
class:
"close"
,
"data-dismiss"
=>
"alert"
}
×
...
...
app/views/projects/commit/show.html.haml
View file @
2122d7b9
-
page_title
"
#{
@commit
.
title
}
(
#{
@commit
.
short_id
}
)"
,
"Commits"
=
render
"projects/commits/header_title"
=
render
"commit_box"
=
render
"projects/diffs/diffs"
,
diffs:
@diffs
,
project:
@project
=
render
"projects/notes/notes_with_form"
,
view:
params
[
:view
]
app/views/projects/commits/_header_title.html.haml
0 → 100644
View file @
2122d7b9
-
header_title
project_title
(
@project
,
"Commits"
,
project_commits_path
(
@project
))
app/views/projects/commits/show.html.haml
View file @
2122d7b9
-
page_title
"Commits"
,
@ref
=
render
"header_title"
=
content_for
:meta_tags
do
-
if
current_user
=
auto_discovery_link_tag
(
:atom
,
namespace_project_commits_url
(
@project
.
namespace
,
@project
,
@ref
,
format: :atom
,
private_token:
current_user
.
private_token
),
title:
"
#{
@project
.
name
}
:
#{
@ref
}
commits"
)
...
...
app/views/projects/compare/index.html.haml
View file @
2122d7b9
-
page_title
"Compare"
=
render
"projects/commits/header_title"
=
render
"projects/commits/head"
.gray-content-block
...
...
app/views/projects/compare/show.html.haml
View file @
2122d7b9
-
page_title
"
#{
params
[
:from
]
}
...
#{
params
[
:to
]
}
"
=
render
"projects/commits/header_title"
=
render
"projects/commits/head"
...
...
app/views/projects/graphs/_header_title.html.haml
0 → 100644
View file @
2122d7b9
-
header_title
project_title
(
@project
,
"Graphs"
,
namespace_project_graph_path
(
@project
.
namespace
,
@project
,
current_ref
))
app/views/projects/graphs/commits.html.haml
View file @
2122d7b9
-
page_title
"Commit statistics"
-
page_title
"Commits"
,
"Graphs"
=
render
"header_title"
.tree-ref-holder
=
render
'shared/ref_switcher'
,
destination:
'graphs_commits'
=
render
'head'
...
...
app/views/projects/graphs/show.html.haml
View file @
2122d7b9
-
page_title
"Contributor statistics"
-
page_title
"Contributors"
,
"Graphs"
=
render
"header_title"
.tree-ref-holder
=
render
'shared/ref_switcher'
,
destination:
'graphs'
=
render
'head'
...
...
app/views/projects/issues/_header_title.html.haml
0 → 100644
View file @
2122d7b9
-
header_title
project_title
(
@project
,
"Issues"
,
namespace_project_issues_path
(
@project
.
namespace
,
@project
))
app/views/projects/issues/index.html.haml
View file @
2122d7b9
-
page_title
"Issues"
=
render
"header_title"
=
content_for
:meta_tags
do
-
if
current_user
=
auto_discovery_link_tag
(
:atom
,
namespace_project_issues_url
(
@project
.
namespace
,
@project
,
:atom
,
private_token:
current_user
.
private_token
),
title:
"
#{
@project
.
name
}
issues"
)
...
...
app/views/projects/issues/new.html.haml
View file @
2122d7b9
-
page_title
"New Issue"
=
render
"header_title"
=
render
"form"
app/views/projects/issues/show.html.haml
View file @
2122d7b9
-
page_title
"
#{
@issue
.
title
}
(#
#{
@issue
.
iid
}
)"
,
"Issues"
=
render
"header_title"
.issue
.issue-details.issuable-details
.page-title
...
...
app/views/projects/labels/_header_title.html.haml
0 → 100644
View file @
2122d7b9
-
header_title
project_title
(
@project
,
"Labels"
,
namespace_project_labels_path
(
@project
.
namespace
,
@project
))
app/views/projects/labels/edit.html.haml
View file @
2122d7b9
-
page_title
"Edit"
,
@label
.
name
,
"Labels"
=
render
"header_title"
%h3
Edit label
%span
.light
#{
@label
.
name
}
...
...
app/views/projects/labels/index.html.haml
View file @
2122d7b9
-
page_title
"Labels"
=
render
"header_title"
.gray-content-block.top-block
-
if
can?
current_user
,
:admin_label
,
@project
...
...
app/views/projects/labels/new.html.haml
View file @
2122d7b9
-
page_title
"New Label"
=
render
"header_title"
%h3
New label
.back-link
=
link_to
namespace_project_labels_path
(
@project
.
namespace
,
@project
)
do
...
...
app/views/projects/merge_requests/_header_title.html.haml
0 → 100644
View file @
2122d7b9
-
header_title
project_title
(
@project
,
"Merge Requests"
,
namespace_project_merge_requests_path
(
@project
.
namespace
,
@project
))
app/views/projects/merge_requests/_show.html.haml
View file @
2122d7b9
-
page_title
"
#{
@merge_request
.
title
}
(#
#{
@merge_request
.
iid
}
)"
,
"Merge Requests"
=
render
"header_title"
-
if
params
[
:view
]
==
'parallel'
-
fluid_layout
true
...
...
app/views/projects/merge_requests/edit.html.haml
View file @
2122d7b9
-
page_title
"Edit"
,
"
#{
@merge_request
.
title
}
(#
#{
@merge_request
.
iid
}
)"
,
"Merge Requests"
=
render
"header_title"
%h3
.page-title
=
"Edit merge request #
#{
@merge_request
.
iid
}
"
%hr
...
...
app/views/projects/merge_requests/index.html.haml
View file @
2122d7b9
-
page_title
"Merge Requests"
=
render
"header_title"
=
render
'projects/last_push'
.project-issuable-filter
.controls
...
...
app/views/projects/merge_requests/invalid.html.haml
View file @
2122d7b9
-
page_title
"
#{
@merge_request
.
title
}
(#
#{
@merge_request
.
iid
}
)"
,
"Merge Requests"
=
render
"header_title"
.merge-request
=
render
"projects/merge_requests/show/mr_title"
=
render
"projects/merge_requests/show/mr_box"
...
...
app/views/projects/merge_requests/new.html.haml
View file @
2122d7b9
-
page_title
"New Merge Request"
=
render
"header_title"
-
if
@merge_request
.
can_be_created
=
render
'new_submit'
-
else
...
...
app/views/projects/milestones/_header_title.html.haml
0 → 100644
View file @
2122d7b9
-
header_title
project_title
(
@project
,
"Milestones"
,
namespace_project_milestones_path
(
@project
.
namespace
,
@project
))
app/views/projects/milestones/edit.html.haml
View file @
2122d7b9
-
page_title
"Edit"
,
@milestone
.
title
,
"Milestones"
=
render
"header_title"
=
render
"form"
app/views/projects/milestones/index.html.haml
View file @
2122d7b9
-
page_title
"Milestones"
=
render
"header_title"
=
render
'shared/milestones_filter'
.gray-content-block
...
...
app/views/projects/milestones/new.html.haml
View file @
2122d7b9
-
page_title
"New Milestone"
=
render
"header_title"
=
render
"form"
app/views/projects/milestones/show.html.haml
View file @
2122d7b9
-
page_title
@milestone
.
title
,
"Milestones"
=
render
"header_title"
%h4
.page-title
.issue-box
{
class:
issue_box_class
(
@milestone
)
}
-
if
@milestone
.
closed?
...
...
app/views/projects/network/show.html.haml
View file @
2122d7b9
-
page_title
"Network"
,
@ref
=
header_title
project_title
(
@project
,
"Network"
,
namespace_project_network_path
(
@project
.
namespace
,
@project
,
current_ref
))
=
render
"head"
.project-network
.controls
...
...
app/views/projects/project_members/_header_title.html.haml
0 → 100644
View file @
2122d7b9
-
header_title
project_title
(
@project
,
"Members"
,
namespace_project_project_members_path
(
@project
.
namespace
,
@project
))
app/views/projects/project_members/import.html.haml
View file @
2122d7b9
-
page_title
"Import members"
=
render
"header_title"
%h3
.page-title
Import members from another project
%p
.light
...
...
app/views/projects/project_members/index.html.haml
View file @
2122d7b9
-
page_title
"Members"
=
render
"header_title"
.gray-content-block.top-block
.clearfix.js-toggle-container
...
...
app/views/projects/snippets/_header_title.html.haml
0 → 100644
View file @
2122d7b9
-
header_title
project_title
(
@project
,
"Snippets"
,
namespace_project_snippets_path
(
@project
.
namespace
,
@project
))
app/views/projects/snippets/edit.html.haml
View file @
2122d7b9
-
page_title
"Edit"
,
@snippet
.
title
,
"Snippets"
=
render
"header_title"
%h3
.page-title
Edit snippet
%hr
...
...
app/views/projects/snippets/index.html.haml
View file @
2122d7b9
-
page_title
"Snippets"
=
render
"header_title"
%h3
.page-title
Snippets
-
if
can?
current_user
,
:create_project_snippet
,
@project
...
...
app/views/projects/snippets/new.html.haml
View file @
2122d7b9
-
page_title
"New Snippets"
=
render
"header_title"
%h3
.page-title
New snippet
%hr
...
...
app/views/projects/snippets/show.html.haml
View file @
2122d7b9
-
page_title
@snippet
.
title
,
"Snippets"
=
render
"header_title"
%h3
.page-title
=
@snippet
.
title
...
...
app/views/projects/tags/index.html.haml
View file @
2122d7b9
-
page_title
"Tags"
=
render
"projects/commits/header_title"
=
render
"projects/commits/head"
.gray-content-block
...
...
app/views/projects/tags/new.html.haml
View file @
2122d7b9
-
page_title
"New Tag"
=
render
"projects/commits/header_title"
-
if
@error
.alert.alert-danger
%button
{
type:
"button"
,
class:
"close"
,
"data-dismiss"
=>
"alert"
}
×
...
...
app/views/projects/tree/show.html.haml
View file @
2122d7b9
-
page_title
@path
.
presence
||
"Files"
,
@ref
-
header_title
project_title
(
@project
,
"Files"
,
project_files_path
(
@project
))
=
content_for
:meta_tags
do
-
if
current_user
=
auto_discovery_link_tag
(
:atom
,
namespace_project_commits_url
(
@project
.
namespace
,
@project
,
@ref
,
format: :atom
,
private_token:
current_user
.
private_token
),
title:
"
#{
@project
.
name
}
:
#{
@ref
}
commits"
)
...
...
app/views/projects/wikis/_header_title.html.haml
0 → 100644
View file @
2122d7b9
-
header_title
project_title
(
@project
,
'Wiki'
,
get_project_wiki_path
(
@project
))
app/views/projects/wikis/edit.html.haml
View file @
2122d7b9
-
page_title
"Edit"
,
@page
.
title
,
"Wiki"
=
render
"header_title"
=
render
'nav'
.pull-right
=
render
'main_links'
...
...
app/views/projects/wikis/empty.html.haml
View file @
2122d7b9
-
page_title
"Wiki"
=
render
"header_title"
%h3
.page-title
Empty page
%hr
.error_message
...
...
app/views/projects/wikis/git_access.html.haml
View file @
2122d7b9
-
page_title
"Git Access"
,
"Wiki"
=
render
"header_title"
=
render
'nav'
.gray-content-block
.row
...
...
app/views/projects/wikis/history.html.haml
View file @
2122d7b9
-
page_title
"History"
,
@page
.
title
,
"Wiki"
-
page_title
"History"
,
@page
.
title
.
capitalize
,
"Wiki"
=
render
"header_title"
=
render
'nav'
.gray-content-block
%h3
.page-title
...
...
app/views/projects/wikis/pages.html.haml
View file @
2122d7b9
-
page_title
"All Pages"
,
"Wiki"
=
render
"header_title"
=
render
'nav'
.gray-content-block
%h3
.page-title
...
...
app/views/projects/wikis/show.html.haml
View file @
2122d7b9
-
page_title
@page
.
title
,
"Wiki"
-
page_title
@page
.
title
.
capitalize
,
"Wiki"
=
render
"header_title"
=
render
'nav'
.gray-content-block
...
...
app/views/shared/projects/_list.html.haml
View file @
2122d7b9
...
...
@@ -8,7 +8,7 @@
=
render
"shared/projects/project"
,
project:
project
,
avatar:
avatar
,
stars:
stars
,
css_class:
css_class
-
if
projects
.
count
>
projects_limit
-
if
projects
.
size
>
projects_limit
%li
.bottom.center
.light
#{
projects_limit
}
of
#{
pluralize
(
projects
.
count
,
'project'
)
}
displayed.
...
...
db/migrate/20150916114643_add_help_page_text_to_application_settings.rb
0 → 100644
View file @
2122d7b9
class
AddHelpPageTextToApplicationSettings
<
ActiveRecord
::
Migration
def
change
add_column
:application_settings
,
:help_page_text
,
:text
end
end
db/schema.rb
View file @
2122d7b9
...
...
@@ -45,6 +45,7 @@ ActiveRecord::Schema.define(version: 20150916145038) do
t
.
string
"after_sign_out_path"
t
.
integer
"session_expire_delay"
,
default:
10080
,
null:
false
t
.
text
"import_sources"
t
.
text
"help_page_text"
end
create_table
"audit_events"
,
force:
true
do
|
t
|
...
...
doc/ssh/README.md
View file @
2122d7b9
...
...
@@ -72,6 +72,8 @@ access can happen through being a direct member of the project, or through
a group. See
`def accessible_deploy_keys`
in
`app/models/user.rb`
for more
information.
Deploy keys can be shared between projects, you just need to add them to each project.
## Applications
### Eclipse
...
...
features/steps/admin/settings.rb
View file @
2122d7b9
...
...
@@ -7,6 +7,7 @@ class Spinach::Features::AdminSettings < Spinach::FeatureSteps
step
'I modify settings and save form'
do
uncheck
'Gravatar enabled'
fill_in
'Home page URL'
,
with:
'https://about.gitlab.com/'
fill_in
'Help page text'
,
with:
'Example text'
click_button
'Save'
end
...
...
lib/ci/project_list_builder.rb
0 → 100644
View file @
2122d7b9
module
Ci
class
ProjectListBuilder
def
execute
(
current_user
,
search
=
nil
)
projects
=
current_user
.
authorized_projects
projects
=
projects
.
search
(
search
)
if
search
projects
.
joins
(
"LEFT JOIN ci_projects ON projects.id = ci_projects.gitlab_id
LEFT JOIN
#{
last_commit_subquery
}
AS last_commit ON
#{
Ci
::
Project
.
table_name
}
.id = last_commit.project_id"
).
reorder
(
"ci_projects.id is NULL ASC,
CASE WHEN last_commit.committed_at IS NULL THEN 1 ELSE 0 END,
last_commit.committed_at DESC"
)
end
private
def
last_commit_subquery
"(SELECT project_id, MAX(committed_at) committed_at FROM
#{
Ci
::
Commit
.
table_name
}
GROUP BY project_id)"
end
end
end
spec/controllers/ci/projects_controller_spec.rb
View file @
2122d7b9
...
...
@@ -84,7 +84,7 @@ describe Ci::ProjectsController do
end
it
"searches projects"
do
xhr
:get
,
:
gitlab
,
{
search:
"str"
,
format:
"js
"
}.
with_indifferent_access
xhr
:get
,
:
index
,
{
search:
"str"
,
format:
"json
"
}.
with_indifferent_access
expect
(
response
).
to
be_success
expect
(
response
.
code
).
to
eq
(
'200'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment