check abilities

This commit is contained in:
Stella Rouzi 2014-07-18 07:08:06 +03:00
parent ffb290de0c
commit 07877f3256
8 changed files with 150 additions and 116 deletions

View file

@ -45,7 +45,7 @@
data.formData = inputs.serializeArray();
});
$.getJSON($('#fileupload').prop('action'), function (files) {
var fu = $('#fileupload').data('fileupload'),
var fu = $('#fileupload').data('blueimpFileupload'),
template;
fu._adjustMaxNumberOfFiles(-files.length);
template = fu._renderDownload(files)

View file

@ -1,7 +1,7 @@
= semantic_form_for(@event, :url => @url) do |f|
%section#basic
= f.inputs :name => "Session Information" do
- if can? :update, @event
- if can? :update, @event or can? :create, @event
= f.input :title, :as => :string, :required => true
- else
Title: #{@event.title}
@ -9,7 +9,7 @@
%br
= f.input :subtitle, :as => :string
%section#details
- if can? :update, @event
- if can? :update, @event or can? :create, @event
= f.input :event_type_id,:as => :select, :collection => @conference.event_types.map {|x| ["#{x.title} - #{show_time(x.length)}", x.id]}, :include_blank => false, :label => "Session Type"
- else
Event type: #{@event.event_type.title}