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
Jérome Perrin
gitlab-ce
Commits
dda66953
Commit
dda66953
authored
May 19, 2017
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dm-fix-readme-project-view' into 'master'
Remove readme project_view option See merge request !11425
parents
4f911242
34964762
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
46 deletions
+15
-46
app/assets/javascripts/dispatcher.js
app/assets/javascripts/dispatcher.js
+2
-0
app/assets/stylesheets/pages/projects.scss
app/assets/stylesheets/pages/projects.scss
+0
-22
app/models/user.rb
app/models/user.rb
+7
-2
app/views/projects/_readme.html.haml
app/views/projects/_readme.html.haml
+0
-21
spec/migrations/migrate_user_project_view_spec.rb
spec/migrations/migrate_user_project_view_spec.rb
+6
-1
No files found.
app/assets/javascripts/dispatcher.js
View file @
dda66953
...
@@ -261,6 +261,8 @@ const ShortcutsBlob = require('./shortcuts_blob');
...
@@ -261,6 +261,8 @@ const ShortcutsBlob = require('./shortcuts_blob');
new
NotificationsForm
();
new
NotificationsForm
();
if
(
$
(
'
#tree-slider
'
).
length
)
{
if
(
$
(
'
#tree-slider
'
).
length
)
{
new
TreeView
();
new
TreeView
();
}
if
(
$
(
'
.blob-viewer
'
).
length
)
{
new
BlobViewer
();
new
BlobViewer
();
}
}
break
;
break
;
...
...
app/assets/stylesheets/pages/projects.scss
View file @
dda66953
...
@@ -639,28 +639,6 @@ pre.light-well {
...
@@ -639,28 +639,6 @@ pre.light-well {
}
}
}
}
.project-show-readme
{
.row-content-block
{
background-color
:
inherit
;
border
:
none
;
}
.readme-holder
{
padding
:
$gl-padding
0
;
border-top
:
0
;
.edit-project-readme
{
z-index
:
2
;
position
:
relative
;
}
.wiki
h1
{
border-bottom
:
none
;
padding
:
0
;
}
}
}
.git-clone-holder
{
.git-clone-holder
{
width
:
380px
;
width
:
380px
;
...
...
app/models/user.rb
View file @
dda66953
...
@@ -166,8 +166,13 @@ class User < ActiveRecord::Base
...
@@ -166,8 +166,13 @@ class User < ActiveRecord::Base
enum
dashboard:
[
:projects
,
:stars
,
:project_activity
,
:starred_project_activity
,
:groups
,
:todos
]
enum
dashboard:
[
:projects
,
:stars
,
:project_activity
,
:starred_project_activity
,
:groups
,
:todos
]
# User's Project preference
# User's Project preference
# Note: When adding an option, it MUST go on the end of the array.
#
enum
project_view:
[
:readme
,
:activity
,
:files
]
# Note: When adding an option, it MUST go on the end of the hash with a
# number higher than the current max. We cannot move options and/or change
# their numbers.
#
# We skip 0 because this was used by an option that has since been removed.
enum
project_view:
{
activity:
1
,
files:
2
}
alias_attribute
:private_token
,
:authentication_token
alias_attribute
:private_token
,
:authentication_token
...
...
app/views/projects/_readme.html.haml
deleted
100644 → 0
View file @
4f911242
-
if
readme
=
@repository
.
readme
%article
.readme-holder
.pull-right
-
if
can?
(
current_user
,
:push_code
,
@project
)
=
link_to
icon
(
'pencil'
),
namespace_project_edit_blob_path
(
@project
.
namespace
,
@project
,
tree_join
(
@repository
.
root_ref
,
readme
.
path
)),
class:
'light edit-project-readme'
=
render
'projects/blob/viewer'
,
viewer:
readme
.
rich_viewer
,
viewer_url:
namespace_project_blob_path
(
@project
.
namespace
,
@project
,
tree_join
(
@repository
.
root_ref
,
readme
.
path
),
viewer: :rich
,
format: :json
)
-
else
.row-content-block.second-block.center
%h3
.page-title
This project does not have a README yet
-
if
can?
(
current_user
,
:push_code
,
@project
)
%p
A
%code
README
file contains information about other files in a repository and is commonly
distributed with computer software, forming part of its documentation.
%p
We recommend you to
=
link_to
"add a README"
,
add_special_file_path
(
@project
,
file_name:
'README.md'
),
class:
'underlined-link'
file to the repository and GitLab will render it here instead of this message.
spec/migrations/migrate_user_project_view_spec.rb
View file @
dda66953
...
@@ -5,7 +5,12 @@ require Rails.root.join('db', 'post_migrate', '20170406142253_migrate_user_proje
...
@@ -5,7 +5,12 @@ require Rails.root.join('db', 'post_migrate', '20170406142253_migrate_user_proje
describe
MigrateUserProjectView
do
describe
MigrateUserProjectView
do
let
(
:migration
)
{
described_class
.
new
}
let
(
:migration
)
{
described_class
.
new
}
let!
(
:user
)
{
create
(
:user
,
project_view:
'readme'
)
}
let!
(
:user
)
{
create
(
:user
)
}
before
do
# 0 is the numeric value for the old 'readme' option
user
.
update_column
(
:project_view
,
0
)
end
describe
'#up'
do
describe
'#up'
do
it
'updates project view setting with new value'
do
it
'updates project view setting with new value'
do
...
...
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