summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
Diffstat (limited to 'app/views')
-rw-r--r--app/views/profiles/preferences/show.html.haml8
-rw-r--r--app/views/projects/_activity.html.haml15
-rw-r--r--app/views/projects/_readme.html.haml24
-rw-r--r--app/views/projects/activity.html.haml13
-rw-r--r--app/views/projects/show.html.haml27
5 files changed, 51 insertions, 36 deletions
diff --git a/app/views/profiles/preferences/show.html.haml b/app/views/profiles/preferences/show.html.haml
index aa99280fde6..1134317ee06 100644
--- a/app/views/profiles/preferences/show.html.haml
+++ b/app/views/profiles/preferences/show.html.haml
@@ -38,5 +38,13 @@
= link_to('(?)', help_page_path('profile', 'preferences') + '#default-dashboard', target: '_blank')
.col-sm-10
= f.select :dashboard, dashboard_choices, {}, class: 'form-control'
+ .form-group
+ = f.label :project_view, class: 'control-label' do
+ Project view
+ = link_to('(?)', help_page_path('profile', 'preferences') + '#default-project-view', target: '_blank')
+ .col-sm-10
+ = f.select :project_view, project_view_choices, {}, class: 'form-control'
+ .help-block
+ Choose what content you want to see when visit project page
.panel-footer
= f.submit 'Save', class: 'btn btn-save'
diff --git a/app/views/projects/_activity.html.haml b/app/views/projects/_activity.html.haml
new file mode 100644
index 00000000000..ee02b7f6a6c
--- /dev/null
+++ b/app/views/projects/_activity.html.haml
@@ -0,0 +1,15 @@
+= render 'projects/last_push'
+.hidden-xs
+ - if current_user
+ %ul.nav.nav-pills.event_filter.pull-right
+ %li
+ = link_to namespace_project_path(@project.namespace, @project, format: :atom, private_token: current_user.private_token), title: "Feed", class: 'rss-btn' do
+ %i.fa.fa-rss
+
+ = render 'shared/event_filter'
+ %hr
+.content_list{:"data-href" => activity_project_path(@project)}
+= spinner
+
+:coffeescript
+ new Activities()
diff --git a/app/views/projects/_readme.html.haml b/app/views/projects/_readme.html.haml
new file mode 100644
index 00000000000..5038edb95ed
--- /dev/null
+++ b/app/views/projects/_readme.html.haml
@@ -0,0 +1,24 @@
+- if readme = @repository.readme
+ %article.readme-holder#README
+ .clearfix
+ .pull-right
+  
+ - if can?(current_user, :push_code, @project)
+ = link_to namespace_project_edit_blob_path(@project.namespace, @project, tree_join(@repository.root_ref, readme.name)), class: 'light' do
+ %i.fa.fa-pencil
+ .wiki
+ = cache(readme_cache_key) do
+ = render_readme(readme)
+- else
+ %h3.page-title
+ This project does not have README yet
+ - if can?(current_user, :push_code, @project)
+ %p.slead
+ A
+ %code README
+ file contains information about other files in a repository and is commonly
+ distributed with computer software, forming part of its documentation.
+ %br
+ We recommend you to
+ = link_to "add README", new_readme_path, class: 'underlined-link'
+ file to the repository and GitLab will render it here instead of this message.
diff --git a/app/views/projects/activity.html.haml b/app/views/projects/activity.html.haml
index b486cd4ded4..65674913bb0 100644
--- a/app/views/projects/activity.html.haml
+++ b/app/views/projects/activity.html.haml
@@ -1,12 +1 @@
-= render 'projects/last_push'
-.hidden-xs
- - if current_user
- %ul.nav.nav-pills.event_filter.pull-right
- %li
- = link_to namespace_project_path(@project.namespace, @project, format: :atom, private_token: current_user.private_token), title: "Feed", class: 'rss-btn' do
- %i.fa.fa-rss
-
- = render 'shared/event_filter'
- %hr
-.content_list
-= spinner
+= render 'projects/activity'
diff --git a/app/views/projects/show.html.haml b/app/views/projects/show.html.haml
index 5c2ac484ceb..98d9053eb1d 100644
--- a/app/views/projects/show.html.haml
+++ b/app/views/projects/show.html.haml
@@ -41,31 +41,10 @@
%hr
%section
- - if readme = @repository.readme
- %article.readme-holder#README
- .clearfix
- .pull-right
-  
- - if can?(current_user, :push_code, @project)
- = link_to namespace_project_edit_blob_path(@project.namespace, @project, tree_join(@repository.root_ref, readme.name)), class: 'light' do
- %i.fa.fa-pencil
- .wiki
- = cache(readme_cache_key) do
- = render_readme(readme)
+ - if prefer_readme?
+ = render 'projects/readme'
- else
- %h3.page-title
- This project does not have README yet
- - if can?(current_user, :push_code, @project)
- %p.slead
- A
- %code README
- file contains information about other files in a repository and is commonly
- distributed with computer software, forming part of its documentation.
- %br
- We recommend you to
- = link_to "add README", new_readme_path, class: 'underlined-link'
- file to the repository and GitLab will render it here instead of this message.
-
+ = render 'projects/activity'
- if current_user