Merge branch 'master' of https://github.com/fetsite/fetsite
Conflicts: app/views/neuigkeiten/show.html.erb
This commit is contained in:
@@ -13,6 +13,15 @@
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def after_sign_in_path_for(resource)
|
||||
sign_in_url = new_user_session_path(:only_path => false, :protocol => 'http')
|
||||
if request.referer == sign_in_url
|
||||
super
|
||||
else
|
||||
stored_location_for(resource) || request.referer || root_path
|
||||
end
|
||||
end^
|
||||
def get_theme
|
||||
if ThemesForRails.available_theme_names.include?(params[:theme])
|
||||
params[:theme]
|
||||
|
||||
@@ -97,11 +97,11 @@ class ModulgruppenController < ApplicationController
|
||||
end
|
||||
def load_toolbar_show
|
||||
@toolbar_elements = [ {:text=>'Zurück', :path=>studium_path(@modulgruppe.studium, :ansicht=>:modulgruppenansicht)}]
|
||||
@toolbar_elements << {:hicon=>'icon-plus-sign', :text=>I18n.t('modulgruppe.addmodule'), :path=>new_bulk_moduls_path(:modulgruppen_id=>@modulgruppe.id)}
|
||||
@toolbar_elements << {:hicon=>'icon-plus-sign', :text=>I18n.t('modulgruppe.addmodule'), :path=>new_bulk_moduls_path(:modulgruppen_id=>@modulgruppe.id)} if can? :new ,Modul
|
||||
|
||||
@toolbar_elements << {:hicon=>'icon-plus-sign', :text=>I18n.t('modulgruppe.addmodul'), :path=>new_modul_path(:modulgruppen_id=>@modulgruppe.id)}
|
||||
@toolbar_elements << {:hicon=>'icon-pencil', :text=>I18n.t('modulgruppe.edit'), :path=>edit_modulgruppe_path(@modulgruppe)}
|
||||
@toolbar_elements << {:hicon=>'icon-remove-circle', :text=> I18n.t('common.delete'),:path => modulgruppe_path(@modulgruppe, :ansicht=>:modulgruppenansicht), :method=> :delete,:confirm=>'Sure?' }
|
||||
@toolbar_elements << {:hicon=>'icon-plus-sign', :text=>I18n.t('modulgruppe.addmodul'), :path=>new_modul_path(:modulgruppen_id=>@modulgruppe.id)} if can? :new, Modul
|
||||
@toolbar_elements << {:hicon=>'icon-pencil', :text=>I18n.t('modulgruppe.edit'), :path=>edit_modulgruppe_path(@modulgruppe)} if can? :edit, @modulgruppe
|
||||
@toolbar_elements << {:hicon=>'icon-remove-circle', :text=> I18n.t('common.delete'),:path => modulgruppe_path(@modulgruppe, :ansicht=>:modulgruppenansicht), :method=> :delete,:confirm=>'Sure?' }if can? :delete, Modulgruppe
|
||||
|
||||
end
|
||||
|
||||
|
||||
@@ -32,13 +32,13 @@ class StudienController < ApplicationController
|
||||
@studienphasen << {:modulgruppen=>modulgruppen, :phase => ph}.merge(opts)
|
||||
end
|
||||
@toolbar_elements=[]
|
||||
@toolbar_elements<<{:icon=>:plus, :hicon =>'icon-plus-sign' ,:text=> I18n.t('studien.new') , :path => new_studium_path(@studium) } if can? :new, Studium
|
||||
|
||||
@toolbar_elements<<{:icon=>:pencil, :hicon=>'icon-pencil',:text =>I18n.t('common.edit'),:path => edit_studium_path(@studium)} if can? :edit, Studium
|
||||
@toolbar_elements<<{:icon=>:pencil, :hicon=>'icon-pencil',:text =>I18n.t('lva.editlvas'),:path => edit_lvas_studium_path(@studium)} if can? :edit_lvas, Studium
|
||||
@toolbar_elements<<{:hicon=>'icon-remove-circle', :text=> I18n.t('common.delete'),:path => studium_path(@studium), :method=> :delete,:confirm=>'Sure?' } if can? :delete, Studium
|
||||
@toolbar_modulgruppen =[]
|
||||
@toolbar_modulgruppen << {:hicon=>'icon-plus-sign', :text=> I18n.t('modulgruppe.new'), :path=>new_studium_modulgruppe_path(@studium)} if can? :new, Modulgruppe
|
||||
@toolbar_modulgruppen << {:hicon=>'icon-list', :text => I18n.t('modulgruppe.list'), :path=>modulgruppen_path} if can? :index, Modulgruppe
|
||||
#@toolbar_modulgruppen << {:hicon=>'icon-list', :text => I18n.t('modulgruppe.list'), :path=>modulgruppen_path} if can? :index, Modulgruppe
|
||||
case params[:ansicht]
|
||||
when 'semesteransicht'
|
||||
when 'infoansicht'
|
||||
|
||||
@@ -9,7 +9,7 @@ class Ability
|
||||
#-----------------------------------------------------
|
||||
# Rechteverwaltung fuer Studien Modul
|
||||
can [:show, :index], Studium
|
||||
can [:show, :index], Modulgruppe
|
||||
can [:show], Modulgruppe
|
||||
can [:show, :index], Modul
|
||||
can [:show, :index, :beispiel_sammlung], Lva
|
||||
can [:create, :show], Beispiel
|
||||
@@ -55,7 +55,7 @@ class Ability
|
||||
#-----------------------------------------------------
|
||||
# Rechteverwaltung fuer Fotos
|
||||
|
||||
# can [:show,:index], Gallery
|
||||
# can [:show,:index], Gallery, :intern=>false
|
||||
if loggedin
|
||||
end
|
||||
if( user.has_role?("fetuser") || user.has_role?("fetadmin"))
|
||||
|
||||
@@ -1,3 +1,12 @@
|
||||
<%= content_for :header do %>
|
||||
<title><%= "Fetsite - "+I18n.t('home.mitarbeiter') %></title>
|
||||
<% set_meta_tags :og => {
|
||||
:title => "Fetsite - "+I18n.t('home.mitarbeiter'),
|
||||
:url=> fetprofiles_path(:theme=>nil)
|
||||
}
|
||||
%>
|
||||
<%= display_meta_tags %>
|
||||
<% end %>
|
||||
|
||||
<%= render 'fetprofiles/tabs' %>
|
||||
<div class="content-wrap content-column">
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
<div class="container-fluid">
|
||||
|
||||
<div class="row-fluid">
|
||||
<% if params[:info].true? %>
|
||||
|
||||
<%= raw(@studium.desc) %>
|
||||
<% else %>
|
||||
<%= @studium.desc_first_words %> <%= link_to I18n.t('studium.info'), studium_path(@studium, :ansicht=>params[:ansicht], :info=>true) %>
|
||||
<% end %>
|
||||
|
||||
|
||||
|
||||
<% @studienphasen.each do |sp| %>
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
|
||||
<% if params[:info].true? %>
|
||||
|
||||
<%= raw(@studium.desc) %>
|
||||
<% else %>
|
||||
<%= @studium.desc_first_words %> <%= link_to I18n.t('studium.info'), studium_path(@studium, :ansicht=>params[:ansicht], :info=>true) %>
|
||||
<% end %>
|
||||
|
||||
<div class="container-fluid">
|
||||
<% @studium.semester.each_slice(2) do |row| %>
|
||||
<div class="row-fluid">
|
||||
|
||||
@@ -1,3 +1,15 @@
|
||||
|
||||
<%= content_for :header do %>
|
||||
<title><%= "Fetsite - "+I18n.t('home.studien') %></title>
|
||||
<% set_meta_tags :og => {
|
||||
:title => "Fetsite - "+I18n.t('home.studien'),
|
||||
:url=> studien_path(:theme=>nil)
|
||||
}
|
||||
%>
|
||||
<%= display_meta_tags %>
|
||||
<% end %>
|
||||
|
||||
|
||||
<div class="container-fluid">
|
||||
<%= render 'studien/tabs' %>
|
||||
<div class="row-fluid">
|
||||
|
||||
@@ -7,7 +7,13 @@
|
||||
<p id="notice"><%= notice %></p>
|
||||
<h1><%= @studium.typ %> <%= @studium.name %> (<%= @studium.zahl %>)</h1>
|
||||
<div>
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
<%= render 'layouts/pretty_toolbar' %>
|
||||
<%= render :partial=>'layouts/pretty_toolbar', :object=>@toolbar_modulgruppen %>
|
||||
|
||||
<div class="pull-right">
|
||||
<%= link_to I18n.t("studien.ansicht.semester"), studium_path(@studium, :ansicht=>"semesteransicht"), :class=>"btn" unless params[:ansicht]=='semesteransicht' %>
|
||||
<%= link_to I18n.t("studien.ansicht.modulgruppe"), studium_path(@studium, :ansicht=>"modulgruppenansicht"), :class=>"btn" unless params[:ansicht]=='modulgruppenansicht' %>
|
||||
@@ -29,7 +35,4 @@
|
||||
<% end %>
|
||||
<% end %> <% end %>
|
||||
|
||||
<%= render :partial=>'layouts/pretty_toolbar', :object=>@toolbar_modulgruppen %>
|
||||
<br>
|
||||
<%= render 'layouts/pretty_toolbar' %>
|
||||
</div>
|
||||
|
||||
@@ -1,27 +1,32 @@
|
||||
<%= link_to themengruppe,{:class=>'linkbox color-1-dark'} do %>
|
||||
<div class="contentbox color-1-dark">
|
||||
<div class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<div class="media">
|
||||
<%= link_to themengruppe do %>
|
||||
|
||||
<span class="pull-left">
|
||||
<% if themengruppe.icon.nil? or themengruppe.icon.empty? %>
|
||||
<%= image_tag themengruppe.picture.thumb.url,{:class=>"img-rounded"} %>
|
||||
<% end %>
|
||||
|
||||
</span>
|
||||
<div class="media-body">
|
||||
|
||||
<div class="media-body">
|
||||
|
||||
<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>
|
||||
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row-fluid">
|
||||
<div class="span6">
|
||||
<%= link_to themengruppe do %>
|
||||
|
||||
<p>
|
||||
<%= if themengruppe.text.split.size > Themengruppe::WORD_COUNT
|
||||
@@ -30,6 +35,7 @@
|
||||
themengruppe.text
|
||||
end%>
|
||||
</p>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="span6">
|
||||
@@ -38,7 +44,8 @@
|
||||
<ul>
|
||||
<% themengruppe.themen.where(:hidelink=>false).where(:isdraft=>false).each do |t| %>
|
||||
<li>
|
||||
<%= render t %>
|
||||
<%= link_to t do %>
|
||||
<%= render t %> <% end %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
@@ -48,4 +55,5 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,3 +1,14 @@
|
||||
<%= content_for :header do %>
|
||||
<title><%= "Fetsite - "+I18n.t('home.info') %></title>
|
||||
<% set_meta_tags :og => {
|
||||
:title => "Fetsite - "+I18n.t('home.info'),
|
||||
:url=> themengruppen_path(:theme=>nil)
|
||||
}
|
||||
%>
|
||||
<%= display_meta_tags %>
|
||||
<% end %>
|
||||
|
||||
|
||||
<div class="content-wrap content-column">
|
||||
<%= render :partial=>'layouts/pretty_toolbar' %>
|
||||
<ul class="linklist">
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
class AddIdToThemen < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :themen, :themengruppe_id, :integer
|
||||
add_column :themen, :themengruppe_id, :integer
|
||||
add_column :attachments, :thema_id, :integer
|
||||
add_column :fragen, :thema_id, :integer
|
||||
add_column :fragen, :thema_id, :integer
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user