forked from bofh/fetsite
neuigkeiten form
This commit is contained in:
@@ -148,10 +148,10 @@ private
|
|||||||
def load_toolbar_elements
|
def load_toolbar_elements
|
||||||
@neuigkeit=Neuigkeit.find(params[:id])
|
@neuigkeit=Neuigkeit.find(params[:id])
|
||||||
@toolbar_elements=[]
|
@toolbar_elements=[]
|
||||||
@toolbar_elements << {:hicon=>'icon-plus', :text=> I18n.t('neuigkeit.publish'),:path => publish_rubrik_neuigkeit_path(@neuigkeit.rubrik,@neuigkeit),:confirm=>'Sure?' } if can?(:publish, @neuigkeit) && !@neuigkeit.published?
|
@toolbar_elements << {:hicon=>'icon-plus', :text=> I18n.t('neuigkeit.publish'),:path => publish_rubrik_neuigkeit_path(@neuigkeit.rubrik,@neuigkeit),:confirm=> I18n.t('neuigkeit.publish_sure') } if can?(:publish, @neuigkeit) && !@neuigkeit.published?
|
||||||
@toolbar_elements << {:hicon=>'icon-facebook', :text=> I18n.t('neuigkeit.publish')+" to facebook",:path => publish_to_facebook_rubrik_neuigkeit_path(@neuigkeit.rubrik,@neuigkeit),:confirm=>'Sure?' } if can?(:publish, @neuigkeit)
|
@toolbar_elements << {:hicon=>'icon-facebook', :text=> I18n.t('neuigkeit.publishfb'),:path => publish_to_facebook_rubrik_neuigkeit_path(@neuigkeit.rubrik,@neuigkeit),:confirm=>I18n.t('neuigkeit.publishfb_sure') } if can?(:publish, @neuigkeit) && @neuigkeit.published?
|
||||||
|
|
||||||
@toolbar_elements << {:hicon=>'icon-minus', :text=> I18n.t('neuigkeit.unpublish'),:path => unpublish_rubrik_neuigkeit_path(@neuigkeit.rubrik,@neuigkeit),:confirm=>'Sure?' } if can?(:unpublish, @neuigkeit) && @neuigkeit.published?
|
@toolbar_elements << {:hicon=>'icon-minus', :text=> I18n.t('neuigkeit.unpublish'),:path => unpublish_rubrik_neuigkeit_path(@neuigkeit.rubrik,@neuigkeit),:confirm=> I18n.t('neuigkeit.unpublish_sure') } if can?(:unpublish, @neuigkeit) && @neuigkeit.published?
|
||||||
|
|
||||||
|
|
||||||
@toolbar_elements << {:text=>I18n.t('common.edit'),:path=>edit_rubrik_neuigkeit_path(@neuigkeit.rubrik,@neuigkeit),:icon=>:pencil} if can? :edit, @neuigkeit.rubrik
|
@toolbar_elements << {:text=>I18n.t('common.edit'),:path=>edit_rubrik_neuigkeit_path(@neuigkeit.rubrik,@neuigkeit),:icon=>:pencil} if can? :edit, @neuigkeit.rubrik
|
||||||
|
|||||||
@@ -33,5 +33,8 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<script>$('.datetimepicker').datetimepicker({format: 'd.m.Y H:i'})</script>
|
<script>
|
||||||
|
$(document).ready(function(){
|
||||||
|
$('.datetimepicker').map($(this).datetimepicker({format: 'd.m.Y H:i', startDate: (!($(this).attr("value")==undefined))? $(this).attr("value"): ""}))
|
||||||
|
})</script>
|
||||||
<%= tinymce %>
|
<%= tinymce %>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<h1>Editing neuigkeit</h1>
|
<h1><%= I18n.t("neuigkeit.edit") %></h1>
|
||||||
<%= %>
|
<%= %>
|
||||||
<%= render 'form' %>
|
<%= render 'form' %>
|
||||||
<%= render 'layouts/pretty_toolbar' %>
|
<%= render 'layouts/pretty_toolbar' %>
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
<%= render 'layouts/pretty_toolbar', :object=> @toolbar_elements %>
|
<%= render 'layouts/pretty_toolbar', :object=> @toolbar_elements %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<%= I18n.t("neuigekeit.sieheauch") %>
|
<%= I18n.t("neuigkeit.sieheauch") %>
|
||||||
<ul class="unstyled">
|
<ul class="unstyled">
|
||||||
<div id="nlink_list">
|
<div id="nlink_list">
|
||||||
<%= render partial: "nlink_list", collection: @neuigkeit.nlinks %>
|
<%= render partial: "nlink_list", collection: @neuigkeit.nlinks %>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
|
|
||||||
$("#themaview").html("<%= escape_javascript(raw("<h2>Bearbeiten</h2>")+render(:partial=>"themen/small", :object=>@thema) )%>");
|
$("#themaview").html("<%= escape_javascript(raw("<h2>"+I18n.t("thema.edit")+"</h2>")+render(:partial=>"themen/small", :object=>@thema) )%>");
|
||||||
|
|
||||||
$("#themen").html("<%= escape_javascript(render(:partial=>"themen/verw_liste", :object=>@themen) )%>");
|
$("#themen").html("<%= escape_javascript(render(:partial=>"themen/verw_liste", :object=>@themen) )%>");
|
||||||
|
|||||||
@@ -3,9 +3,13 @@ de:
|
|||||||
# -------- Interne Strings ---------
|
# -------- Interne Strings ---------
|
||||||
neuigkeit:
|
neuigkeit:
|
||||||
publish: "Neuigkeit veröffentlichen"
|
publish: "Neuigkeit veröffentlichen"
|
||||||
|
publish_sure: "Achtung! Das Veröffentlichen sollte nicht mehr rückgängiggemacht werden. Die Neuigkeit ist für die Öffentlichkeit sichtbar! Bist du sicher, dass du die Nachricht veröffentlichen willst?"
|
||||||
publishfb: "Neuigkeit auf Facebook veröffentlichen"
|
publishfb: "Neuigkeit auf Facebook veröffentlichen"
|
||||||
|
publishfb_sure: "Sicher, dass diese Neuigkeit auf Facebook veröffentlicht werden soll? Diese Aktion kann nicht rückgängig gemacht werden!"
|
||||||
republish: "Neuigkeit erneut veröffentlichen"
|
republish: "Neuigkeit erneut veröffentlichen"
|
||||||
unpublish: "Veröffentlichung rückgängig"
|
unpublish: "Veröffentlichung rückgängig"
|
||||||
|
unpublish_sure: "Veröffentlichen rückgängig machen? Dieser Vorgang beeinflusst nicht die Veröffentlichung auf Facebook"
|
||||||
|
edit: "Artikel bearbeiten"
|
||||||
new:
|
new:
|
||||||
title: "Neuer Artikel"
|
title: "Neuer Artikel"
|
||||||
rubrik:
|
rubrik:
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ de:
|
|||||||
thema:
|
thema:
|
||||||
add: "Thema hinzufügen"
|
add: "Thema hinzufügen"
|
||||||
edit: "Thema bearbeiten"
|
edit: "Thema bearbeiten"
|
||||||
|
show: "Thema anzeigen"
|
||||||
remove: "Thema löschen"
|
remove: "Thema löschen"
|
||||||
manage: "Thema verwalten"
|
manage: "Thema verwalten"
|
||||||
save: "Thema speichern"
|
save: "Thema speichern"
|
||||||
|
|||||||
@@ -17,3 +17,19 @@ plugins:
|
|||||||
- heading
|
- heading
|
||||||
heading_clear_tag: p
|
heading_clear_tag: p
|
||||||
width: "100%"
|
width: "100%"
|
||||||
|
formats:
|
||||||
|
boldred: {inline: "b", styles: {color: "red"}}
|
||||||
|
setup : function(fn) {
|
||||||
|
// Add a custom button
|
||||||
|
fn.addButton('firstname', {
|
||||||
|
title : 'Member First Name',
|
||||||
|
image : 'resources/scripts/tiny_mce/themes/advanced/img/firstname.gif',
|
||||||
|
onclick : function() {
|
||||||
|
// Add you own code to execute something on click
|
||||||
|
fn.focus();
|
||||||
|
fn.selection.setContent('{firstname}');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user