forked from bofh/fetsite
themes fixes and versioning small fix
This commit is contained in:
@@ -10,11 +10,11 @@
|
|||||||
* compiled file, but it's generally better to create a new file per style scope.
|
* compiled file, but it's generally better to create a new file per style scope.
|
||||||
*
|
*
|
||||||
*= require_self
|
*= require_self
|
||||||
*= require_tree .
|
* require_tree .
|
||||||
*= require jquery.fileupload-ui
|
*= require jquery.fileupload-ui
|
||||||
* require 'bootstrap'
|
* require 'bootstrap'
|
||||||
|
|
||||||
*= require 'neuigkeiten'
|
* require 'neuigkeiten'
|
||||||
*/
|
*/
|
||||||
// Colorshema #0A64A4
|
// Colorshema #0A64A4
|
||||||
$color_prim: #7070a0;
|
$color_prim: #7070a0;
|
||||||
@@ -31,11 +31,17 @@ $white: #FFFFFF;
|
|||||||
$bodyBackground: #EEE;
|
$bodyBackground: #EEE;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$navbarBackground: $color_prim;
|
$navbarBackground: $color_prim;
|
||||||
$navbarText: black;
|
$navbarText: black;
|
||||||
$navbarLinkColor: black;
|
$navbarLinkColor: $color_prim_vdark;
|
||||||
$navbarLinkColorHover: black;
|
$navbarLinkColorHover: black;
|
||||||
$dropdownLinkColor: black;
|
$dropdownLinkColor: black;
|
||||||
|
$navbar-default-brand-color: black;
|
||||||
|
$navbarBrandColor:black;
|
||||||
|
|
||||||
|
|
||||||
$navbarBackgroundHighlight: $color_prim;
|
$navbarBackgroundHighlight: $color_prim;
|
||||||
//$navbarBackgroundHighlight:#FFFFFF;
|
//$navbarBackgroundHighlight:#FFFFFF;
|
||||||
|
|
||||||
@@ -50,6 +56,7 @@ $sansFontFamily: Helvetica, Arial;
|
|||||||
@import 'bootstrap-responsive';
|
@import 'bootstrap-responsive';
|
||||||
@import 'bootstrap/image-gallery';
|
@import 'bootstrap/image-gallery';
|
||||||
|
|
||||||
|
@import 'neuigkeiten';
|
||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
font-size: 23px
|
font-size: 23px
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
class ApplicationController < ActionController::Base
|
class ApplicationController < ActionController::Base
|
||||||
protect_from_forgery
|
protect_from_forgery
|
||||||
before_filter :set_i18n_locale_from_params
|
before_filter :set_i18n_locale_from_params
|
||||||
protected
|
protected
|
||||||
@@ -14,11 +14,11 @@ class ApplicationController < ActionController::Base
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
def get_theme
|
def get_theme
|
||||||
set_theme(params[:theme])
|
if ThemesForRails.available_theme_names.include?(params[:theme])
|
||||||
if valid_theme?
|
params[:theme]
|
||||||
theme_name
|
|
||||||
else
|
else
|
||||||
nil
|
"2003"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
def default_url_options
|
def default_url_options
|
||||||
|
|||||||
@@ -45,7 +45,6 @@ class FotosController < ApplicationController
|
|||||||
# POST /fotos.json
|
# POST /fotos.json
|
||||||
def create
|
def create
|
||||||
@foto = Foto.new(params[:foto])
|
@foto = Foto.new(params[:foto])
|
||||||
|
|
||||||
@foto.gallery_id = (params[:gallery_id])
|
@foto.gallery_id = (params[:gallery_id])
|
||||||
@gallery = @foto.gallery
|
@gallery = @foto.gallery
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
|
|||||||
@@ -4,10 +4,11 @@ class NeuigkeitenController < ApplicationController
|
|||||||
|
|
||||||
def show
|
def show
|
||||||
@neuigkeit = Neuigkeit.find(params[:id])
|
@neuigkeit = Neuigkeit.find(params[:id])
|
||||||
@rubrik=@neuigkeit.rubrik
|
@rubrik=@neuigkeit.rubrik
|
||||||
if !params[:version].nil?
|
if !params[:version].nil?
|
||||||
@neuigkeit.versions.reverse[params[:version].to_i].reify.save!
|
@neuigkeit.assign_attributes(@neuigkeit.translation.versions.reverse[params[:version].to_i].reify.attributes.select{|k,v| @neuigkeit.translated_attribute_names.include? k.to_sym })
|
||||||
@neuigkeit=Neuigkeit.find(params[:id])
|
|
||||||
|
# @neuigkeit=Neuigkeit.find(params[:id])
|
||||||
end
|
end
|
||||||
@calentries1=@neuigkeit.calentries
|
@calentries1=@neuigkeit.calentries
|
||||||
|
|
||||||
@@ -15,7 +16,7 @@ class NeuigkeitenController < ApplicationController
|
|||||||
@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=>"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
|
||||||
@versions= @neuigkeit.versions.select([:created_at]).reverse
|
@versions= @neuigkeit.translation.versions.select([:created_at]).reverse
|
||||||
@toolbar_elements <<{:path=>rubrik_neuigkeit_path(@neuigkeit.rubrik,@neuigkeit),:method=>:versions,:versions=>@versions}
|
@toolbar_elements <<{:path=>rubrik_neuigkeit_path(@neuigkeit.rubrik,@neuigkeit),:method=>:versions,:versions=>@versions}
|
||||||
|
|
||||||
@toolbar_elements << {:hicon=>'icon-remove-circle', :text=> I18n.t('common.delete'),:path => rubrik_neuigkeit_path(@neuigkeit.rubrik,@neuigkeit), :method=> :delete,:confirm=>'Sure?' } if can? :delete, @neuigkeit
|
@toolbar_elements << {:hicon=>'icon-remove-circle', :text=> I18n.t('common.delete'),:path => rubrik_neuigkeit_path(@neuigkeit.rubrik,@neuigkeit), :method=> :delete,:confirm=>'Sure?' } if can? :delete, @neuigkeit
|
||||||
|
|||||||
@@ -19,7 +19,8 @@ class Neuigkeit < ActiveRecord::Base
|
|||||||
belongs_to :rubrik, :class_name =>'Rubrik', :foreign_key => "rubrik_id"
|
belongs_to :rubrik, :class_name =>'Rubrik', :foreign_key => "rubrik_id"
|
||||||
validates :rubrik, :presence=>true
|
validates :rubrik, :presence=>true
|
||||||
validates :author, :presence=>true
|
validates :author, :presence=>true
|
||||||
translates :title,:text, :versioning=>true, :fallbacks_for_empty_translations => true
|
translates :title,:text, :versioning=>{:gem=>:paper_trail, :options=>{:fallbacks_for_empty_translations => true}}
|
||||||
|
|
||||||
has_many :calentries, as: :object
|
has_many :calentries, as: :object
|
||||||
mount_uploader :picture, PictureUploader
|
mount_uploader :picture, PictureUploader
|
||||||
scope :published, -> {where("datum <= ? AND datum IS NOT NULL", Time.now.to_date).order(:datum).reverse_order}
|
scope :published, -> {where("datum <= ? AND datum IS NOT NULL", Time.now.to_date).order(:datum).reverse_order}
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ Fehlermeldungen auf GitHub melden.
|
|||||||
<p>
|
<p>
|
||||||
Bezüglich Design und Steuerung sind Vorschläge erwünscht.
|
Bezüglich Design und Steuerung sind Vorschläge erwünscht.
|
||||||
</p>
|
</p>
|
||||||
<p><%= link_to "Steuerelemente und Komponenten", "http://getbootst<rap.com/2.3.2/index.html" %></p>
|
<p><%= link_to "Steuerelemente und Komponenten", "http://getbootstrap.com/2.3.2/index.html" %></p>
|
||||||
<p>Um bei der Entwicklung mitzuhelfen braucht nur Ruby on Rails installiert werden</p>
|
<p>Um bei der Entwicklung mitzuhelfen braucht nur Ruby on Rails installiert werden</p>
|
||||||
<p><%= link_to "Getting Started" , home_startdev_path%></p>
|
<p><%= link_to "Getting Started" , home_startdev_path%></p>
|
||||||
<p> Das Kalender Feature wird überarbeitet, in Zukunft soll folgender Link nicht mehr funktionieren <%= link_to "Kalender", calendars_path %>
|
<p> Das Kalender Feature wird überarbeitet, in Zukunft soll folgender Link nicht mehr funktionieren <%= link_to "Kalender", calendars_path %>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
ThemesForRails.config do |config|
|
ThemesForRails.config do |config|
|
||||||
#
|
#
|
||||||
# If you have placed your themes like the example path above within the asset pipeline:
|
# If you have placed your themes like the example path above within the asset pipeline:
|
||||||
config.themes_dir = 'app/assets/themes'
|
config.themes_dir = 'app/views/themes'
|
||||||
config.assets_dir = 'app/assets/assets/themes/:name'
|
config.assets_dir = 'app/assets/assets/themes/:name'
|
||||||
config.views_dir = 'app/views/themes/:name'
|
config.views_dir = 'app/views/themes/:name'
|
||||||
config.use_sass=true
|
config.use_sass=true
|
||||||
|
|||||||
Reference in New Issue
Block a user