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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
ae06a0aa
Commit
ae06a0aa
authored
Mar 18, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Return own tab for wall. Improve Wiki nav. Removed attachments listing page
parent
6956f1f6
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
25 additions
and
62 deletions
+25
-62
app/contexts/projects/create_context.rb
app/contexts/projects/create_context.rb
+3
-0
app/controllers/projects_controller.rb
app/controllers/projects_controller.rb
+0
-4
app/helpers/tab_helper.rb
app/helpers/tab_helper.rb
+0
-10
app/views/layouts/project_resource.html.haml
app/views/layouts/project_resource.html.haml
+8
-2
app/views/projects/files.html.haml
app/views/projects/files.html.haml
+0
-22
app/views/projects/wall.html.haml
app/views/projects/wall.html.haml
+0
-1
app/views/snippets/index.html.haml
app/views/snippets/index.html.haml
+0
-1
app/views/wikis/_main_links.html.haml
app/views/wikis/_main_links.html.haml
+2
-10
app/views/wikis/_nav.html.haml
app/views/wikis/_nav.html.haml
+8
-11
app/views/wikis/edit.html.haml
app/views/wikis/edit.html.haml
+1
-0
app/views/wikis/git_access.html.haml
app/views/wikis/git_access.html.haml
+1
-0
app/views/wikis/history.html.haml
app/views/wikis/history.html.haml
+2
-1
No files found.
app/contexts/projects/create_context.rb
View file @
ae06a0aa
...
@@ -32,6 +32,9 @@ module Projects
...
@@ -32,6 +32,9 @@ module Projects
@project
.
namespace_id
=
current_user
.
namespace_id
@project
.
namespace_id
=
current_user
.
namespace_id
end
end
# Disable wall by default
@project
.
wall_enabled
=
false
@project
.
creator
=
current_user
@project
.
creator
=
current_user
# Import project from cloneable resource
# Import project from cloneable resource
...
...
app/controllers/projects_controller.rb
View file @
ae06a0aa
...
@@ -68,10 +68,6 @@ class ProjectsController < ProjectResourceController
...
@@ -68,10 +68,6 @@ class ProjectsController < ProjectResourceController
end
end
end
end
def
files
@notes
=
@project
.
notes
.
where
(
"attachment != 'NULL'"
).
order
(
"created_at DESC"
).
limit
(
100
)
end
#
#
# Wall
# Wall
#
#
...
...
app/helpers/tab_helper.rb
View file @
ae06a0aa
...
@@ -80,16 +80,6 @@ module TabHelper
...
@@ -80,16 +80,6 @@ module TabHelper
end
end
end
end
def
project_wiki_tab_class
[
:files
,
:wall
].
each
do
|
action
|
return
"active"
if
current_page?
(
controller:
"projects"
,
action:
action
,
id:
@project
)
end
if
[
'wikis'
,
'snippets'
].
include?
controller
.
controller_name
"active"
end
end
def
branches_tab_class
def
branches_tab_class
if
current_page?
(
branches_project_repository_path
(
@project
))
||
if
current_page?
(
branches_project_repository_path
(
@project
))
||
current_controller?
(
:protected_branches
)
||
current_controller?
(
:protected_branches
)
||
...
...
app/views/layouts/project_resource.html.haml
View file @
ae06a0aa
...
@@ -35,11 +35,17 @@
...
@@ -35,11 +35,17 @@
Merge Requests
Merge Requests
%span
.count.merge_counter
=
@project
.
merge_requests
.
opened
.
count
%span
.count.merge_counter
=
@project
.
merge_requests
.
opened
.
count
=
nav_link
(
html_options:
{
class:
"
#{
project_wiki_tab_class
}
"
})
do
-
if
@project
.
wiki_enabled
=
link_to
'Wiki'
,
project_wiki_path
(
@project
,
:home
)
=
nav_link
(
controller: :wikis
)
do
=
link_to
'Wiki'
,
project_wiki_path
(
@project
,
:home
)
-
if
@project
.
wall_enabled
=
nav_link
(
path:
'projects#wall'
)
do
=
link_to
'Wall'
,
wall_project_path
(
@project
)
-
if
can?
current_user
,
:admin_project
,
@project
-
if
can?
current_user
,
:admin_project
,
@project
=
nav_link
(
html_options:
{
class:
"
#{
project_tab_class
}
"
})
do
=
nav_link
(
html_options:
{
class:
"
#{
project_tab_class
}
"
})
do
=
link_to
edit_project_path
(
@project
),
class:
"stat-tab tab "
do
=
link_to
edit_project_path
(
@project
),
class:
"stat-tab tab "
do
Settings
Settings
.content
=
yield
.content
=
yield
app/views/projects/files.html.haml
deleted
100644 → 0
View file @
6956f1f6
=
render
'wikis/nav'
-
unless
@notes
.
empty?
%table
%thead
%tr
%th
File name
%th
-
@notes
.
each
do
|
note
|
%tr
%td
=
link_to
note
.
attachment
.
secure_url
,
target:
"_blank"
do
=
image_tag
gravatar_icon
(
note
.
author_email
),
class:
"avatar s24"
=
note
.
attachment_identifier
%td
Added
=
time_ago_in_words
(
note
.
created_at
)
ago
-
else
%p
.slead
All files attached to project wall, issues etc will be displayed here
app/views/projects/wall.html.haml
View file @
ae06a0aa
=
render
'wikis/nav'
%div
.wall_page
%div
.wall_page
=
render
"notes/reversed_notes_with_form"
=
render
"notes/reversed_notes_with_form"
app/views/snippets/index.html.haml
View file @
ae06a0aa
=
render
'wikis/nav'
%h3
.page_title
%h3
.page_title
Snippets
Snippets
%small
share code pastes with others out of git repository
%small
share code pastes with others out of git repository
...
...
app/views/wikis/_main_links.html.haml
View file @
ae06a0aa
%span
.pull-right
%span
.pull-right
=
link_to
project_wiki_path
(
@project
,
:home
),
class:
"btn btn-small grouped"
do
Home
=
link_to
pages_project_wikis_path
(
@project
),
class:
"btn btn-small grouped"
do
Pages
-
if
(
@wiki
&&
@wiki
.
persisted?
)
-
if
(
@wiki
&&
@wiki
.
persisted?
)
=
link_to
history_project_wiki_path
(
@project
,
@wiki
),
class:
"btn btn-small grouped"
do
=
link_to
history_project_wiki_path
(
@project
,
@wiki
),
class:
"btn btn-small grouped"
do
History
Page History
-
if
can?
(
current_user
,
:write_wiki
,
@project
)
-
if
can?
(
current_user
,
:write_wiki
,
@project
)
-
if
@wiki
&&
@wiki
.
persisted?
=
link_to
edit_project_wiki_path
(
@project
,
@wiki
),
class:
"btn btn-small grouped"
do
=
link_to
edit_project_wiki_path
(
@project
,
@wiki
),
class:
"btn btn-small grouped"
do
%i
.icon-edit
%i
.icon-edit
Edit
Edit
=
link_to
git_access_project_wikis_path
(
@project
),
class:
"btn btn-small grouped"
do
%i
.icon-download-alt
Git Access
app/views/wikis/_nav.html.haml
View file @
ae06a0aa
%ul
.nav.nav-tabs
%ul
.nav.nav-tabs
-
if
@project
.
wiki_enabled
=
nav_link
(
html_options:
{
class:
params
[
:id
]
==
'home'
?
'active'
:
''
})
do
=
nav_link
(
controller:
'wikis'
)
do
=
link_to
'Home'
,
project_wiki_path
(
@project
,
:home
)
=
link_to
'Wiki'
,
project_wiki_path
(
@project
,
:home
)
-
if
@project
.
wall_enabled
=
nav_link
(
path:
'wikis#pages'
)
do
=
nav_link
(
path:
'projects#wall'
)
do
=
link_to
'Pages'
,
pages_project_wikis_path
(
@project
)
=
link_to
'Wall'
,
wall_project_path
(
@project
)
=
nav_link
(
path:
'projects#files'
)
do
=
nav_link
(
path:
'wikis#git_access'
)
do
=
link_to
'Attachments'
,
files_project_path
(
@project
),
class:
"files-tab tab"
=
link_to
git_access_project_wikis_path
(
@project
)
do
%i
.icon-download-alt
=
nav_link
(
controller: :snippets
)
do
Git Access
=
link_to
'Snippets'
,
project_snippets_path
(
@project
),
class:
"snippets-tab tab"
app/views/wikis/edit.html.haml
View file @
ae06a0aa
=
render
'wikis/nav'
%h3
.page_title
%h3
.page_title
Editing page
Editing page
=
render
partial:
'main_links'
=
render
partial:
'main_links'
...
...
app/views/wikis/git_access.html.haml
View file @
ae06a0aa
=
render
'wikis/nav'
%h3
.page_title
%h3
.page_title
Git Access
Git Access
%strong
=
@gollum_wiki
.
path_with_namespace
%strong
=
@gollum_wiki
.
path_with_namespace
...
...
app/views/wikis/history.html.haml
View file @
ae06a0aa
=
render
'wikis/nav'
%h3
.page_title
%h3
.page_title
%span
.
cgray
History for
%span
.
light
History for
=
@wiki
.
title
.
titleize
=
@wiki
.
title
.
titleize
=
render
partial:
'main_links'
=
render
partial:
'main_links'
%br
%br
...
...
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