2007-03-30 04:36:52 +00:00
|
|
|
<% project = project_listing
|
2009-04-18 23:50:12 +02:00
|
|
|
suppress_drag_handle ||= false
|
|
|
|
|
suppress_edit_button ||= false
|
2007-03-30 04:36:52 +00:00
|
|
|
-%>
|
2008-08-05 16:48:14 +02:00
|
|
|
<div id="<%= dom_id(project, "container") %>" class="list">
|
2007-03-30 04:36:52 +00:00
|
|
|
<div id="<%= dom_id(project) %>" class="project sortable_row" style="display:''">
|
2008-05-22 08:33:15 +00:00
|
|
|
<% unless suppress_drag_handle -%>
|
|
|
|
|
<div class="position">
|
2009-04-18 23:50:12 +02:00
|
|
|
<span class="handle">DRAG</span>
|
|
|
|
|
</div>
|
|
|
|
|
<% end -%>
|
2007-03-30 04:36:52 +00:00
|
|
|
<div class="data">
|
|
|
|
|
<%= link_to_project( project ) %><%= " (" + count_undone_todos_and_notes_phrase(project,"actions") + ")" %>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="buttons">
|
|
|
|
|
<span class="grey"><%= project.current_state.to_s.upcase %></span>
|
2007-12-03 03:24:05 +00:00
|
|
|
<a class="delete_project_button"
|
2009-12-07 19:10:55 -05:00
|
|
|
href="<%= project_path(project, :format => 'js') %>"
|
2007-12-03 03:24:05 +00:00
|
|
|
title="delete the project '<%= project.name %>'"><%= image_tag( "blank.png",
|
2009-04-18 23:50:12 +02:00
|
|
|
:title => "Delete project",
|
|
|
|
|
:class=>"delete_item") %></a>
|
2009-09-22 07:37:37 -04:00
|
|
|
|
2009-04-18 23:50:12 +02:00
|
|
|
<% unless suppress_edit_button -%>
|
|
|
|
|
<%= link_to_remote(
|
|
|
|
|
image_tag( "blank.png", :title => "Edit project", :class=>"edit_item"),
|
|
|
|
|
:url => {:controller => 'projects', :action => 'edit', :id => project.id},
|
|
|
|
|
:method => 'get',
|
|
|
|
|
:with => "'_source_view=#{@source_view}'",
|
2009-09-22 07:37:37 -04:00
|
|
|
:before => "$('#{dom_id(project)}').block({message:null});",
|
2009-10-07 11:41:31 -04:00
|
|
|
:complete => "$('#{dom_id(project)}').unblock();enable_rich_interaction();"
|
2009-04-18 23:50:12 +02:00
|
|
|
) %>
|
|
|
|
|
|
|
|
|
|
<% end -%>
|
2007-03-30 04:36:52 +00:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div id="<%= dom_id(project, 'edit') %>" class="edit-form" style="display:none;">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|