diff options
| author | hukl <contact@smyck.org> | 2009-10-17 23:32:18 +0200 |
|---|---|---|
| committer | hukl <contact@smyck.org> | 2009-10-17 23:32:18 +0200 |
| commit | 443947a319692e0462024c99f06e4d18ab5f0344 (patch) | |
| tree | 652caf728cb07d0eebb3777482f8c1408a32cac0 /app/helpers | |
| parent | c7c4b007621fd28c88b65db5fd3296ef730097d9 (diff) | |
changed some node related methods and implementation of unlock
Diffstat (limited to 'app/helpers')
| -rw-r--r-- | app/helpers/link_helper.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/app/helpers/link_helper.rb b/app/helpers/link_helper.rb index 65137ee..b77a1df 100644 --- a/app/helpers/link_helper.rb +++ b/app/helpers/link_helper.rb | |||
| @@ -40,4 +40,15 @@ module LinkHelper | |||
| 40 | return :class => "selected" | 40 | return :class => "selected" |
| 41 | end | 41 | end |
| 42 | end | 42 | end |
| 43 | |||
| 44 | def unlock_link | ||
| 45 | message = "Are you sure you want to unlock?\n" + | ||
| 46 | "Locked by #{@node.lock_owner.login}\n" + | ||
| 47 | "Last modified #{@page.updated_at.to_s(:db)}" | ||
| 48 | |||
| 49 | link_to( | ||
| 50 | 'Unlock', unlock_node_path(@node), :method => :put, :confirm => message | ||
| 51 | ) | ||
| 52 | end | ||
| 53 | |||
| 43 | end \ No newline at end of file | 54 | end \ No newline at end of file |
