Sha256: 261cfa32962020d3c4a106fbbc49d0f73df4a05349705d62e13728acf86751aa

Contents?: true

Size: 824 Bytes

Versions: 11

Compression:

Stored size: 824 Bytes

Contents

- canAdd = authorizer.can_add_page?(@page)
- canEdit = authorizer.can_edit_page?(@page)
- canReposition = authorizer.can_reposition_page?(@page)
- canDelete = authorizer.can_delete_page?(@page)

- if canAdd || canEdit || canReposition || canDelete
  %p.adminButtons
    - if canAdd
      = link_to t('.new'), new_page_path(@page.full_permalink), :class => 'button new'

    - if canEdit
      = link_to t('.edit'), edit_page_path(@page.full_permalink), :class => 'button edit'

    - if canReposition
      = link_to t('.reorder'), page_positioning_path(@page.parents[-1].try(:full_permalink)), :class => 'button edit'

    - if canDelete
      = link_to t('.delete'), delete_page_path(@page.full_permalink), :class => 'button delete', :method => :delete, :data => {:confirm => "Are you sure you wish to remove this page?"}

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
documentation-1.0.9 app/views/documentation/pages/_admin_buttons.html.haml
documentation-1.0.8 app/views/documentation/pages/_admin_buttons.html.haml
documentation-1.0.7 app/views/documentation/pages/_admin_buttons.html.haml
documentation-1.0.6 app/views/documentation/pages/_admin_buttons.html.haml
local_documentation-1.0.0 app/views/documentation/pages/_admin_buttons.html.haml
documentation-1.0.5 app/views/documentation/pages/_admin_buttons.html.haml
documentation-1.0.4 app/views/documentation/pages/_admin_buttons.html.haml
documentation-1.0.3 app/views/documentation/pages/_admin_buttons.html.haml
documentation-1.0.2 app/views/documentation/pages/_admin_buttons.html.haml
documentation-1.0.1 app/views/documentation/pages/_admin_buttons.html.haml
documentation-1.0.0 app/views/documentation/pages/_admin_buttons.html.haml