forked from bofh/fetsite
Merge branch 'master' of https://github.com/fetsite/fetsite
Conflicts: Gemfile.lock
This commit is contained in:
1
Gemfile
1
Gemfile
@@ -93,3 +93,4 @@ gem "seed_dump", "~> 0.5.3"
|
||||
#gem "themes_for_rails" ,:git =>'git://github.com/tkriplean/themes_for_rails.git'
|
||||
#gem "themes_for_rails", :git=> 'git://github.com/lucasefe/themes_for_rails.git'
|
||||
gem 'themes_for_rails'
|
||||
gem 'remotipart', :git =>'git://github.com/JangoSteve/remotipart.git'
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
GIT
|
||||
remote: git://github.com/JangoSteve/remotipart.git
|
||||
revision: aadc29e996c35096ee971bdc6cbf7ab148077a3a
|
||||
specs:
|
||||
remotipart (1.2.1)
|
||||
|
||||
GIT
|
||||
remote: git://github.com/airblade/paper_trail.git
|
||||
revision: 802b7d4ead71703860fcb9befc2c9b2ee05a8b9f
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//= require bootstrap/load-image.min
|
||||
//= require bootstrap/image-gallery.min
|
||||
//= require jquery-fileupload
|
||||
|
||||
//= require jquery.remotipart
|
||||
function insertAttachment(url,name) {
|
||||
var ext = url.split('.').pop().toLowerCase();
|
||||
var img_ext = [ "jpg", "png", "bmp" , "jpeg" ];
|
||||
|
||||
@@ -32,10 +32,11 @@ class AttachmentsController < ApplicationController
|
||||
respond_to do |format|
|
||||
format.html # new.html.erb
|
||||
format.json { render json: @attachment }
|
||||
format.js
|
||||
end
|
||||
end
|
||||
|
||||
# GET /attachments/1/edit
|
||||
# GET /attachments/1/edit
|
||||
def edit
|
||||
@attachment = Attachment.find(params[:id])
|
||||
@thema = @attachment.thema
|
||||
@@ -46,15 +47,18 @@ class AttachmentsController < ApplicationController
|
||||
def create
|
||||
@attachment = Attachment.new(params[:attachment])
|
||||
@thema = Thema.find(params[:thema_id])
|
||||
@attachment.thema_id = @thema.id
|
||||
|
||||
@attachment.thema_id = @thema.id
|
||||
@action="create"
|
||||
logger.info "#{@attachment.inspect}"
|
||||
respond_to do |format|
|
||||
if @attachment.save
|
||||
format.html { redirect_to @thema, notice: 'Attachment was successfully created.' }
|
||||
format.json { render json: @thema, status: :created, location: @thema }
|
||||
format.js { }
|
||||
else
|
||||
format.html { render action: "new" }
|
||||
format.json { render json: @attachment.errors, status: :unprocessable_entity }
|
||||
format.js { render action: "new.js.erb"}
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -69,9 +73,11 @@ class AttachmentsController < ApplicationController
|
||||
if @attachment.update_attributes(params[:attachment])
|
||||
format.html { redirect_to @thema, notice: 'Attachment was successfully updated.' }
|
||||
format.json { head :no_content }
|
||||
format.js {@attachment=Attachment.new; render action:"create"}
|
||||
else
|
||||
format.html { render action: "edit" }
|
||||
format.json { render json: @attachment.errors, status: :unprocessable_entity }
|
||||
format.js { render action: "new"}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -43,15 +43,29 @@ class BeispieleController < ApplicationController
|
||||
# POST /beispiele
|
||||
# POST /beispiele.json
|
||||
def create
|
||||
logger.info "Creating Beispiel..."
|
||||
@lva = Lva.find_by_id(params[:lva_id])
|
||||
params.delete(:lva_id)
|
||||
@beispiel = Beispiel.new(params[:beispiel])
|
||||
@backlink = @beispiel.lva.nil? ? root_url : lva_path(@beispiel.lva)
|
||||
@beispiel.lva=@lva
|
||||
logger.info "New Beispiel: #{params.inspect}"
|
||||
|
||||
# @backlink = @beispiel.lva.nil? ? root_url : lva_path(@beispiel.lva)
|
||||
@beispiel.name=@beispiel.beispieldatei.filename
|
||||
logger.info "New Beispiel: #{@beispiel.attributes.inspect}"
|
||||
|
||||
@beispiel.datum=Time.now
|
||||
respond_to do |format|
|
||||
@beispiel.name=@beispiel.beispieldatei.to_s.split('/').last
|
||||
|
||||
if @beispiel.save
|
||||
format.html { redirect_to @backlink, notice: 'Beispiel was successfully created.' }
|
||||
format.json { render json: @beispiel, status: :created, location: @beispiel }
|
||||
format.html {
|
||||
render :json => [@beispiel.to_jq_upload].to_json,
|
||||
:content_type => 'text/html',
|
||||
:layout => false
|
||||
}
|
||||
format.json { render json: {files: [@beispiel.to_jq_upload]}, status: :created, location: [@lva, @beispiel] }
|
||||
# format.html { redirect_to @backlink, notice: 'Beispiel was successfully created.' }
|
||||
# format.json { render json: @beispiel, status: :created, location: @beispiel }
|
||||
else
|
||||
format.html { render action: "new" }
|
||||
format.json { render json: @beispiel.errors, status: :unprocessable_entity }
|
||||
|
||||
@@ -31,28 +31,34 @@ class FragenController < ApplicationController
|
||||
respond_to do |format|
|
||||
format.html
|
||||
format.json { render json: @frage }
|
||||
format.js
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
# GET /fragen/1/edit
|
||||
def edit
|
||||
@frage = Frage.find(params[:id])
|
||||
respond_to do |format|
|
||||
format.html
|
||||
format.js {render action: :new}
|
||||
end
|
||||
end
|
||||
|
||||
# POST /fragen
|
||||
# POST /fragen.json
|
||||
def create
|
||||
@frage = Frage.new(params[:frage])
|
||||
thema=@frage.thema
|
||||
@fragen=@frage.thema.fragen
|
||||
respond_to do |format|
|
||||
if @frage.save
|
||||
format.html { redirect_to @frage.thema, notice: 'Frage was successfully created.' }
|
||||
format.json { render json: @frage, status: :created, location: @frage }
|
||||
format.js
|
||||
format.js {@frage=Frage.new ; @frage.thema=thema}
|
||||
else
|
||||
format.html { render action: "new" }
|
||||
format.json { render json: @frage.errors, status: :unprocessable_entity }
|
||||
format.js
|
||||
format.js
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -66,9 +72,11 @@ class FragenController < ApplicationController
|
||||
if @frage.update_attributes(params[:frage])
|
||||
format.html { redirect_to @frage, notice: 'Frage was successfully updated.' }
|
||||
format.json { head :no_content }
|
||||
format.js {@frage=Frage.new; render action: "new"}
|
||||
else
|
||||
format.html { render action: "edit" }
|
||||
format.json { render json: @frage.errors, status: :unprocessable_entity }
|
||||
format.js {render action: "edit"}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
class HomeController < ApplicationController
|
||||
def index
|
||||
@beispiele = Beispiel.last([Beispiel.count, 3].min)
|
||||
@neuigkeiten = Neuigkeit.recent
|
||||
|
||||
end
|
||||
def dev
|
||||
|
||||
|
||||
@@ -34,12 +34,17 @@ class ThemenController < ApplicationController
|
||||
respond_to do |format|
|
||||
format.html # new.html.erb
|
||||
format.json { render json: @thema }
|
||||
format.js { render action: "edit" }
|
||||
end
|
||||
end
|
||||
|
||||
# GET /themen/1/edit
|
||||
def edit
|
||||
@thema = Thema.find(params[:id])
|
||||
respond_to do |format|
|
||||
format.html
|
||||
format.js
|
||||
end
|
||||
end
|
||||
|
||||
# POST /themen
|
||||
@@ -57,7 +62,13 @@ class ThemenController < ApplicationController
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def fragen
|
||||
@thema = Thema.find(params[:thema_id])
|
||||
@fragen=@thema.fragen
|
||||
respond_to do |format|
|
||||
format.js
|
||||
end
|
||||
end
|
||||
# PUT /themen/1
|
||||
# PUT /themen/1.json
|
||||
def update
|
||||
@@ -67,9 +78,11 @@ class ThemenController < ApplicationController
|
||||
if @thema.update_attributes(params[:thema])
|
||||
format.html { redirect_to @thema, notice: 'Thema was successfully updated.' }
|
||||
format.json { head :no_content }
|
||||
format.js
|
||||
else
|
||||
format.html { render action: "edit" }
|
||||
format.json { render json: @thema.errors, status: :unprocessable_entity }
|
||||
format.js { render action: "edit" }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -15,11 +15,22 @@ class Beispiel < ActiveRecord::Base
|
||||
has_paper_trail
|
||||
attr_accessible :desc, :name, :lva_id, :beispieldatei, :beispieldatei_cache, :datum
|
||||
belongs_to :lva
|
||||
mount_uploader :beispieldatei, BeispieldateiUploader
|
||||
mount_uploader :beispieldatei, AttachmentUploader
|
||||
validates :beispieldatei, :presence => true
|
||||
validates :name, :presence => true
|
||||
validates :lva_id, :presence => true
|
||||
validates :lva, :presence => true
|
||||
validates :datum, :presence => true
|
||||
|
||||
def to_jq_upload
|
||||
{
|
||||
"id" => read_attribute(:id),
|
||||
"title" => read_attribute(:title),
|
||||
"description" => read_attribute(:desc),
|
||||
"name" => read_attribute(:title),
|
||||
"size" => beispieldatei.size,
|
||||
"url" => beispieldatei.url,
|
||||
"thumbnail_url" => beispieldatei.thumb.url,
|
||||
"delete_type" => "DELETE"
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
@@ -21,7 +21,8 @@ class Calentry < ActiveRecord::Base
|
||||
validates :typ, :presence => true
|
||||
before_save :get_public
|
||||
belongs_to :object, polymorphic: true # Objekt zu dem der Calentry gehört (derzeit ein Newsartikel)
|
||||
|
||||
scope :upcoming, ->{ where("start >= ?", Time.now).order(:start)}
|
||||
scope :recent,-> { where("start <= ?", Time.now).order(:start).reverse_order}
|
||||
validate do |entry|
|
||||
if entry.ende.nil?
|
||||
errors.add(:ende, "Es muss ein Endzeitpunkt vorhanden sein")
|
||||
@@ -61,5 +62,5 @@ def text
|
||||
I18n.l(self.start) +" bis "+ I18n.l(self.ende)
|
||||
end
|
||||
scope :public, -> { where(:public => :true) }
|
||||
scope :upcoming, -> { where("start >= ?" , Time.now).where("start <= ?", 28.days.from_now) }
|
||||
# scope :upcoming, -> { where("start >= ?" , Time.now).where("start <= ?", 28.days.from_now) }
|
||||
end
|
||||
|
||||
12
app/views/attachments/_rform.html.erb
Normal file
12
app/views/attachments/_rform.html.erb
Normal file
@@ -0,0 +1,12 @@
|
||||
<%= semantic_form_for [@thema,@attachment], :remote=>true do |f| %>
|
||||
<%= f.inputs do %>
|
||||
<%= f.input :name %>
|
||||
|
||||
<%= token_tag form_authenticity_token %>
|
||||
<%= f.input :datei, :as => :file %>
|
||||
<% end %>
|
||||
|
||||
<%= f.actions do %>
|
||||
<%= f.action :submit, :as => :input %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
2
app/views/attachments/create.js.erb
Normal file
2
app/views/attachments/create.js.erb
Normal file
@@ -0,0 +1,2 @@
|
||||
alert('create_attachment');
|
||||
$("#attachmentform").html("<%=escape_javascript( render :partial=>'attachments/rform' )%>");
|
||||
4
app/views/attachments/new.js.erb
Normal file
4
app/views/attachments/new.js.erb
Normal file
@@ -0,0 +1,4 @@
|
||||
alert('new.js.erb')
|
||||
$("#attachmentform").html("<%=escape_javascript( render :partial=>'attachments/rform' )+ @action.to_s%>");
|
||||
$('document').trigger('ready');
|
||||
alert('ready')
|
||||
@@ -1,5 +1,6 @@
|
||||
|
||||
<div class="container">
|
||||
<%= semantic_form_for [@lva, @beispiel], :remote=>true, :html => { :multipart => true, :id => "fileupload" } do |f| %>
|
||||
<%= semantic_form_for [@lva,@beispiel], :remote=>true, :html => { :multipart => true, :id => "fileupload" } do |f| %>
|
||||
<!-- The fileupload-buttonbar contains buttons to add/delete files and start/cancel the upload -->
|
||||
<div class="row ">
|
||||
|
||||
@@ -10,7 +11,7 @@
|
||||
<i class="icon-plus icon-white"></i>
|
||||
<span>Add files...</span>
|
||||
<%= f.file_field :beispieldatei, :multiple=>true %>
|
||||
<%= f.input :lva %>
|
||||
<% f.input :lva %>
|
||||
</span>
|
||||
<button type="submit" class="btn btn-primary start">
|
||||
<i class="icon-upload icon-white"></i>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<ul>
|
||||
<% @memberships.each do |m| %>
|
||||
<li>
|
||||
<%= render m %>
|
||||
<%= link_to m.gremium do %> <%= render m %><% end %>
|
||||
<%= link_to I18n.t('common.edit'), edit_fetprofile_membership_path(@fetprofile,m) if params["verwalten"] && can?(:edit, m)%>
|
||||
<%= link_to I18n.t('common.delete'), [@fetprofile, m], method: :delete, data: {confirm: I18n.t('common.sure_del')} if params["verwalten"] && can?(:delete, m ) %>
|
||||
</li>
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
<%= raw(frage.text) %>
|
||||
<br/>
|
||||
|
||||
<%= link_to 'Edit', edit_frage_path(frage) %> |
|
||||
<%= link_to 'Edit', edit_frage_path(frage),:remote=>true %> |
|
||||
<%= link_to 'Destroy',frage, method: :delete, :remote=> true , data: { confirm: 'Are you sure?' } %>
|
||||
</p>
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
$("#fragen").html("<%=escape_javascript( render :partial=>'fragen/liste' )%>")
|
||||
$("#fragen").html("<%=escape_javascript( render :partial=>'fragen/liste' )%>")
|
||||
$("#fragenform").html("<%=escape_javascript( render :partial=>'fragen/rform' )%>")
|
||||
1
app/views/fragen/new.js.erb
Normal file
1
app/views/fragen/new.js.erb
Normal file
@@ -0,0 +1 @@
|
||||
$("#fragenform").html("<%=escape_javascript( render :partial=>'fragen/rform' )%>")
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="row-fluid">
|
||||
|
||||
<div class="span8">
|
||||
<h4>Neueste Beispiele</h4>
|
||||
<h4>Neueste Beispiele in unserer Sammlung</h4>
|
||||
</div>
|
||||
<div class="span4">
|
||||
<%= link_to I18n.t("beispiel.add"), new_beispiel_path, :class=>"btn"%>
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
<div class="content-wrap content-column">
|
||||
<h1><%= I18n.t('home.willkommen') %></h1>
|
||||
<p><%= I18n.t('home.hallobeiderfet') %></p>
|
||||
<ul class="unstyled linkbox-list" style="max-width:70em">
|
||||
<% @neuigkeiten.each do |n| %>
|
||||
<li><%= render n if can?(:show, n) %> </li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<p>
|
||||
<%= link_to "FET Login", user_omniauth_authorize_path(:ldap) %>
|
||||
</p>
|
||||
<div class="alert">
|
||||
<h2>Beta Test</h2>
|
||||
<p>Die Webseite befindet sich derzeit in einem Entsicklungsstadium,
|
||||
@@ -19,7 +28,6 @@
|
||||
</p>
|
||||
|
||||
</div>
|
||||
<p><%= I18n.t('home.hallobeiderfet') %></p>
|
||||
<%= link_to "Entwicklungsstatus" , home_dev_path %>
|
||||
<%= render 'beispiele' %>
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ Verwendung: Aufruf mit
|
||||
<% toolbar_elements.each do |t| %>
|
||||
<% unless t[:method]==:versions %>
|
||||
<% text='<i class="'.html_safe+ t[:hicon].to_s.html_safe + '"></i>'.html_safe+t[:text] %>
|
||||
<%= link_to text, t[:path], :method=>t[:method], :confirm=>t[:confirm].to_s, :data=>t[:data], :class=>((t[:method].to_s=='delete') ? "btn btn-danger" : "btn") %>
|
||||
<%= link_to text, t[:path], :method=>t[:method], :confirm=>t[:confirm].to_s, :data=>t[:data], :class=>((t[:method].to_s=='delete') ? "btn btn-danger" : "btn") ,:remote=>(t[:remote])?true : false %>
|
||||
<% else %>
|
||||
<div class="btn-group">
|
||||
<a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
|
||||
|
||||
@@ -4,11 +4,12 @@
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Fetsite</title>
|
||||
|
||||
<%= stylesheet_link_tag "themes/"+theme_name+"/application", :media => "all" unless theme_name.nil? %>
|
||||
<%= stylesheet_link_tag "application", :media=>"all" if theme_name.nil? %>
|
||||
|
||||
|
||||
|
||||
<%= stylesheet_link_tag "themes/"+theme_name+"/application", :media => "all" unless theme_name.empty? %>
|
||||
<%= stylesheet_link_tag "application", :media=>"all" if theme_name.empty? %>
|
||||
<%= theme_stylesheet_link_tag "test", :media => "all" %>
|
||||
<% theme_stylesheet_link_tag "mod", :media=>"all" %>
|
||||
<link rel="stylesheet" href="css/bootstrap.css">
|
||||
<link rel="stylesheet" href="css/style.css">
|
||||
<link rel="stylesheet" href="css/bootstrap-responsive.css">
|
||||
@@ -18,28 +19,39 @@
|
||||
<%= csrf_meta_tags %>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div id="maincontainer" class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<div class="header">
|
||||
<%= image_tag('/fetlogo.png',{:style=>"float:left"}) %>
|
||||
<h1 style="display:block">Fachschaft Elektrotechnik</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row-fluid">
|
||||
<div class="span2 earlymax">
|
||||
<body>
|
||||
<div id="maincontainer" class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<div class="span1 "></div>
|
||||
<div class="span10 ">
|
||||
<div class="header_wrap" style="background:7070a0">
|
||||
<div class="header">
|
||||
<%= image_tag('/fetlogo90.png',{:style=>"float:left;height:50px",:height=>"50"}) %>
|
||||
<h1 style="display:block"></h1>
|
||||
</div>
|
||||
|
||||
<div id="menudiv" style="margin-top:12px">
|
||||
<%= render :template => 'layouts/menu' %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="span1 "></div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="menudiv"><%= render :template => 'layouts/menu' %></div>
|
||||
<%= render 'layouts/login' %>
|
||||
</div>
|
||||
<div class="span10" id="contentdiv">
|
||||
|
||||
<%= yield %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row-fluid">
|
||||
<div class="span1">
|
||||
</div>
|
||||
<div class="span10" id="contentdiv">
|
||||
<%= yield %>
|
||||
<span class="pull-right"> <%= render 'layouts/login' %></span>
|
||||
</div>
|
||||
<div class="span1">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
24
app/views/layouts/menu.html.erb
Executable file → Normal file
24
app/views/layouts/menu.html.erb
Executable file → Normal file
@@ -1,7 +1,7 @@
|
||||
<div class="navbar">
|
||||
<div class="navbar-inner">
|
||||
<div class="container">
|
||||
<!-- <a class="brand" href="#"><% t 'home.mtitle'%></a>-->
|
||||
<!-- <a class="brand" href="#"><% t 'home.mtitle'%></a>-->
|
||||
<a class ="btn btn-navbar" data-toggle="collapse" data-parent="#menudiv" data-target=".nav-collapse">
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
@@ -12,24 +12,24 @@
|
||||
<li><%= link_to I18n.t(:home,:scope=>'home' ), home_index_path %>
|
||||
</li>
|
||||
<li><%= link_to I18n.t(:news,:scope=>'home' ),rubriken_path %></li>
|
||||
|
||||
<li><%= link_to I18n.t(:info,:scope=>'home' ),themengruppen_path %></li>
|
||||
<li><%= link_to I18n.t('mitarbeiter',:scope=>'home' ),fetprofiles_path %></li>
|
||||
<li><%= link_to I18n.t('fotos',:scope=>'home' ),galleries_path %></li>
|
||||
<li><%= link_to I18n.t(:studien,:scope=>'home' ), studien_path %></li>
|
||||
<li class="divider"></li>
|
||||
|
||||
<li><%if I18n.locale == :en %>
|
||||
<%= link_to image_tag("/flaggen/png/at.png") + " Deutsch" ,switch_locale_url(:de)%>
|
||||
<% elsif I18n.locale == :de %>
|
||||
<%= link_to image_tag("/flaggen/png/gb.png") + " English" ,switch_locale_url(:en)%>
|
||||
<%end %>
|
||||
</li>
|
||||
|
||||
<li> <%= link_to I18n.t("home.search"), search_home_index_path %></li>
|
||||
<li>
|
||||
<%= link_to 'Admin' , config_path%>
|
||||
</li>
|
||||
</ul>
|
||||
<span class="pull-right"><%if I18n.locale == :en %>
|
||||
<%= link_to image_tag("/flaggen/png/at.png") + " Deutsch" ,switch_locale_url(:de)%>
|
||||
<% elsif I18n.locale == :de %>
|
||||
<%= link_to image_tag("/flaggen/png/gb.png") + " English" ,switch_locale_url(:en)%>
|
||||
<%end %>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -13,13 +13,16 @@
|
||||
<%= neuigkeit.title%>
|
||||
</h1>
|
||||
<%= raw(neuigkeit.text_first_words) unless neuigkeit.text.nil?%>
|
||||
</div>
|
||||
<% if neuigkeit.has_calentries? %>
|
||||
<div class="pull-right" href="#">
|
||||
<%= image_tag("/iconnavy/time.png") %>
|
||||
|
||||
<%= neuigkeit.calentries.first.text %>
|
||||
</div>
|
||||
<% if neuigkeit.has_calentries? %>
|
||||
<div class="pull-right" href="#">
|
||||
<%= image_tag("/iconnavy/time.png") %>
|
||||
<% unless neuigkeit.calentries.upcoming.empty? %>
|
||||
<%= neuigkeit.calentries.upcoming.first.text %>
|
||||
<% else unless neuigkeit.calentries.recent.empty? %>
|
||||
<%= neuigkeit.calentries.recent.first.text %>
|
||||
<% end %><% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -1,41 +1,32 @@
|
||||
<%= tinymce_assets %>
|
||||
<%= semantic_form_for @thema do |f| %>
|
||||
<div class="container-fluid">
|
||||
|
||||
|
||||
<%= semantic_form_for @thema, :remote=>true do |f| %>
|
||||
<%= f.inputs do %>
|
||||
<div class="row-fluid">
|
||||
<div class="span6">
|
||||
<%= f.input :title %>
|
||||
</div>
|
||||
<div class="span6">
|
||||
<%= f.input :themengruppe %>
|
||||
<%= f.input :text, :as=>:tinymce_text%>
|
||||
<% end %>
|
||||
<%= tinymce %>
|
||||
</div>
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<%= f.input :text, :as=>:tinymce_text,:label=>false %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Attachments:</h2>
|
||||
<%= render :partial => "themen/select", :object => @thema,:locals =>{ :editor => :true} %>
|
||||
</div>
|
||||
|
||||
<%= f.actions do %>
|
||||
<%= f.action :submit, :as => :input %>
|
||||
<% end %>
|
||||
|
||||
<!--
|
||||
<% @thema.attachments.each do |attachment| %>
|
||||
<ul>
|
||||
<li>
|
||||
<%= link_to attachment.name, edit_thema_attachment_path(@thema,attachment) %>
|
||||
<button type="button" onclick="insertAttachment(<%="\"" + attachment.datei.url + "\""%>,<%="\""+attachment.name+"\""%>)">Insert Me!</button>
|
||||
</li>
|
||||
</ul>
|
||||
<% end %>
|
||||
<%= f.action :cancel, :as => :link %>
|
||||
<% end %>
|
||||
<% end %><% end %>
|
||||
<%= tinymce %>
|
||||
<h2>Attachments:</h2>
|
||||
<%= render :partial => "themen/select", :object => @thema,:locals =>{ :editor => :true} %>
|
||||
|
||||
|
||||
<% end %>
|
||||
-->
|
||||
<!--
|
||||
|
||||
<script>
|
||||
function insertAttachment(url) {
|
||||
|
||||
tinymce.activeEditor.setContent(tinymce.activeEditor.getContent({format : 'raw'}) + "Test");
|
||||
//editor.setContent(editor.getContent + "<img src=\"" + url + "\">")
|
||||
}
|
||||
</script>
|
||||
|
||||
-->
|
||||
|
||||
10
app/views/themen/_fragen.html.erb
Normal file
10
app/views/themen/_fragen.html.erb
Normal file
@@ -0,0 +1,10 @@
|
||||
<h2>FAQs:</h2>
|
||||
<div id="fragen">
|
||||
<%= render :partial=>'fragen/liste' %>
|
||||
</div>
|
||||
<% @frage=Frage.new; @frage.thema=@thema %>
|
||||
<div id="fragenform">
|
||||
<%= render :partial=>'fragen/rform' %>
|
||||
</div>
|
||||
<% @frage_elements = [{:icon=>:plus, :hicon=>'icon-plus', :text=>I18n.t('frage.add'), :path=>new_frage_path}] %>
|
||||
<%= render :partial=>'layouts/pretty_toolbar', :object=>@frage_elements %>
|
||||
@@ -24,8 +24,9 @@
|
||||
</br>
|
||||
|
||||
<% unless @thema.id.nil? %>
|
||||
<% @att_elements = [{:icon=>:plus, :hicon=>'icon-plus', :text=>I18n.t('attachment.add'), :path=>new_thema_attachment_path(@thema)}] %>
|
||||
|
||||
<% @att_elements = [{:icon=>:plus, :hicon=>'icon-plus', :text=>I18n.t('attachment.add'), :path=>new_thema_attachment_path(@thema),:remote=>true}] %>
|
||||
<div id="attachmentform">
|
||||
</div>
|
||||
<%= render :partial=>'layouts/pretty_toolbar', :object=>@att_elements %>
|
||||
<% end %>
|
||||
<br/>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<div id="themaview">
|
||||
<h1>Editing thema</h1>
|
||||
|
||||
<%= render 'form' %>
|
||||
|
||||
</div>
|
||||
</br><%= link_to 'Back', @thema %>
|
||||
|
||||
1
app/views/themen/edit.js.erb
Normal file
1
app/views/themen/edit.js.erb
Normal file
@@ -0,0 +1 @@
|
||||
$("#themaview").html("<%= escape_javascript(raw("<h2>"+I18n.t('thema.edit')+"</h2>")+render(:partial=>"themen/form") )%>");
|
||||
1
app/views/themen/fragen.js.erb
Normal file
1
app/views/themen/fragen.js.erb
Normal file
@@ -0,0 +1 @@
|
||||
$("#themaview").html("<%=escape_javascript( render :partial=>'themen/fragen' )%>")
|
||||
@@ -11,18 +11,14 @@
|
||||
-->
|
||||
<%= render :partial=>'layouts/pretty_toolbar' %>
|
||||
|
||||
<h2>FAQs:</h2>
|
||||
<div id="fragen">
|
||||
<%= render :partial=>'fragen/liste' %>
|
||||
</div>
|
||||
<% @frage=Frage.new; @frage.thema=@thema %>
|
||||
<%= render :partial=>'fragen/rform' %>
|
||||
<% @frage_elements = [{:icon=>:plus, :hicon=>'icon-plus', :text=>I18n.t('frage.add'), :path=>new_frage_path}] %>
|
||||
<%= render :partial=>'layouts/pretty_toolbar', :object=>@frage_elements %>
|
||||
<%= render :partial=>'themen/fragen' %>
|
||||
<!--
|
||||
<%= link_to 'Neue Frage', new_frage_path %> <br/>
|
||||
-->
|
||||
<br/>
|
||||
|
||||
<h2><%= I18n.t('attachment.title')%>:</h2>
|
||||
<div id="attachmentform">
|
||||
</div>
|
||||
<%= link_to new_thema_attachment_path(@thema) ,:remote=>true do %> new Attachment <% end %>
|
||||
<%= render :partial => "themen/select", :object => @thema, :locals=>{:editor => :false} %>
|
||||
|
||||
2
app/views/themen/update.js.erb
Normal file
2
app/views/themen/update.js.erb
Normal file
@@ -0,0 +1,2 @@
|
||||
alert('t');
|
||||
$("#themaview").html("<%= escape_javascript(raw("<h2>Bearbeiten</h2>")+render(:partial=>"themen/small", :object=>@thema) )%>");
|
||||
2
app/views/themengruppen/edit.js.erb
Normal file
2
app/views/themengruppen/edit.js.erb
Normal file
@@ -0,0 +1,2 @@
|
||||
alert("hallo Welt");
|
||||
$("#themaview").html("<%=escape_javascript( render :action=>:edit, :layout=>false )%>");
|
||||
@@ -1,30 +1,26 @@
|
||||
<h1><%= @themengruppe.title %></h1>
|
||||
<div class="content-wrap content-column" >
|
||||
|
||||
<h1><%= @themengruppe.title %></h1>
|
||||
<p>
|
||||
<%= @themengruppe.text %>
|
||||
</p>
|
||||
|
||||
<div class="accordion" id="accordion1">
|
||||
<% @themen.each do |thema| %>
|
||||
<div class="accordion-group">
|
||||
<div class="accordion-heading">
|
||||
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion1" href="#collapse<%=thema.id%>">
|
||||
<%= thema.title %>
|
||||
</a>
|
||||
</div>
|
||||
<div id="collapse<%=thema.id%>" class="accordion-body<%= ' collapse' unless params['thema'].to_i==thema.id %>">
|
||||
<div class="accordion-inner">
|
||||
<% unless thema.gremium.nil? %>
|
||||
<p><%= link_to "Zu dem Gremium ..." , thema.gremium %>
|
||||
</p>
|
||||
<% end %>
|
||||
<%= render :partial => 'themen/small', :object => thema %>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<ul class="unstyled linkbox-list" >
|
||||
<% @themengruppe.themen.each do |thema| %>
|
||||
<li>
|
||||
<div class="contentbox">
|
||||
<a href="#<%=thema.id%>">
|
||||
<h2><%= thema.title %></h2>
|
||||
</a>
|
||||
<% unless thema.gremium.nil? %>
|
||||
<p>
|
||||
<%= link_to "Zu dem Gremium ..." , thema.gremium %>
|
||||
</p>
|
||||
<% end %>
|
||||
<%= render :partial => 'themen/small', :object => thema %>
|
||||
</div>
|
||||
</li>
|
||||
<% end %>
|
||||
</div>
|
||||
</ul>
|
||||
|
||||
<%= render :partial=>'layouts/pretty_toolbar' %>
|
||||
</div>
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
alert("tt")
|
||||
@@ -2,18 +2,27 @@
|
||||
#themen { list-style-type: none; margin: 0; padding: 0; margin-bottom: 15px;zoom: 1; }
|
||||
#themen li { margin: 0 5px 5px 5px; padding: 5px; font-size: 1.2em; width: 95%; }
|
||||
</style>
|
||||
<div class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<div class="span4">
|
||||
|
||||
<ul id="themen" class="sort" >
|
||||
<% @themen.each do |thema| %>
|
||||
<li id="themen_<%= thema.id %>" class="sort" ><div class="contentbox" ><h2><%= thema.title %></h2> </div></li>
|
||||
<li id="themen_<%= thema.id %>" class="sort" ><div class="contentbox handle" ><h2><%= thema.title %></h2> </div> <%= link_to edit_thema_path(thema),:remote=>true do %> Edit <% end %> <%= link_to thema_fragen_path(thema),:remote=>true do %> Fragen <% end %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
||||
<%= link_to new_themengruppe_thema_path(@themengruppe),:remote=>true do %> New Thema <% end %>
|
||||
</div>
|
||||
<div class="span8">
|
||||
<div id="themaview"></div>
|
||||
</div>
|
||||
<script>
|
||||
|
||||
$( document ).ready(function(){
|
||||
$("#themen").sortable({
|
||||
cursor: 'crosshair',
|
||||
drag:true,
|
||||
handle: '.handle',
|
||||
update: function(){
|
||||
$.ajax({
|
||||
url: '<%= themengruppe_sort_themen_path(@themengruppe) %>',
|
||||
|
||||
@@ -1,57 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Fetsite</title>
|
||||
|
||||
|
||||
<%= stylesheet_link_tag "themes/"+theme_name+"/application", :media => "all" unless theme_name.empty? %>
|
||||
<%= stylesheet_link_tag "application", :media=>"all" if theme_name.empty? %>
|
||||
<%= theme_stylesheet_link_tag "test", :media => "all" %>
|
||||
<% theme_stylesheet_link_tag "mod", :media=>"all" %>
|
||||
<link rel="stylesheet" href="css/bootstrap.css">
|
||||
<link rel="stylesheet" href="css/style.css">
|
||||
<link rel="stylesheet" href="css/bootstrap-responsive.css">
|
||||
<!--[if lt IE 7]><link rel="stylesheet" href="css/bootstrap-ie6.css"><![endif]-->
|
||||
<link rel="stylesheet" href="css/bootstrap-image-gallery.css">
|
||||
<%= javascript_include_tag "application" %>
|
||||
<%= csrf_meta_tags %>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="maincontainer" class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<div class="span1 "></div>
|
||||
<div class="span10 ">
|
||||
<div class="header_wrap" style="background:7070a0">
|
||||
<div class="header">
|
||||
<%= image_tag('/fetlogo.png',{:style=>"float:left"}) %>
|
||||
<h1 style="display:block"></h1>
|
||||
</div>
|
||||
|
||||
<div id="menudiv" style="margin-top:12px">
|
||||
<%= render :template => 'layouts/menu' %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="span1 "></div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row-fluid">
|
||||
<div class="span1">
|
||||
</div>
|
||||
<div class="span10" id="contentdiv">
|
||||
<%= yield %>
|
||||
<span class="pull-right"> <%= render 'layouts/login' %></span>
|
||||
</div>
|
||||
<div class="span1">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -18,7 +18,6 @@ $( document ).ready(function(){
|
||||
data: $('#themengruppen').sortable('serialize'),
|
||||
dataType: 'script',
|
||||
complete: function(request){
|
||||
alert("complete");
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,57 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Fetsite</title>
|
||||
|
||||
|
||||
<%= stylesheet_link_tag "themes/"+theme_name+"/application", :media => "all" unless theme_name.empty? %>
|
||||
<%= stylesheet_link_tag "application", :media=>"all" if theme_name.empty? %>
|
||||
<%= theme_stylesheet_link_tag "test", :media => "all" %>
|
||||
<% theme_stylesheet_link_tag "mod", :media=>"all" %>
|
||||
<link rel="stylesheet" href="css/bootstrap.css">
|
||||
<link rel="stylesheet" href="css/style.css">
|
||||
<link rel="stylesheet" href="css/bootstrap-responsive.css">
|
||||
<!--[if lt IE 7]><link rel="stylesheet" href="css/bootstrap-ie6.css"><![endif]-->
|
||||
<link rel="stylesheet" href="css/bootstrap-image-gallery.css">
|
||||
<%= javascript_include_tag "application" %>
|
||||
<%= csrf_meta_tags %>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="maincontainer" class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<div class="span1 "></div>
|
||||
<div class="span10 ">
|
||||
<div class="header_wrap" style="background:7070a0">
|
||||
<div class="header">
|
||||
<%= image_tag('/fetlogo90.png',{:style=>"float:left;height:50px",:height=>"50"}) %>
|
||||
<h1 style="display:block"></h1>
|
||||
</div>
|
||||
|
||||
<div id="menudiv" style="margin-top:12px">
|
||||
<%= render :template => 'layouts/menu' %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="span1 "></div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row-fluid">
|
||||
<div class="span1">
|
||||
</div>
|
||||
<div class="span10" id="contentdiv">
|
||||
<%= yield %>
|
||||
<span class="pull-right"> <%= render 'layouts/login' %></span>
|
||||
</div>
|
||||
<div class="span1">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,34 +0,0 @@
|
||||
<div class="navbar">
|
||||
<div class="navbar-inner">
|
||||
<div class="container">
|
||||
<!-- <a class="brand" href="#"><% t 'home.mtitle'%></a>-->
|
||||
<a class ="btn btn-navbar" data-toggle="collapse" data-parent="#menudiv" data-target=".nav-collapse">
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</a>
|
||||
<div class="nav-collapse collapse">
|
||||
<ul class="nav nav-pills nav-stacked">
|
||||
<li><%= link_to I18n.t(:home,:scope=>'home' ), home_index_path %>
|
||||
</li>
|
||||
<li><%= link_to I18n.t(:news,:scope=>'home' ),rubriken_path %></li>
|
||||
|
||||
<li><%= link_to I18n.t(:info,:scope=>'home' ),themengruppen_path %></li>
|
||||
<li><%= link_to I18n.t('mitarbeiter',:scope=>'home' ),fetprofiles_path %></li>
|
||||
<li><%= link_to I18n.t('fotos',:scope=>'home' ),galleries_path %></li>
|
||||
<li><%= link_to I18n.t(:studien,:scope=>'home' ), studien_path %></li>
|
||||
<li>
|
||||
<%= link_to 'Admin' , config_path%>
|
||||
</li>
|
||||
</ul>
|
||||
<span class="pull-right"><%if I18n.locale == :en %>
|
||||
<%= link_to image_tag("/flaggen/png/at.png") + " Deutsch" ,switch_locale_url(:de)%>
|
||||
<% elsif I18n.locale == :de %>
|
||||
<%= link_to image_tag("/flaggen/png/gb.png") + " English" ,switch_locale_url(:en)%>
|
||||
<%end %>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,26 +0,0 @@
|
||||
<div class="content-wrap content-column" >
|
||||
|
||||
<h1><%= @themengruppe.title %></h1>
|
||||
<p>
|
||||
<%= @themengruppe.text %>
|
||||
</p>
|
||||
<ul class="unstyled linkbox-list" >
|
||||
<% @themengruppe.themen.each do |thema| %>
|
||||
<li>
|
||||
<div class="contentbox">
|
||||
<a href="#<%=thema.id%>">
|
||||
<h2><%= thema.title %></h2>
|
||||
</a>
|
||||
<% unless thema.gremium.nil? %>
|
||||
<p>
|
||||
<%= link_to "Zu dem Gremium ..." , thema.gremium %>
|
||||
</p>
|
||||
<% end %>
|
||||
<%= render :partial => 'themen/small', :object => thema %>
|
||||
</div>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
||||
<%= render :partial=>'layouts/pretty_toolbar' %>
|
||||
</div>
|
||||
@@ -1,57 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Fetsite</title>
|
||||
|
||||
|
||||
<%= stylesheet_link_tag "themes/"+theme_name+"/application", :media => "all" unless theme_name.empty? %>
|
||||
<%= stylesheet_link_tag "application", :media=>"all" if theme_name.empty? %>
|
||||
<%= theme_stylesheet_link_tag "test", :media => "all" %>
|
||||
<% theme_stylesheet_link_tag "mod", :media=>"all" %>
|
||||
<link rel="stylesheet" href="css/bootstrap.css">
|
||||
<link rel="stylesheet" href="css/style.css">
|
||||
<link rel="stylesheet" href="css/bootstrap-responsive.css">
|
||||
<!--[if lt IE 7]><link rel="stylesheet" href="css/bootstrap-ie6.css"><![endif]-->
|
||||
<link rel="stylesheet" href="css/bootstrap-image-gallery.css">
|
||||
<%= javascript_include_tag "application" %>
|
||||
<%= csrf_meta_tags %>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="maincontainer" class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<div class="span1 "></div>
|
||||
<div class="span10 ">
|
||||
<div class="header_wrap" style="background:7070a0">
|
||||
<div class="header">
|
||||
<%= image_tag('/fetlogo90white.png',{:style=>"float:left;height:45px"}) %>
|
||||
<h1 style="display:block"></h1>
|
||||
</div>
|
||||
|
||||
<div id="menudiv" style="margin-top:12px">
|
||||
<%= render :template => 'layouts/menu' %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="span1 "></div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row-fluid">
|
||||
<div class="span1">
|
||||
</div>
|
||||
<div class="span10" id="contentdiv">
|
||||
<%= yield %>
|
||||
<span class="pull-right"> <%= render 'layouts/login' %></span>
|
||||
</div>
|
||||
<div class="span1">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,34 +0,0 @@
|
||||
<div class="navbar">
|
||||
<div class="navbar-inner">
|
||||
<div class="container">
|
||||
<!-- <a class="brand" href="#"><% t 'home.mtitle'%></a>-->
|
||||
<a class ="btn btn-navbar" data-toggle="collapse" data-parent="#menudiv" data-target=".nav-collapse">
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</a>
|
||||
<div class="nav-collapse collapse">
|
||||
<ul class="nav nav-pills nav-stacked">
|
||||
<li><%= link_to I18n.t(:home,:scope=>'home' ), home_index_path %>
|
||||
</li>
|
||||
<li><%= link_to I18n.t(:news,:scope=>'home' ),rubriken_path %></li>
|
||||
|
||||
<li><%= link_to I18n.t(:info,:scope=>'home' ),themengruppen_path %></li>
|
||||
<li><%= link_to I18n.t('mitarbeiter',:scope=>'home' ),fetprofiles_path %></li>
|
||||
<li><%= link_to I18n.t('fotos',:scope=>'home' ),galleries_path %></li>
|
||||
<li><%= link_to I18n.t(:studien,:scope=>'home' ), studien_path %></li>
|
||||
<li>
|
||||
<%= link_to 'Admin' , config_path%>
|
||||
</li>
|
||||
</ul>
|
||||
<span class="pull-right"><%if I18n.locale == :en %>
|
||||
<%= link_to image_tag("/flaggen/png/at.png") + " Deutsch" ,switch_locale_url(:de)%>
|
||||
<% elsif I18n.locale == :de %>
|
||||
<%= link_to image_tag("/flaggen/png/gb.png") + " English" ,switch_locale_url(:en)%>
|
||||
<%end %>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
45
app/views/themes/white_1/layouts/application.html.erb
Executable file
45
app/views/themes/white_1/layouts/application.html.erb
Executable file
@@ -0,0 +1,45 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Fetsite</title>
|
||||
|
||||
<%= stylesheet_link_tag "themes/"+theme_name+"/application", :media => "all" unless theme_name.nil? %>
|
||||
<%= stylesheet_link_tag "application", :media=>"all" if theme_name.nil? %>
|
||||
|
||||
|
||||
<link rel="stylesheet" href="css/bootstrap.css">
|
||||
<link rel="stylesheet" href="css/style.css">
|
||||
<link rel="stylesheet" href="css/bootstrap-responsive.css">
|
||||
<!--[if lt IE 7]><link rel="stylesheet" href="css/bootstrap-ie6.css"><![endif]-->
|
||||
<link rel="stylesheet" href="css/bootstrap-image-gallery.css">
|
||||
<%= javascript_include_tag "application" %>
|
||||
<%= csrf_meta_tags %>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div id="maincontainer" class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<div class="header">
|
||||
<%= image_tag('/fetlogo.png',{:style=>"float:left"}) %>
|
||||
<h1 style="display:block">Fachschaft Elektrotechnik</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row-fluid">
|
||||
<div class="span2 earlymax">
|
||||
|
||||
|
||||
<div id="menudiv"><%= render :template => 'layouts/menu' %></div>
|
||||
<%= render 'layouts/login' %>
|
||||
</div>
|
||||
<div class="span10" id="contentdiv">
|
||||
|
||||
<%= yield %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
23
app/views/themes/2003/layouts/menu.html.erb → app/views/themes/white_1/layouts/menu.html.erb
Normal file → Executable file
23
app/views/themes/2003/layouts/menu.html.erb → app/views/themes/white_1/layouts/menu.html.erb
Normal file → Executable file
@@ -1,7 +1,7 @@
|
||||
<div class="navbar">
|
||||
<div class="navbar-inner">
|
||||
<div class="container">
|
||||
<!-- <a class="brand" href="#"><% t 'home.mtitle'%></a>-->
|
||||
<!-- <a class="brand" href="#"><% t 'home.mtitle'%></a>-->
|
||||
<a class ="btn btn-navbar" data-toggle="collapse" data-parent="#menudiv" data-target=".nav-collapse">
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
@@ -12,23 +12,24 @@
|
||||
<li><%= link_to I18n.t(:home,:scope=>'home' ), home_index_path %>
|
||||
</li>
|
||||
<li><%= link_to I18n.t(:news,:scope=>'home' ),rubriken_path %></li>
|
||||
|
||||
<li><%= link_to I18n.t(:info,:scope=>'home' ),themengruppen_path %></li>
|
||||
<li><%= link_to I18n.t('mitarbeiter',:scope=>'home' ),fetprofiles_path %></li>
|
||||
<li><%= link_to I18n.t('fotos',:scope=>'home' ),galleries_path %></li>
|
||||
<li><%= link_to I18n.t(:studien,:scope=>'home' ), studien_path %></li>
|
||||
<li class="divider"></li>
|
||||
|
||||
<li><%if I18n.locale == :en %>
|
||||
<%= link_to image_tag("/flaggen/png/at.png") + " Deutsch" ,switch_locale_url(:de)%>
|
||||
<% elsif I18n.locale == :de %>
|
||||
<%= link_to image_tag("/flaggen/png/gb.png") + " English" ,switch_locale_url(:en)%>
|
||||
<%end %>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<%= link_to 'Admin' , config_path%>
|
||||
</li>
|
||||
</ul>
|
||||
<span class="pull-right"><%if I18n.locale == :en %>
|
||||
<%= link_to image_tag("/flaggen/png/at.png") + " Deutsch" ,switch_locale_url(:de)%>
|
||||
<% elsif I18n.locale == :de %>
|
||||
<%= link_to image_tag("/flaggen/png/gb.png") + " English" ,switch_locale_url(:en)%>
|
||||
<%end %>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
30
app/views/themes/white_1/themengruppen/show.html.erb
Normal file
30
app/views/themes/white_1/themengruppen/show.html.erb
Normal file
@@ -0,0 +1,30 @@
|
||||
<h1><%= @themengruppe.title %></h1>
|
||||
|
||||
<p>
|
||||
<%= @themengruppe.text %>
|
||||
</p>
|
||||
|
||||
<div class="accordion" id="accordion1">
|
||||
<% @themen.each do |thema| %>
|
||||
<div class="accordion-group">
|
||||
<div class="accordion-heading">
|
||||
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion1" href="#collapse<%=thema.id%>">
|
||||
<%= thema.title %>
|
||||
</a>
|
||||
</div>
|
||||
<div id="collapse<%=thema.id%>" class="accordion-body<%= ' collapse' unless params['thema'].to_i==thema.id %>">
|
||||
<div class="accordion-inner">
|
||||
<% unless thema.gremium.nil? %>
|
||||
<p><%= link_to "Zu dem Gremium ..." , thema.gremium %>
|
||||
</p>
|
||||
<% end %>
|
||||
<%= render :partial => 'themen/small', :object => thema %>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<%= render :partial=>'layouts/pretty_toolbar' %>
|
||||
@@ -21,6 +21,7 @@ de:
|
||||
info: "Information"
|
||||
mitarbeiter: "Mitarbeiter"
|
||||
fotos: "Fotos"
|
||||
search: "Suche"
|
||||
formtastic:
|
||||
titles:
|
||||
modul:
|
||||
|
||||
@@ -62,9 +62,9 @@ end
|
||||
get 'load_tiss'
|
||||
post 'show_tiss'
|
||||
end
|
||||
|
||||
resources :beispiele#, :only=>[:show,:index,:create]
|
||||
resources :lvas do
|
||||
resources :beispiele, :only=>[:show,:index]
|
||||
resources :beispiele#, :only=>[:show,:index,:create]
|
||||
end
|
||||
|
||||
resources :fragen
|
||||
@@ -102,11 +102,11 @@ end
|
||||
get 'home/linksnotimplemented', :controller=>:home, :action=>:linksnotimplemented, :as=>'home_linksnotimplemented'
|
||||
|
||||
|
||||
resources :beispiele
|
||||
|
||||
resources :themen do
|
||||
|
||||
resources :attachments
|
||||
end
|
||||
get :fragen
|
||||
resources :attachments
|
||||
end
|
||||
|
||||
resources :themengruppen do
|
||||
get :verwalten
|
||||
|
||||
Reference in New Issue
Block a user