46 lines
2.1 KiB
Plaintext
46 lines
2.1 KiB
Plaintext
<div class="toolbar-inline">
|
|
<%= link_to(fa_icon("edit"), edit_rubrik_neuigkeit_path( @neuigkeit.rubrik, @neuigkeit), remote: true , class: "btn", title: "Edit") if can? :edit, @neuigkeit %>
|
|
<span class="btn-group">
|
|
<%= link_to fa_icon("paperclip"), "#", class: "btn", id: "attachments-form-open", title: "Attachments" if can? :edit, @neuigkeit %>
|
|
<%= link_to fa_icon("calendar-o"), new_calentry_path(:object_id=>@neuigkeit.id, :object_type=>"Neuigkeit"), :remote=>true, class: :btn if can? :edit, @neuigkeit %>
|
|
|
|
</span>
|
|
|
|
<%= new_question_for(@neuigkeit, fa_icon("question")) if can? :new, Survey::Question %>
|
|
<span class=" pull-right">
|
|
<%= (link_to(fa_icon("globe"), publish_rubrik_neuigkeit_path(@neuigkeit.rubrik,@neuigkeit), title: I18n.t('neuigkeit.publish'), class: "btn") ) if can?(:publish, @neuigkeit) && !@neuigkeit.published? %>
|
|
<%= link_to fa_stack("globe","ban"), "#", :remote=>true, class: "btn stacked" if can? :edit, @neuigkeit %>
|
|
|
|
<div class="dropdown" style=" display:inline"">
|
|
<a class="dropdown-toggle btn" data-toggle="dropdown" title="publish" href="#"><%= fa_icon("mail-forward")%><span class="caret"></span></a>
|
|
<ul class="dropdown-menu">
|
|
<%= li_tag(link_to(fa_icon("facebook-square") + " post on facebook", publish_to_facebook_rubrik_neuigkeit_path(@neuigkeit.rubrik,@neuigkeit))) if can?(:publish, @neuigkeit) && @neuigkeit.published? %>
|
|
|
|
<%= li_tag(link_to(fa_icon("envelope-o") + " send mail", mail_to_fet_rubrik_neuigkeit_path(@neuigkeit.rubrik,@neuigkeit))) if can?(:publish, @neuigkeit) && @neuigkeit.published? %>
|
|
</ul>
|
|
</div>
|
|
</span>
|
|
<div class="ui-dialog" id="attachments-form">
|
|
<%= render_new_attachments_for(@neuigkeit, fa_icon("plus"), {class: "btn"}) %>
|
|
|
|
</div>
|
|
</div>
|
|
<script>
|
|
$(function(){
|
|
dialogatt = $( "#attachments-form" ).dialog({
|
|
autoOpen: false,
|
|
width: "90%",
|
|
modal: true,
|
|
title: "Neue Attachments",
|
|
buttons: {
|
|
"Fertig": function() {
|
|
dialogatt.dialog( "close" );
|
|
}
|
|
}
|
|
});
|
|
$("#attachments-form-open").on("click",function(){dialogatt.dialog("open")})
|
|
});
|
|
</script>
|
|
|
|
|