AutoCommit Son Sep 13 12:03:20 CEST 2015
This commit is contained in:
6
Gemfile
6
Gemfile
@@ -13,8 +13,8 @@ gem 'webrick', '1.3.1'
|
|||||||
|
|
||||||
# Gems used only for assets and not required
|
# Gems used only for assets and not required
|
||||||
# in production environments by default.
|
# in production environments by default.
|
||||||
gem 'sass-rails', '~> 4.0.0'
|
gem 'sass-rails', '~> 3.0'
|
||||||
gem 'coffee-rails', '~> 4.0.0'
|
gem 'coffee-rails', '~> 3.0'
|
||||||
gem 'bootstrap-sass','~> 2.3.2.1'
|
gem 'bootstrap-sass','~> 2.3.2.1'
|
||||||
|
|
||||||
group :assets do
|
group :assets do
|
||||||
@@ -102,7 +102,7 @@ gem 'rmagick'
|
|||||||
|
|
||||||
gem 'bootstrap-addons-rails'
|
gem 'bootstrap-addons-rails'
|
||||||
gem "jquery-fileupload-rails", "0.4.1"
|
gem "jquery-fileupload-rails", "0.4.1"
|
||||||
gem "jquery-ui-rails","~> 4.2.0"
|
gem "jquery-ui-rails","~> 4.1.0"
|
||||||
gem "font-awesome-rails"
|
gem "font-awesome-rails"
|
||||||
gem "jquery-datetimepicker-rails"
|
gem "jquery-datetimepicker-rails"
|
||||||
# gem "jquery-sortable-rails"
|
# gem "jquery-sortable-rails"
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ class HomeController < ApplicationController
|
|||||||
end
|
end
|
||||||
def infoscreen
|
def infoscreen
|
||||||
authorize! :doadmin, User
|
authorize! :doadmin, User
|
||||||
@neuigkeiten = Neuigkeit.accessible_by(current_ability, :show).limit(10)
|
@neuigkeiten = Neuigkeit.accessible_by(current_ability, :show).where(flag_infoscreen: true)
|
||||||
render layout: false
|
render layout: false
|
||||||
end
|
end
|
||||||
def kontakt
|
def kontakt
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ class NeuigkeitenController < ApplicationController
|
|||||||
|
|
||||||
before_filter :load_toolbar_elements, :only=>[:show,:find_link]
|
before_filter :load_toolbar_elements, :only=>[:show,:find_link]
|
||||||
before_filter :load_toolbar_elements_edit, :only=>[:edit]
|
before_filter :load_toolbar_elements_edit, :only=>[:edit]
|
||||||
|
acts_as_flagable
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -44,6 +44,12 @@ class Neuigkeit < ActiveRecord::Base
|
|||||||
before_validation :sanitize
|
before_validation :sanitize
|
||||||
after_save :update_cache
|
after_save :update_cache
|
||||||
attr_accessor :no_fallbacks
|
attr_accessor :no_fallbacks
|
||||||
|
|
||||||
|
acts_as_flagable
|
||||||
|
|
||||||
|
FLAG_ICONS={"infoscreen" => "fa fa-flag"}
|
||||||
|
FLAG_CONFIRM={"infoscreen" => "Neuigkeit am Infoscreen anzeigen"}
|
||||||
|
|
||||||
def globalize_fallbacks(locale)
|
def globalize_fallbacks(locale)
|
||||||
if self.no_fallbacks
|
if self.no_fallbacks
|
||||||
[locale]
|
[locale]
|
||||||
|
|||||||
@@ -13,8 +13,8 @@
|
|||||||
<% i=1 %>
|
<% i=1 %>
|
||||||
<% @neuigkeiten.each do |n| %>
|
<% @neuigkeiten.each do |n| %>
|
||||||
|
|
||||||
<div class="step contentbox" id="step-<%=i%>" data-x="<%= i *2000 %>" data-y="<%= Random.rand(0..5)*200 %>" data-rotate="<%= Random.rand(0..18)*10 %>" style="width:1024px; height:500px; padding: 50px; display:block" data-duration="10000"><% @toolbar_elements=[];@questions=[] %>
|
<div class="step contentbox" id="step-<%=i%>" data-x="<%= i *2000 %>" data-y="<%= Random.rand(0..5)*200 %>" data-rotate="<%= Random.rand(0..18)*10 %>" style="width:1000px; height:500px; padding: 50px; display:block" data-duration="10000"><% @toolbar_elements=[];@questions=[] %>
|
||||||
<div class="media">
|
<div class="media" style="width: 500px; height:250px; transform: scale(1.5) translate(60px,0)" >
|
||||||
<% unless n.picture_robust.big_thumb.to_s.empty? %>
|
<% unless n.picture_robust.big_thumb.to_s.empty? %>
|
||||||
<div class="pull-left" href="#">
|
<div class="pull-left" href="#">
|
||||||
<p><br><%= link_to image_tag(n.picture_robust.big_thumb),n.picture_robust.try(:url) %>
|
<p><br><%= link_to image_tag(n.picture_robust.big_thumb),n.picture_robust.try(:url) %>
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="ui-progressbar ui-widget ui-widget-content ui-corner-all" style="height:10px; z-index: 2000; left: 5px; right: 5px; bottom: 5px; height: 10px; position:absolute">
|
<div class="ui-progressbar ui-widget ui-widget-content ui-corner-all" style="height:10px; z-index: 2000; left: 5px; right: 5px; bottom: 5px; height: 10px; position:absolute">
|
||||||
<div id="my-progress-bar" class="ui-progressbar-value ui-widget-header ui-corner-left" style="width:0;height:100%"></div>
|
<div id="" class="ui-progressbar-value ui-widget-header ui-corner-left" style="width:0;height:100%"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -62,9 +62,22 @@ $(function () {
|
|||||||
$('#jmpress').jmpress({
|
$('#jmpress').jmpress({
|
||||||
duration: {
|
duration: {
|
||||||
barPropertyStart: '0',
|
barPropertyStart: '0',
|
||||||
barSelector: '#my-progress-bar'
|
barSelector: '.ui-progressbar-value'
|
||||||
}
|
},
|
||||||
|
beforeChange: function(element, eventData) {
|
||||||
|
console.log('We\'re changing to step: #' + $(element).attr('id') + '!');
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
setTimeout(function(){
|
||||||
|
|
||||||
|
window.location.reload();
|
||||||
|
/* or window.location = window.location.href; */
|
||||||
|
|
||||||
|
}, 100000);
|
||||||
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@@ -14,6 +14,8 @@
|
|||||||
<%= new_question_for(menu, fa_icon("question")) if can? :new, Survey::Question %>
|
<%= new_question_for(menu, fa_icon("question")) if can? :new, Survey::Question %>
|
||||||
|
|
||||||
<span class=" pull-right">
|
<span class=" pull-right">
|
||||||
|
<%= flag_link(menu, "infoscreen")%>
|
||||||
|
|
||||||
<%= link_to(fa_icon("globe"), publish_rubrik_neuigkeit_path(menu.rubrik,menu), title: I18n.t('neuigkeit.publish'), class: "btn") if can?(:publish, menu) && !menu.published?
|
<%= link_to(fa_icon("globe"), publish_rubrik_neuigkeit_path(menu.rubrik,menu), title: I18n.t('neuigkeit.publish'), class: "btn") if can?(:publish, menu) && !menu.published?
|
||||||
%>
|
%>
|
||||||
<%= link_to(fa_stack("globe","ban"), unpublish_rubrik_neuigkeit_path(menu.rubrik,menu), :remote=>true, class: "btn stacked") if can?(:unpublish, menu) && menu.published?
|
<%= link_to(fa_stack("globe","ban"), unpublish_rubrik_neuigkeit_path(menu.rubrik,menu), :remote=>true, class: "btn stacked") if can?(:unpublish, menu) && menu.published?
|
||||||
|
|||||||
@@ -184,7 +184,7 @@ end
|
|||||||
get 'publish_to_facebook'
|
get 'publish_to_facebook'
|
||||||
get 'mail_to_fet'
|
get 'mail_to_fet'
|
||||||
get 'mail_preview'
|
get 'mail_preview'
|
||||||
|
get 'flag'
|
||||||
end
|
end
|
||||||
collection do
|
collection do
|
||||||
get 'newsletter_preview'
|
get 'newsletter_preview'
|
||||||
|
|||||||
7
db/migrate/20150913090628_add_infoscreen_to_neuigkeit.rb
Normal file
7
db/migrate/20150913090628_add_infoscreen_to_neuigkeit.rb
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
class AddInfoscreenToNeuigkeit < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
add_column :neuigkeiten, :flag_infoscreen, :boolean, default: false
|
||||||
|
add_column :themen, :flag_infoscreen, :boolean, default: false
|
||||||
|
|
||||||
|
end
|
||||||
|
end
|
||||||
Reference in New Issue
Block a user