Skip to content

Commit

Permalink
[#692 state:resolved] check permissions for position column for sorta…
Browse files Browse the repository at this point in the history
…ble-collection
  • Loading branch information
bryanlarsen committed Apr 13, 2010
1 parent 0f8de3f commit 8dc3d97
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hobo/taglibs/rapid_plus.dryml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Each item in the collection has a `<div class="ordering-handle" param="handle">`

### Controller support

This tag assumes the controller has a `reorder` action. This action is added automatically by Hobo's model-controller if the model declares `acts_as_list`. See also [Drag and Drop Reordering](/manual/controllers#drag_and_drop_reordering) in the [Controllers and Routing](/manual/controllers) chapter of the manual.
This tag assumes the controller has a `reorder` action and the model has a `position_column` method. This action is added automatically by Hobo's model-controller if the model declares `acts_as_list`. See also [Drag and Drop Reordering](/manual/controllers#drag_and_drop_reordering) in the [Controllers and Routing](/manual/controllers) chapter of the manual.
-->
<def tag="sortable-collection" attrs="sortable-options"><%
singular_name = this.member_class.name.underscore
Expand All @@ -77,7 +77,7 @@ This tag assumes the controller has a `reorder` action. This action is added aut
%>
<collection class="sortable" merge>
<item: id="#{singular_name}_#{this.id}" param>
<div class="ordering-handle" param="handle" if="&can_edit?">&uarr;<br/>&darr;</div>
<div class="ordering-handle" param="handle" if="&can_edit?(this.position_column)">&uarr;<br/>&darr;</div>
<do param="default"><card param/></do>
</item:>
</collection>
Expand Down

0 comments on commit 8dc3d97

Please sign in to comment.