2011-10-11 22:00:00 +02:00
|
|
|
%div.top_project_menu
|
|
|
|
%span= link_to 'All', projects_path, :class => current_page?(projects_path) ? "current" : nil
|
2011-10-14 23:05:41 +02:00
|
|
|
- if current_user.can_create_project?
|
|
|
|
%span= link_to "New Project", new_project_path, :class => current_page?(:controller => "projects", :action => "new") ? "current" : nil
|
2011-10-11 22:00:00 +02:00
|
|
|
%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 });
|
2011-10-26 15:46:25 +02:00
|
|
|
} else {
|
2011-10-11 22:00:00 +02:00
|
|
|
$.cookie('project_view', 'list', { expires: 14 });
|
|
|
|
}
|
|
|
|
}
|