2013-06-26 15:59:56 +02:00
|
|
|
.row
|
2014-03-17 16:36:32 +01:00
|
|
|
.col-md-12
|
2013-06-26 15:59:56 +02:00
|
|
|
.tabbable
|
|
|
|
|
%ul.nav.nav-tabs
|
|
|
|
|
%li.active
|
|
|
|
|
= link_to "Proposal", "#proposal-content", "data-toggle"=>"tab"
|
2014-08-05 18:23:42 +02:00
|
|
|
%li
|
|
|
|
|
= link_to 'Commercials', '#commercials-content', 'data-toggle'=>'tab'
|
2013-06-26 15:59:56 +02:00
|
|
|
%li
|
|
|
|
|
= link_to "Attachments", "#attachment-content", "data-toggle"=>"tab"
|
|
|
|
|
.tab-content
|
|
|
|
|
#proposal-content.tab-pane.active
|
|
|
|
|
= render 'proposal/proposal_form'
|
2014-08-05 18:23:42 +02:00
|
|
|
#commercials-content.tab-pane
|
|
|
|
|
%p.text-muted
|
|
|
|
|
You can add commercials for your event. These commercials will be displayed on the event detail site.
|
|
|
|
|
If you don't add a commercial, the conference commercial will be displayed!
|
|
|
|
|
We currently support the following commercial types: YouTube, Vimeo, Instagram, Flickr, Speakerdeck and SlideShare.
|
|
|
|
|
|
|
|
|
|
- @event.commercials.each_slice(3) do |slice|
|
|
|
|
|
.row
|
|
|
|
|
- slice.each do |commercial|
|
|
|
|
|
.col-md-4
|
|
|
|
|
.thumbnail
|
|
|
|
|
%h3.text-center
|
|
|
|
|
= commercial.commercial_type
|
|
|
|
|
.flexvideo
|
|
|
|
|
= render partial: 'shared/media_item', locals: { commercial_type: commercial.commercial_type, commercial_id: commercial.commercial_id }
|
2014-08-12 11:51:59 +03:00
|
|
|
- if can? :update, commercial
|
|
|
|
|
= link_to 'Edit', edit_conference_proposal_commercial_path(@conference.short_title, @event.id, commercial.id), class: 'btn btn-primary'
|
|
|
|
|
- if can? :destrooy, commercial
|
|
|
|
|
= link_to 'Delete', conference_proposal_commercial_path(@conference.short_title, @event.id, commercial.id),
|
2014-08-05 18:23:42 +02:00
|
|
|
:method => :delete, :data => { :confirm => 'Are you sure?' }, class: 'btn btn-danger'
|
2014-08-12 11:51:59 +03:00
|
|
|
- if can? :create, @event.commercials.new
|
|
|
|
|
%hr
|
|
|
|
|
= link_to 'Add Commercial', new_conference_proposal_commercial_path(@conference.short_title, @event.id), class: 'btn btn-primary'
|
2014-08-05 18:23:42 +02:00
|
|
|
|
2013-06-26 15:59:56 +02:00
|
|
|
#attachment-content.tab-pane
|
2013-06-26 18:05:24 +02:00
|
|
|
= form_for EventAttachment.new, :url => conference_proposal_event_attachment_index_path(@conference.short_title, @event), :html => { :multipart => true, :id => "fileupload" } do |f|
|
|
|
|
|
%table.table.table-striped
|
|
|
|
|
%thead
|
|
|
|
|
%th
|
|
|
|
|
%th
|
|
|
|
|
%b Filename
|
|
|
|
|
%th
|
|
|
|
|
%b Title
|
|
|
|
|
%th
|
|
|
|
|
%b Size
|
|
|
|
|
%th
|
|
|
|
|
%b Public
|
|
|
|
|
%th
|
2014-04-21 21:13:25 +03:00
|
|
|
%th
|
2013-06-26 18:05:24 +02:00
|
|
|
%tbody.files
|
2014-04-21 21:13:25 +03:00
|
|
|
|
|
|
|
|
|
2013-06-26 18:05:24 +02:00
|
|
|
.row-fluid.fileupload-buttonbar
|
|
|
|
|
.btn.btn-success.fileinput-button
|
2014-04-14 18:10:38 +02:00
|
|
|
%span.glyphicon.glyphicon-icon-plus.icon-white
|
2013-06-26 18:05:24 +02:00
|
|
|
Add files...
|
|
|
|
|
= f.file_field :attachment
|
|
|
|
|
= f.hidden_field :event_id, :value => @event.id
|
2013-01-07 09:04:09 +01:00
|
|
|
|
|
|
|
|
:javascript
|
|
|
|
|
$(document).ready( function() {
|
|
|
|
|
$('#fileupload').fileupload();
|
|
|
|
|
$('#fileupload').bind('fileuploadsubmit', function (e, data) {
|
|
|
|
|
var inputs = data.context.find(':input');
|
|
|
|
|
if (inputs.filter('[required][value=""]').first().focus().length) {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
data.formData = inputs.serializeArray();
|
|
|
|
|
});
|
2013-01-11 15:00:54 +01:00
|
|
|
$.getJSON($('#fileupload').prop('action'), function (files) {
|
2014-08-12 15:48:29 +03:00
|
|
|
var fu = $('#fileupload').data('fileupload'),
|
2013-01-11 15:00:54 +01:00
|
|
|
template;
|
|
|
|
|
fu._adjustMaxNumberOfFiles(-files.length);
|
|
|
|
|
template = fu._renderDownload(files)
|
|
|
|
|
.appendTo($('#fileupload .files'));
|
|
|
|
|
fu._reflow = fu._transition && template.length &&
|
|
|
|
|
template[0].offsetWidth;
|
|
|
|
|
template.addClass('in');
|
|
|
|
|
$('#loading').remove();
|
|
|
|
|
});
|
2013-01-07 09:04:09 +01:00
|
|
|
|
|
|
|
|
} );
|
|
|
|
|
|
|
|
|
|
:plain
|
|
|
|
|
<script id="template-upload" type="text/x-tmpl">
|
|
|
|
|
{% for (var i=0, file; file=o.files[i]; i++) { %}
|
|
|
|
|
<tr class="template-upload fade">
|
|
|
|
|
<td class="preview"><span class="fade"></span></td>
|
2014-04-21 21:13:25 +03:00
|
|
|
<td class="name"><span>{%=file.name%}</span>
|
|
|
|
|
<div class="progress progress-success progress-striped active"><div class="bar" style="width:0%;"></div></div>
|
|
|
|
|
</td>
|
2013-01-07 09:04:09 +01:00
|
|
|
<td class="name"><input type="text" name="title[]" value="{%=file.name%}"/></td>
|
|
|
|
|
<td class="size"><span>{%=o.formatFileSize(file.size)%}</span></td>
|
|
|
|
|
<td class="name"><input checked type="checkbox" name="public">Public</input></td>
|
|
|
|
|
{% if (file.error) { %}
|
2014-04-21 21:13:25 +03:00
|
|
|
<td class="error"><span class="label label-important">{%=locale.fileupload.error%}</span> {%=locale.fileupload.errors[file.error] || file.error%}</td>
|
2013-01-07 09:04:09 +01:00
|
|
|
{% } else if (o.files.valid && !i) { %}
|
|
|
|
|
<td class="start">{% if (!o.options.autoUpload) { %}
|
|
|
|
|
<button class="btn btn-primary">
|
2014-04-14 18:10:38 +02:00
|
|
|
<span class="glyphicon glyphicon-upload"></span>
|
2013-01-07 09:04:09 +01:00
|
|
|
<span>{%=locale.fileupload.start%}</span>
|
|
|
|
|
</button>
|
|
|
|
|
{% } %}</td>
|
|
|
|
|
{% } else { %}
|
2014-04-21 21:13:25 +03:00
|
|
|
<td></td>
|
2013-01-07 09:04:09 +01:00
|
|
|
{% } %}
|
|
|
|
|
<td class="cancel">{% if (!i) { %}
|
|
|
|
|
<button class="btn btn-warning">
|
2014-04-14 18:10:38 +02:00
|
|
|
<span class="glyphicon glyphicon-circle"></span>
|
2013-01-07 09:04:09 +01:00
|
|
|
<span>{%=locale.fileupload.cancel%}</span>
|
|
|
|
|
</button>
|
|
|
|
|
{% } %}</td>
|
|
|
|
|
</tr>
|
|
|
|
|
{% } %}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<script id="template-download" type="text/x-tmpl">
|
|
|
|
|
{% for (var i=0, file; file=o.files[i]; i++) { %}
|
|
|
|
|
<tr class="template-download fade">
|
|
|
|
|
{% if (file.error) { %}
|
|
|
|
|
<td>{%=file.title%}</td>
|
|
|
|
|
<td class="name">{%=file.name%}</td>
|
|
|
|
|
<td class="size">{%=o.formatFileSize(file.size)%}</td>
|
|
|
|
|
<td class="error" colspan="2"><span class="label label-important">{%=locale.fileupload.error%}</span> {%=locale.fileupload.errors[file.error] || file.error%}</td>
|
|
|
|
|
{% } else { %}
|
|
|
|
|
<td class="preview">{% if (file.thumbnail_url) { %}
|
|
|
|
|
<a href="{%=file.url%}" title="{%=file.name%}" rel="gallery" download="{%=file.name%}"><img src="{%=file.thumbnail_url%}"></a>
|
|
|
|
|
{% } %}</td>
|
|
|
|
|
<td class="name">
|
|
|
|
|
<a href="{%=file.url%}" title="{%=file.name%}" rel="{%=file.thumbnail_url&&'gallery'%}" download="{%=file.name%}">{%=file.name%}</a>
|
|
|
|
|
</td>
|
|
|
|
|
<td>{%=file.title%}</td>
|
|
|
|
|
<td class="size">{%=o.formatFileSize(file.size)%}</td>
|
|
|
|
|
<td>{%=file.public%}</td>
|
|
|
|
|
{% } %}
|
2014-04-21 21:13:25 +03:00
|
|
|
<td class="delete" colspan="2">
|
2013-01-07 09:04:09 +01:00
|
|
|
<button class="btn btn-danger pull-right" data-type="{%=file.delete_type%}" data-url="{%=file.delete_url%}">
|
2014-04-14 18:10:38 +02:00
|
|
|
<span class="glyphicon glyphicon-trash"></i>
|
2013-01-07 09:04:09 +01:00
|
|
|
<span>{%=locale.fileupload.destroy%}</span>
|
|
|
|
|
</button>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
{% } %}
|
|
|
|
|
</script>
|