AutoCommit Fre Aug 21 21:03:01 CEST 2015

This commit is contained in:
Andreas Stephanides
2015-08-21 21:03:01 +02:00
parent c396c7410e
commit bfe65e14e3
6 changed files with 23 additions and 6 deletions

View File

@@ -258,3 +258,9 @@ div.toolbar-inline > div.dropdown
div.btn-toolbar > div.dropdown > ul.dropdown-menu
{ font-size: small;
}
div.toolbar-inline > .ficon.fa-stack {
height:1em;
line-height:1em;
width:1em;
height:1em;
}

View File

@@ -53,6 +53,10 @@ m.save
content_tag("i","", class: "ficon "+name )
end
def fa_stack(icon1, icon2)
content_tag("i", content_tag("i","", class: "ficon "+" fa-"+icon1+" fa fa-stack-1x" ) + content_tag("i","", class: "ficon "+" fa-"+icon2+" fa fa-stack-1x" ),class: "fa-stack")
end
def ffi1_list
y=YAML.load_file("#{::Rails.root.to_s}/config/flatfeticon1.yml")
y["ffi1"]

View File

@@ -13,9 +13,9 @@ module AttachmentsHelper
render(partial:"attachments/attachment_list", object: p.attachments, locals: {editor: (can?(:edit, p)), parent: p} )
end
def render_new_attachments_for(p, text, options={})
def render_new_attachments_for(p, text="", options={})
a= Attachment.new
a.parent=p
((can?(:edit, p))? (render partial:"attachments/form_bulk2", object: a ): "")+ link_to(text, new_calentry_path(),options)
((can?(:edit, p))? (render partial:"attachments/form_bulk2", object: a ): "")
end
end

View File

@@ -4,7 +4,7 @@
<!-- The fileupload-buttonbar contains buttons to add/delete files and start/cancel the upload -->
<div class="row-fluid">
<div class="span7">
<div class="span12">
<div class="fileupload-buttonbar">
<!-- The fileinput-button span is used to style the file input field as button -->
<span class="btn btn-success fileinput-button">
@@ -28,6 +28,9 @@
</button>
<input type="checkbox" class="toggle">
</div>
</div>
<div class="row-fluid">
<div class="span5">
<!-- The global progress bar -->
<div class="progress progress-success progress-striped active fade">

View File

@@ -21,10 +21,11 @@
</ul>
<%= link_to "+" , new_survey_choice_path(params:{question_id: question.id}), remote: true if can? :edit, question %>
<% end %>
</div>
<%= render partial: "survey/questions/answeredquestion", object: question if question.answers.where(user_id: current_user.id).count>0 unless question.flag_delete %>
</div>
<%= render partial: "survey/questions/answeredquestion", object: question if question.answers.where(user_id: current_user.id).count>0 unless question.flag_delete %>
</div>
<% end %>

View File

@@ -3,6 +3,9 @@
<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 %>
<%= link_to fa_stack("calendar-o","ban"), "#", :remote=>true, class: :btn if can? :edit, @neuigkeit %>
</span>
<%= new_question_for(@neuigkeit, fa_icon("question")) if can? :new, Survey::Question %>
@@ -10,7 +13,7 @@
<div class="dropdown pull-right">
<a class="dropdown-toggle btn" data-toggle="dropdown" title="publish" href="#"><%= fa_icon("mail-forward")%></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))) %>
<%= 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(ff_icon("icon-plus")+ I18n.t('neuigkeit.publish'), publish_rubrik_neuigkeit_path(@neuigkeit.rubrik,@neuigkeit)) )%>
</ul>
</div>