summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormr <mr@mrautenberg.de>2010-12-13 13:55:58 +0100
committermr <mr@mrautenberg.de>2010-12-13 13:55:58 +0100
commit4b1c065dc6422cb1918e59950e02b83bde6c4fd2 (patch)
treedaad219e15cb02b745c4ea9295a7c2854872d571
parent29ac25b9bce4d23002eae991e901732b8b2c2a39 (diff)
A&A for model delete
-rw-r--r--views/model.haml9
1 files changed, 5 insertions, 4 deletions
diff --git a/views/model.haml b/views/model.haml
index d34079d..cd1682c 100644
--- a/views/model.haml
+++ b/views/model.haml
@@ -13,10 +13,11 @@
%dt Status:
%dd
%span{:id => "model_#{model.id}_status", :class => model.status}
- = haml :model_status, :locals=>{:model=>model}, :layout => false
- (
- %a{:href => url_for("/model/#{model.id}"), :id => "delete_#{model.id}", :class => 'delete'} delete
- )
+ = haml :model_status, :locals=>{:model=>model}, :layout => false
+ - if is_authorized(model.web_uri, "DELETE")
+ (
+ %a{:href => url_for("/model/#{model.id}"), :id => "delete_#{model.id}", :class => 'delete'} delete
+ )
%dt Started:
%dd= model.created_at.strftime("%m/%d/%Y - %I:%M:%S%p")
- if model.nr_compounds