Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/projects/_projects_top_menu.html.haml')
-rw-r--r--app/views/projects/_projects_top_menu.html.haml16
1 files changed, 16 insertions, 0 deletions
diff --git a/app/views/projects/_projects_top_menu.html.haml b/app/views/projects/_projects_top_menu.html.haml
new file mode 100644
index 00000000000..be04c57e842
--- /dev/null
+++ b/app/views/projects/_projects_top_menu.html.haml
@@ -0,0 +1,16 @@
+%div.top_project_menu
+ %span= link_to 'All', projects_path, :class => current_page?(projects_path) ? "current" : nil
+ %span= link_to "New Project", new_project_path, :class => current_page?(:controller => "projects", :action => "new") ? "current" : nil
+ %span.right
+ = link_to_function(image_tag("list_view_icon.jpg"), "switchProjectView()", :style => "border:none;box-shadow:none;")
+
+:javascript
+ function switchProjectView(){
+ $(".tile").toggle();
+ $(".list").toggle();
+ if($(".tile").is(":visible")){
+ $.cookie('project_view', 'tile', { expires: 14 });
+ } else {
+ $.cookie('project_view', 'list', { expires: 14 });
+ }
+ }