forked from bofh/fetsite
Interface fixes icons,colors
This commit is contained in:
@@ -31,21 +31,13 @@
|
|||||||
function insertAttachment(url,name) {
|
function insertAttachment(url,name) {
|
||||||
var ext = url.split('.').pop().toLowerCase();
|
var ext = url.split('.').pop().toLowerCase();
|
||||||
var img_ext = [ "jpg", "png", "bmp" , "jpeg" ];
|
var img_ext = [ "jpg", "png", "bmp" , "jpeg" ];
|
||||||
|
|
||||||
// if ( img_ext.indexOf(ext) > -1) {
|
|
||||||
// tinymce.activeEditor.setContent(tinymce.activeEditor.getContent({format : 'raw'}) + "<img src=\"" + url + "\" title=\"" + name + "\">");
|
|
||||||
// }
|
|
||||||
// else {
|
|
||||||
// tinymce.activeEditor.setContent(tinymce.activeEditor.getContent({format : 'raw'}) + "<a href=\"" + url + "\">" + name +"</a>");
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
if ( img_ext.indexOf(ext) > -1) {
|
if ( img_ext.indexOf(ext) > -1) {
|
||||||
tinymce.activeEditor.execCommand('mceInsertContent', false, "<img src=\"" + url + "\" title=\"" + name + "\">");
|
tinymce.activeEditor.execCommand('mceInsertContent', false, "<img src=\"" + url + "\" title=\"" + name + "\">");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
tinymce.activeEditor.execCommand('mceInsertContent', false, "<a href=\"" + url + "\">" + name +"</a>");
|
tinymce.activeEditor.execCommand('mceInsertContent', false, "<a href=\"" + url + "\">" + name +"</a>");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
function insertIcon_ffi1(name) {
|
||||||
|
tinymce.activeEditor.execCommand('mceInsertContent',false,'<span class="'+name+'"> </span> ')
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,9 +11,9 @@
|
|||||||
[class^="ffi1-"]:before, [class*=" ffi1-"]:before,
|
[class^="ffi1-"]:before, [class*=" ffi1-"]:before,
|
||||||
[class^="ffi1-"]:after, [class*=" ffi1-"]:after {
|
[class^="ffi1-"]:after, [class*=" ffi1-"]:after {
|
||||||
font-family: ffi1;
|
font-family: ffi1;
|
||||||
font-size: 20px;
|
font-style: normal;
|
||||||
font-style: normal;
|
margin-left: 4px;
|
||||||
margin-left: 20px;
|
font-weight:normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ffi1-academic:before {
|
.ffi1-academic:before {
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ a.linkbox:hover
|
|||||||
{
|
{
|
||||||
box-shadow: 1px 1px 2px 2px lightgray;
|
box-shadow: 1px 1px 2px 2px lightgray;
|
||||||
}
|
}
|
||||||
|
|
||||||
a.linkbox.color-1
|
a.linkbox.color-1
|
||||||
{
|
{
|
||||||
color:$color_schema_1;
|
color:$color_schema_1;
|
||||||
@@ -61,6 +62,47 @@ a.linkbox.color-5
|
|||||||
color:$color_schema_5;
|
color:$color_schema_5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
a.color-1-dark
|
||||||
|
{
|
||||||
|
color:$color_schema_1_dark;
|
||||||
|
}
|
||||||
|
a.color-2-dark
|
||||||
|
{
|
||||||
|
color:$color_schema_2_dark;
|
||||||
|
}
|
||||||
|
a.color-3-dark
|
||||||
|
{
|
||||||
|
color:$color_schema_3_dark;
|
||||||
|
}
|
||||||
|
a.color-4-dark
|
||||||
|
{
|
||||||
|
color:$color_schema_4_dark;
|
||||||
|
}
|
||||||
|
a.color-5-dark
|
||||||
|
{
|
||||||
|
color:$color_schema_5_dark;
|
||||||
|
}
|
||||||
|
a.color-1-dark:hover
|
||||||
|
{
|
||||||
|
color:$color_schema_1;
|
||||||
|
}
|
||||||
|
a.color-2-dark:hover
|
||||||
|
{
|
||||||
|
color:$color_schema_2;
|
||||||
|
}
|
||||||
|
a.color-3-dark:hover
|
||||||
|
{
|
||||||
|
color:$color_schema_3;
|
||||||
|
}
|
||||||
|
a.color-4-dark:hover
|
||||||
|
{
|
||||||
|
color:$color_schema_4;
|
||||||
|
}
|
||||||
|
a.color-5-dark:hover
|
||||||
|
{
|
||||||
|
color:$color_schema_5;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
a.linkbox li
|
a.linkbox li
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -24,7 +24,14 @@ $color_schema_3: #FF0021;
|
|||||||
$color_schema_4: #E8820C;
|
$color_schema_4: #E8820C;
|
||||||
$color_schema_5: #FFF30D;
|
$color_schema_5: #FFF30D;
|
||||||
|
|
||||||
$color_prim: #006599; //071672;
|
$color_schema_1_dark: darken($color_schema_1, 10%);
|
||||||
|
$color_schema_2_dark: darken($color_schema_2, 10%);
|
||||||
|
$color_schema_3_dark: darken($color_schema_3, 10%);
|
||||||
|
$color_schema_4_dark: darken($color_schema_4, 10%);
|
||||||
|
$color_schema_5_dark: darken($color_schema_5, 10%);
|
||||||
|
|
||||||
|
$color_prim: $color_schema_1_dark; // #006599; //071672;
|
||||||
|
|
||||||
$color_prim_light: lighten($color_prim ,10%);
|
$color_prim_light: lighten($color_prim ,10%);
|
||||||
$color_prim_vlight: lighten($color_prim ,30%);
|
$color_prim_vlight: lighten($color_prim ,30%);
|
||||||
$color_prim_dark: darken($color_prim ,10%);
|
$color_prim_dark: darken($color_prim ,10%);
|
||||||
@@ -33,6 +40,7 @@ $color_prim_vdark: darken($color_prim ,30%);
|
|||||||
$color_cont: $color_schema_3;
|
$color_cont: $color_schema_3;
|
||||||
$color_cont_light:lighten($color_cont ,10%);
|
$color_cont_light:lighten($color_cont ,10%);
|
||||||
$linkColor: $color_prim;
|
$linkColor: $color_prim;
|
||||||
|
$linkColorHover: $color_schema_1;
|
||||||
$white: #FFFFFF;
|
$white: #FFFFFF;
|
||||||
|
|
||||||
$bodyBackground: #EEE;
|
$bodyBackground: #EEE;
|
||||||
@@ -43,7 +51,7 @@ $bodyBackground: #EEE;
|
|||||||
$navbarBackground: #EEE;//$color_prim;
|
$navbarBackground: #EEE;//$color_prim;
|
||||||
$navbarText: $color_prim;
|
$navbarText: $color_prim;
|
||||||
$navbarLinkColor: $color_prim;
|
$navbarLinkColor: $color_prim;
|
||||||
$navbarLinkColorHover: $color_prim_dark;
|
$navbarLinkColorHover: $color_schema_1;
|
||||||
$dropdownLinkColor: black;
|
$dropdownLinkColor: black;
|
||||||
$navbar-default-brand-color: black;
|
$navbar-default-brand-color: black;
|
||||||
$navbarBrandColor:black;
|
$navbarBrandColor:black;
|
||||||
|
|||||||
@@ -17,6 +17,20 @@
|
|||||||
* require 'neuigkeiten'
|
* require 'neuigkeiten'
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
$color_schema_1: #006599;
|
||||||
|
$color_schema_2: #630CE8;
|
||||||
|
$color_schema_3: #FF0021;
|
||||||
|
$color_schema_4: #E8820C;
|
||||||
|
$color_schema_5: #FFF30D;
|
||||||
|
|
||||||
|
$color_schema_1_dark: darken($color_schema_1, 30%);
|
||||||
|
$color_schema_2_dark: darken($color_schema_2, 30%);
|
||||||
|
$color_schema_3_dark: darken($color_schema_3, 30%);
|
||||||
|
$color_schema_4_dark: darken($color_schema_4, 30%);
|
||||||
|
$color_schema_5_dark: darken($color_schema_5, 30%);
|
||||||
|
|
||||||
|
|
||||||
$color_prim: #0A64A4;
|
$color_prim: #0A64A4;
|
||||||
$color_prim_light: #0B65A5;
|
$color_prim_light: #0B65A5;
|
||||||
$color_prim_vlight: #2B85C5;
|
$color_prim_vlight: #2B85C5;
|
||||||
|
|||||||
@@ -14,4 +14,6 @@ i.fa-red { color:red; }
|
|||||||
color: red;
|
color: red;
|
||||||
font-weight:bold;
|
font-weight:bold;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@import 'flatfeticon1'
|
||||||
@@ -85,7 +85,17 @@ class GremienController < ApplicationController
|
|||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
if @gremium.update_attributes(params[:gremium])
|
if @gremium.update_attributes(params[:gremium])
|
||||||
format.html { redirect_to @gremium, notice: 'Gremium was successfully updated.' }
|
format.html {
|
||||||
|
unless params[:button]=="continue" || params[:commit]=="continue"
|
||||||
|
redirect_to @gremium, notice: 'Gremium was successfully updated.'
|
||||||
|
else
|
||||||
|
@memberships=@gremium.memberships.order(:typ)
|
||||||
|
@memberships<< Membership.new
|
||||||
|
@memberships<< Membership.new
|
||||||
|
@memberships<< Membership.new
|
||||||
|
render action: "edit", notice: 'gremium was successfully updated.'
|
||||||
|
|
||||||
|
}
|
||||||
format.json { head :no_content }
|
format.json { head :no_content }
|
||||||
else
|
else
|
||||||
format.html { render action: "edit" }
|
format.html { render action: "edit" }
|
||||||
|
|||||||
@@ -11,11 +11,23 @@ module ApplicationHelper
|
|||||||
def ffi1_icon (name)
|
def ffi1_icon (name)
|
||||||
content_tag("i","", class: "ffi1-"+name )
|
content_tag("i","", class: "ffi1-"+name )
|
||||||
end
|
end
|
||||||
|
def ff_icon (name)
|
||||||
|
content_tag("i","", class: name )
|
||||||
|
end
|
||||||
|
|
||||||
def ffi1_list
|
def ffi1_list
|
||||||
y=YAML.load_file("#{::Rails.root.to_s}/config/flatfeticon1.yml")
|
y=YAML.load_file("#{::Rails.root.to_s}/config/flatfeticon1.yml")
|
||||||
y["ffi1"]
|
y["ffi1"]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def tinymce_icon_choice
|
||||||
|
s=""
|
||||||
|
ffi1_list.each do |i|
|
||||||
|
s=s+'<a onclick="insertIcon_ffi1(\'ffi1-'+i+'\')">'+ffi1_icon(i)+'</a>'
|
||||||
|
end
|
||||||
|
raw(s)
|
||||||
|
end
|
||||||
|
|
||||||
def toolbar_html(elemente)
|
def toolbar_html(elemente)
|
||||||
html = ""
|
html = ""
|
||||||
limiter = " | "
|
limiter = " | "
|
||||||
|
|||||||
@@ -63,7 +63,14 @@ class Ability
|
|||||||
can [:delete],Calentry
|
can [:delete],Calentry
|
||||||
can :doadmin, User
|
can :doadmin, User
|
||||||
end
|
end
|
||||||
|
unless user.has_role?("fetadmin")
|
||||||
|
cannot :delete, Modulgruppe
|
||||||
|
cannot :delete, Rubrik
|
||||||
|
cannot :delete, Themengruppe
|
||||||
|
cannot :delete, Fetprofile
|
||||||
|
cannot :delete, Studium
|
||||||
|
cannot :delete, Modul
|
||||||
|
end
|
||||||
# Rechteverwaltung fuer Neuigkeiten
|
# Rechteverwaltung fuer Neuigkeiten
|
||||||
|
|
||||||
# can :write, Neuigkeit if user.has_role?("newsmoderator", Neuigkeit.rubrik)
|
# can :write, Neuigkeit if user.has_role?("newsmoderator", Neuigkeit.rubrik)
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
class Gremium < ActiveRecord::Base
|
class Gremium < ActiveRecord::Base
|
||||||
TYPEN={1=>"offiziell", 2=>"offiziell-temporär", 3 => "inoffiziell",4=>"inoffiziell-tempo", 11=> "berufungskommission",12=> "habilitationskommission" } # Kategorien, im Wesentlichen wichtig für Listung oder nicht Listung
|
TYPEN={1=>"offiziell", 2=>"offiziell-notab", 3 => "inoffiziell",4=>"inoffiziell-notab", 11=> "berufungskommission",12=> "habilitationskommission" } # Kategorien, im Wesentlichen wichtig für Listung oder nicht Listung
|
||||||
GESCHLECHT={0=>"saechlich", 1 => "maennlich", 2 => "weiblich"} # Geschlecht des Gremiums zur richtige Deklination
|
GESCHLECHT={0=>"saechlich", 1 => "maennlich", 2 => "weiblich"} # Geschlecht des Gremiums zur richtige Deklination
|
||||||
ART2FALL={0=>"des", 1=>"des",2=>"der"} # Artikel 2.Fall abhängig vom Geschlecht
|
ART2FALL={0=>"des", 1=>"des",2=>"der"} # Artikel 2.Fall abhängig vom Geschlecht
|
||||||
ART4FALL={0=>"das", 1=>"den",2=>"die"} # Artikel 2.Fall abhängig vom Geschlecht
|
ART4FALL={0=>"das", 1=>"den",2=>"die"} # Artikel 2.Fall abhängig vom Geschlecht
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
class Rubrik < ActiveRecord::Base
|
class Rubrik < ActiveRecord::Base
|
||||||
attr_accessible :desc, :name, :prio, :calendar, :public
|
attr_accessible :desc, :name, :prio, :calendar, :public, :icon, :color
|
||||||
has_many :neuigkeiten, :class_name => "Neuigkeit"
|
has_many :neuigkeiten, :class_name => "Neuigkeit"
|
||||||
has_many :published, :class_name => "Neuigkeit", :conditions=>["Neuigkeit.published"]
|
has_many :published, :class_name => "Neuigkeit", :conditions=>["Neuigkeit.published"]
|
||||||
has_many :calentries, :through => :neuigkeiten, :as=>:object
|
has_many :calentries, :through => :neuigkeiten, :as=>:object
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
class Themengruppe < ActiveRecord::Base
|
class Themengruppe < ActiveRecord::Base
|
||||||
WORD_COUNT = 50
|
WORD_COUNT = 50
|
||||||
attr_accessible :text, :title, :picture, :priority, :public
|
attr_accessible :text, :title, :picture, :priority, :public, :icon
|
||||||
has_many :themen, class_name: 'Thema'
|
has_many :themen, class_name: 'Thema'
|
||||||
has_many :fragen, through: :themen
|
has_many :fragen, through: :themen
|
||||||
|
|
||||||
|
|||||||
@@ -67,8 +67,8 @@
|
|||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="span12">
|
<div class="span12">
|
||||||
<%= f.actions do %>
|
<%= f.actions do %>
|
||||||
<%= f.action :submit, :as => :input , :label=>I18n.t("common.save") %>
|
<%= f.action :submit, :as => :button, :label=>I18n.t("common.save") %>
|
||||||
<%= f.action :submit, :as => :input , :label=>I18n.t("common.savecont"), :button_html=>{value: "continue"} %>
|
<%= f.action :submit, :as => :button, :label=>I18n.t("common.savecont"), :button_html=>{value: "continue"} %>
|
||||||
<%= f.action :cancel, :as=> :link , :label=>I18n.t("common.cancel") %>
|
<%= f.action :cancel, :as=> :link , :label=>I18n.t("common.cancel") %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -5,9 +5,6 @@
|
|||||||
<%= f.input :typ, :as => :select, :collection => Gremium::TYPEN.invert %>
|
<%= f.input :typ, :as => :select, :collection => Gremium::TYPEN.invert %>
|
||||||
<%= f.input :geschlecht, :as => :select, :collection => Gremium::GESCHLECHT.invert %>
|
<%= f.input :geschlecht, :as => :select, :collection => Gremium::GESCHLECHT.invert %>
|
||||||
<%= f.input :thema, :as=> :select, :collection => Thema.all %>
|
<%= f.input :thema, :as=> :select, :collection => Thema.all %>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<% @memberships.each do |m| %>
|
<% @memberships.each do |m| %>
|
||||||
<%= f.semantic_fields_for :memberships, m do |memberships_attributes| %>
|
<%= f.semantic_fields_for :memberships, m do |memberships_attributes| %>
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
@@ -33,6 +30,9 @@
|
|||||||
|
|
||||||
<%= f.actions do %>
|
<%= f.actions do %>
|
||||||
<%= f.action :submit, :as => :input %>
|
<%= f.action :submit, :as => :input %>
|
||||||
|
<%= f.action :submit, :as => :button, :label=>I18n.t("common.savecont"), :button_html=>{value: "continue"} %>
|
||||||
|
<%= f.action :cancel, :as=> :link , :label=>I18n.t("common.cancel") %>
|
||||||
|
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<script>$('.datepicker').datepicker()</script>
|
<script>$('.datepicker').datepicker()</script>
|
||||||
|
|||||||
@@ -4,11 +4,10 @@
|
|||||||
<% @gremien.each do |gremium| %>
|
<% @gremien.each do |gremium| %>
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="span2">
|
<div class="span2">
|
||||||
<%= gremium.typ %>
|
<%= Gremium::TYPEN[gremium.typ.to_i] %>
|
||||||
</div>
|
</div>
|
||||||
<div class="span8">
|
<div class="span8">
|
||||||
<b><%= gremium.name %></b>
|
<b><%= gremium.name %></b>
|
||||||
<%= gremium.desc %>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="span2">
|
<div class="span2">
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
@@ -18,10 +17,9 @@
|
|||||||
<span class="caret"></span>
|
<span class="caret"></span>
|
||||||
</button>
|
</button>
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li>
|
<li><%= link_to 'Show', gremium %></li>
|
||||||
<%= link_to 'Show', gremium %></li>
|
<li><%= link_to 'Edit', edit_gremium_path(gremium) %></li>
|
||||||
<li> <%= link_to 'Edit', edit_gremium_path(gremium) %></li>
|
<li><%= link_to 'Destroy', gremium, method: :delete, data: { confirm: 'Are you sure?' }, class:"btn-danger" %>
|
||||||
<li> <%= link_to 'Destroy', gremium, method: :delete, data: { confirm: 'Are you sure?' }, class:"btn-danger" %>
|
|
||||||
</li> </ul>
|
</li> </ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="media-body">
|
<div class="media-body">
|
||||||
<div>
|
<div>
|
||||||
<small><%= neuigkeit.rubrik.name %></small>
|
<small><%= ff_icon(neuigkeit.rubrik.icon) unless neuigkeit.rubrik.icon.nil? or neuigkeit.rubrik.icon.empty? %> <%= neuigkeit.rubrik.name %></small>
|
||||||
<small class="pull-right"> <%= I18n.t("neuigkeit.am")+" "+ I18n.l(neuigkeit.try(:datum).try(:to_date)) unless neuigkeit.try(:datum).try(:to_date).nil? %></small>
|
<small class="pull-right"> <%= I18n.t("neuigkeit.am")+" "+ I18n.l(neuigkeit.try(:datum).try(:to_date)) unless neuigkeit.try(:datum).try(:to_date).nil? %></small>
|
||||||
</div>
|
</div>
|
||||||
<h1>
|
<h1>
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
|
<% c =[:linkbox] %>
|
||||||
<%= link_to [neuigkeit.rubrik,neuigkeit], {class: :linkbox} do %>
|
<% c << "color-"+neuigkeit.rubrik.color.to_s+"-dark" unless neuigkeit.rubrik.color.nil? %>
|
||||||
|
<%= link_to [neuigkeit.rubrik,neuigkeit], {class: c} do %>
|
||||||
<%= render :partial=>"neuigkeiten/compact",:locals=> {:neuigkeit=> neuigkeit} %>
|
<%= render :partial=>"neuigkeiten/compact",:locals=> {:neuigkeit=> neuigkeit} %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<p id="notice"><%= notice %></p>
|
<p id="notice"><%= notice %></p>
|
||||||
<div class="contentbox">
|
<div class="contentbox">
|
||||||
<span>
|
<span>
|
||||||
<%= @neuigkeit.rubrik.name %>
|
<%= ff_icon(@neuigkeit.rubrik.icon) unless @neuigkeit.rubrik.icon.nil? or @neuigkeit.rubrik.icon.empty? %> <%= @neuigkeit.rubrik.name %>
|
||||||
</span>
|
</span>
|
||||||
<span class="pull-right">
|
<span class="pull-right">
|
||||||
<%= @neuigkeit.author.email.to_s unless @neuigkeit.try(:author).try(:email).to_s %>
|
<%= @neuigkeit.author.email.to_s unless @neuigkeit.try(:author).try(:email).to_s %>
|
||||||
|
|||||||
@@ -3,8 +3,10 @@
|
|||||||
<%= f.input :name %>
|
<%= f.input :name %>
|
||||||
<%= f.input :desc %>
|
<%= f.input :desc %>
|
||||||
<%= f.input :prio %>
|
<%= f.input :prio %>
|
||||||
|
<%= f.input :color ,:as=>:radio,:collection=>{raw('<a class="color-1-dark">color1</a>')=>1, raw('<a class="color-2-dark">color2</a>')=>2, raw('<a class="color-3-dark">color3</a>')=>3, raw('<a class="color-4-dark">color4</a>')=>4, raw('<a class="color-5-dark">color5</a>')=>5} %>
|
||||||
<%= f.input :public %>
|
<%= f.input :public %>
|
||||||
|
<%= f.input :icon , :input_html=>{:id=>"iconfield"}%>
|
||||||
|
<i id="icon"></i>
|
||||||
|
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
@@ -12,3 +14,13 @@
|
|||||||
<%= f.action :submit, :as => :input %>
|
<%= f.action :submit, :as => :input %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<script>
|
||||||
|
$(document).ready(function(){
|
||||||
|
$('#iconfield').on('change', function(){$('#icon').attr("class",$(this).val())})});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<% ffi1_list.each do |i| %>
|
||||||
|
<a onclick="$('#iconfield').val('ffi1-<%= i %>');$('#icon').attr('class','ffi1-<%= i %>')" href="#"><%=ffi1_icon(i)%>
|
||||||
|
</a>
|
||||||
|
<% end %>
|
||||||
|
|||||||
@@ -44,6 +44,7 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
<% end %><% end %>
|
<% end %><% end %>
|
||||||
<%= tinymce %>
|
<%= tinymce %>
|
||||||
|
<%= tinymce_icon_choice %>
|
||||||
<h2>Attachments:</h2>
|
<h2>Attachments:</h2>
|
||||||
<%= render :partial => "themen/select", :object => @thema,:locals =>{ :editor => :true} %>
|
<%= render :partial => "themen/select", :object => @thema,:locals =>{ :editor => :true} %>
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,8 @@
|
|||||||
<%= f.input :public %>
|
<%= f.input :public %>
|
||||||
<%= f.input :picture, :as => :file %>
|
<%= f.input :picture, :as => :file %>
|
||||||
<%= f.input :text %>
|
<%= f.input :text %>
|
||||||
|
<%= f.input :icon , :input_html=>{:id=>"iconfield"}%>
|
||||||
|
<i id="icon"></i>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<%= f.actions do %>
|
<%= f.actions do %>
|
||||||
@@ -13,3 +14,13 @@
|
|||||||
<%= f.action :cancel,:label => I18n.t("common.back"), :as => :link %>
|
<%= f.action :cancel,:label => I18n.t("common.back"), :as => :link %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<script>
|
||||||
|
$(document).ready(function(){
|
||||||
|
$('#iconfield').on('change', function(){$('#icon').attr("class",$(this).val())})});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<% ffi1_list.each do |i| %>
|
||||||
|
<a onclick="$('#iconfield').val('ffi1-<%= i %>');$('#icon').attr('class','ffi1-<%= i %>')" href="#"><%=ffi1_icon(i)%>
|
||||||
|
</a>
|
||||||
|
<% end %>
|
||||||
|
|||||||
@@ -1,13 +1,21 @@
|
|||||||
<%= link_to themengruppe,{:class=>'linkbox color-4'} do %>
|
<%= link_to themengruppe,{:class=>'linkbox color-4-dark'} do %>
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="span12">
|
<div class="span12">
|
||||||
<div class="media">
|
<div class="media">
|
||||||
<span class="pull-left">
|
<span class="pull-left">
|
||||||
|
<% if themengruppe.icon.nil? or themengruppe.icon.empty? %>
|
||||||
<%= image_tag themengruppe.picture.thumb.url,{:class=>"img-rounded"} %>
|
<%= image_tag themengruppe.picture.thumb.url,{:class=>"img-rounded"} %>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
</span>
|
</span>
|
||||||
<div class="media-body">
|
<div class="media-body">
|
||||||
<h3><%=themengruppe.title%> </h3>
|
<h3>
|
||||||
|
<% unless themengruppe.icon.nil? or themengruppe.icon.empty? %> <i class="<%= themengruppe.icon %>" style="font-size:1.5em;margin:0"></i>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<%=themengruppe.title%> </h3>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -10,7 +10,9 @@
|
|||||||
</ul>
|
</ul>
|
||||||
<%= render :partial=>'layouts/pretty_toolbar' %>
|
<%= render :partial=>'layouts/pretty_toolbar' %>
|
||||||
|
|
||||||
<h1><%= @themengruppe.title %></h1>
|
<h1> <% unless @themengruppe.icon.nil? or @themengruppe.icon.empty? %> <i class="<%= @themengruppe.icon %>" style="font-size:1.5em;margin:0"></i>
|
||||||
|
<% end %>
|
||||||
|
<%= @themengruppe.title %></h1>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<%= @themengruppe.text %>
|
<%= @themengruppe.text %>
|
||||||
|
|||||||
@@ -6,9 +6,6 @@
|
|||||||
|
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<% ffi1_list.each do |i| %>
|
|
||||||
<%= ffi1_icon i %>
|
|
||||||
<% end %>
|
|
||||||
<%= ffi1_icon "academic" %><%= link_to I18n.t('home.login'), user_omniauth_authorize_path(:ldap) %>
|
<%= ffi1_icon "academic" %><%= link_to I18n.t('home.login'), user_omniauth_authorize_path(:ldap) %>
|
||||||
</p>
|
</p>
|
||||||
<div class="alert">
|
<div class="alert">
|
||||||
|
|||||||
@@ -26,6 +26,6 @@ toolbar:
|
|||||||
- styleselect | bold boldred_btn italic forecolor | list link image table | undo redo | fullscreen code
|
- styleselect | bold boldred_btn italic forecolor | list link image table | undo redo | fullscreen code
|
||||||
formats:
|
formats:
|
||||||
boldred: {selector: "p",block: "p", classes: "mc-important"}
|
boldred: {selector: "p",block: "p", classes: "mc-important"}
|
||||||
#setup: function(ed) {
|
setup: function(ed) {
|
||||||
# ed.addButton('boldred_btn', {title:'Bold-Red',icon:"fa fa-red fa-bold", onclick:function() {ed.focus();ed.formatter.toggle('boldred'); }});
|
ed.addButton('boldred_btn', {title:'Bold-Red',icon:"fa fa-red fa-bold", onclick:function() {ed.focus();ed.formatter.toggle('boldred'); }});
|
||||||
# }
|
}
|
||||||
|
|||||||
8
db/migrate/20140707161951_add_icon.rb
Normal file
8
db/migrate/20140707161951_add_icon.rb
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
class AddIcon < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
add_column :themengruppen, :icon, :string
|
||||||
|
add_column :rubriken, :icon, :string
|
||||||
|
add_column :themen, :icon, :string
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
6
db/migrate/20140708181055_add_color.rb
Normal file
6
db/migrate/20140708181055_add_color.rb
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
class AddColor < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
add_column :rubriken, :color, :integer
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
Reference in New Issue
Block a user