summaryrefslogtreecommitdiff
path: root/app/views/projects
diff options
context:
space:
mode:
authorCristian Bica <cristian.bica@gmail.com>2015-10-01 17:05:20 +0300
committerCristian Bica <cristian.bica@gmail.com>2015-10-01 17:05:20 +0300
commitc5280434399ee489eebda254b2d246252df68f2b (patch)
tree4a208c29c40202d5341534e5f822aea120d3a2b1 /app/views/projects
parent2e8a3e3996f47a5b436bce9a6bbb61ca0a351cab (diff)
downloadgitlab-ce-c5280434399ee489eebda254b2d246252df68f2b.tar.gz
Allow users to select the Files view as default project view
Diffstat (limited to 'app/views/projects')
-rw-r--r--app/views/projects/_files.html.haml11
-rw-r--r--app/views/projects/show.html.haml9
-rw-r--r--app/views/projects/tree/_blob_item.html.haml2
-rw-r--r--app/views/projects/tree/_tree_item.html.haml2
4 files changed, 15 insertions, 9 deletions
diff --git a/app/views/projects/_files.html.haml b/app/views/projects/_files.html.haml
new file mode 100644
index 00000000000..2a99708eb43
--- /dev/null
+++ b/app/views/projects/_files.html.haml
@@ -0,0 +1,11 @@
+= render 'projects/last_push'
+
+.tree-ref-holder
+ = render 'shared/ref_switcher', destination: 'tree', path: @path
+
+- if can? current_user, :download_code, @project
+ .tree-download-holder
+ = render 'projects/repositories/download_archive', ref: @ref, btn_class: 'btn-group pull-right hidden-xs hidden-sm', split_button: true
+
+#tree-holder.tree-holder.clearfix
+ = render "projects/tree/tree", tree: @tree
diff --git a/app/views/projects/show.html.haml b/app/views/projects/show.html.haml
index 6a5fc689803..54afb7de15d 100644
--- a/app/views/projects/show.html.haml
+++ b/app/views/projects/show.html.haml
@@ -64,13 +64,8 @@
Archived project! Repository is read-only
%section
- - if prefer_readme?
- .project-show-readme
- = render 'projects/readme'
- - else
- .project-show-activity
- = render 'projects/activity'
-
+ %div{class: "project-show-#{current_user_default_project_view}"}
+ = render current_user_default_project_view
- if current_user
- access = user_max_access_in_project(current_user, @project)
diff --git a/app/views/projects/tree/_blob_item.html.haml b/app/views/projects/tree/_blob_item.html.haml
index 02ecbade219..2ddc5d504fa 100644
--- a/app/views/projects/tree/_blob_item.html.haml
+++ b/app/views/projects/tree/_blob_item.html.haml
@@ -4,5 +4,5 @@
%span.str-truncated
= link_to blob_item.name, namespace_project_blob_path(@project.namespace, @project, tree_join(@id || @commit.id, blob_item.name))
%td.tree_time_ago.cgray
- = render 'spinner'
+ = render 'projects/tree/spinner'
%td.hidden-xs.tree_commit
diff --git a/app/views/projects/tree/_tree_item.html.haml b/app/views/projects/tree/_tree_item.html.haml
index e87138bf980..cf65057e704 100644
--- a/app/views/projects/tree/_tree_item.html.haml
+++ b/app/views/projects/tree/_tree_item.html.haml
@@ -5,5 +5,5 @@
- path = flatten_tree(tree_item)
= link_to path, namespace_project_tree_path(@project.namespace, @project, tree_join(@id || @commit.id, path))
%td.tree_time_ago.cgray
- = render 'spinner'
+ = render 'projects/tree/spinner'
%td.hidden-xs.tree_commit