forked from bofh/fetsite
Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
52ffe0c701 | ||
|
|
52fcabf2dc | ||
|
|
c03a60c236 | ||
| 2e732561e8 | |||
| a8f353f213 | |||
| 6ba20206ab | |||
|
|
2ae99b4b9e | ||
|
|
f61681c5d0 | ||
| 1b91d99b24 | |||
| 28906eb5fb | |||
| 745c4413f4 | |||
| ac7e7f3462 | |||
| e55a71e77d |
6
Gemfile
6
Gemfile
@@ -1,5 +1,5 @@
|
||||
source 'https://rubygems.org'
|
||||
gem 'rake', '~>11.0'
|
||||
gem 'rake', '~>10.0'
|
||||
gem 'rails', '3.2.13'
|
||||
gem 'sprockets', '2.2.2'
|
||||
gem 'webrick', '1.3.1'
|
||||
@@ -33,7 +33,7 @@ gem 'jquery-rails'
|
||||
# gem 'jbuilder'
|
||||
|
||||
# Use unicorn as the app server
|
||||
gem 'unicorn'
|
||||
gem 'unicorn', '~>4.8.0'
|
||||
|
||||
# Deploy with Capistran
|
||||
# gem 'capistrano'
|
||||
@@ -82,7 +82,7 @@ gem 'haml'
|
||||
#gem 'wikicloth'
|
||||
#gem 'gollum-lib'
|
||||
gem 'awesome_nested_set'
|
||||
gem 'annotate', ">=2.5.0"
|
||||
gem 'annotate', "~>2.6.0"
|
||||
gem 'carrierwave', "~>0.9.0"
|
||||
group :development, :test do
|
||||
gem 'factory_girl_rails',"~>4.5.0"
|
||||
|
||||
@@ -101,7 +101,7 @@ p {
|
||||
.footer .servicecontainer .servicestatus{
|
||||
margin: auto;
|
||||
width:20px;
|
||||
height: 100%
|
||||
height: 100vh; /* height: 100%;*/
|
||||
padding-right: 30px;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
@@ -9,11 +9,9 @@
|
||||
if params[:locale]
|
||||
if I18n.available_locales.include?(params[:locale].to_sym)
|
||||
session[:locale] = params[:locale]
|
||||
|
||||
else
|
||||
flash.now[:notice]= "#{params[:locale]} translation not available"
|
||||
logger.error flash.now[:notice]
|
||||
|
||||
end
|
||||
end
|
||||
http_header=request.env['HTTP_ACCEPT_LANGUAGE']
|
||||
@@ -22,8 +20,8 @@
|
||||
else
|
||||
ht=nil
|
||||
end
|
||||
I18n.locale = session[:locale] || ht || I18n.default_locale
|
||||
|
||||
I18n.locale = session[:locale] || I18n.default_locale
|
||||
# removed ht from selection add || ht to check http header
|
||||
|
||||
session[:locale] = I18n.locale
|
||||
end
|
||||
|
||||
@@ -2,11 +2,23 @@
|
||||
class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController
|
||||
skip_before_filter :verify_authenticity_token
|
||||
def failure
|
||||
|
||||
# flash[:notice] = "Failure #{Hash.new(request.env)} #{Hash.new(params)}"
|
||||
#redirect_to new_user_registration_url , :notice=>"Omniauth Login failed"
|
||||
super
|
||||
end
|
||||
def developer
|
||||
if Rails.env.development?
|
||||
@user= User.find_for_developer_oauth(request.env["omniauth.auth"],current_user)
|
||||
if @user
|
||||
sign_in_and_redirect @user, event: :authentication
|
||||
else
|
||||
redirect_to new_user_registration_url
|
||||
end
|
||||
else
|
||||
flash[:notice]=flash[:notice] + "Still not logged in "
|
||||
redirect_to new_user_registration_url
|
||||
end
|
||||
end
|
||||
def facebook
|
||||
# You need to implement the method below in your model (e.g. app/models/user.rb)
|
||||
@user = User.find_for_facebook_oauth(request.env["omniauth.auth"], current_user)
|
||||
|
||||
@@ -29,12 +29,33 @@ class User < ActiveRecord::Base
|
||||
# Include default devise modules. Others available are:
|
||||
# :token_authenticatable, :confirmable,
|
||||
# :lockable, :timeoutable and :omniauthable
|
||||
devise :database_authenticatable, :recoverable, :rememberable, :trackable, :validatable,:omniauthable, :omniauth_providers => [:facebook,:ldap]
|
||||
devise :database_authenticatable, :recoverable, :rememberable, :trackable, :validatable,:omniauthable, :omniauth_providers => [:facebook,:ldap,:developer]
|
||||
acts_as_voter
|
||||
# Setup accessible (or protected) attributes for your model
|
||||
attr_accessible :email, :password, :password_confirmation, :remember_me, :provider, :uid, :name
|
||||
belongs_to :fetprofile
|
||||
# attr_accessible :title, :body
|
||||
|
||||
def self.find_for_developer_oauth(auth, signed_in_resource=nil)
|
||||
# logger.debug("Developer Login started")
|
||||
# logger.debug(auth.info.to_s)
|
||||
|
||||
# logger.debug(auth.extra.raw_info.to_s)
|
||||
email = auth.info.email.to_s
|
||||
logger.debug("Login E-Mail:"+"'"+ email+"'")
|
||||
user= User.where(:provider=>auth.provider,:uid=>email).first
|
||||
unless user
|
||||
user= User.create(name: email,
|
||||
provider: auth.provider,
|
||||
uid: email,
|
||||
email: email,
|
||||
password:Devise.friendly_token[0,20])
|
||||
user.add_role("fetuser")
|
||||
|
||||
end
|
||||
user
|
||||
end
|
||||
|
||||
def self.find_for_facebook_oauth(auth, signed_in_resource=nil)
|
||||
logger.debug auth.to_s
|
||||
logger.debug "DDD Username= #{auth.username}"
|
||||
|
||||
@@ -1,31 +1,20 @@
|
||||
<div id="<%= beispiel.divid %>" class="contentbox">
|
||||
<div class="row-fluid">
|
||||
<div class="span6" >
|
||||
<div class="span5" >
|
||||
<b><%=link_to ffi1_icon("note20")+" " + beispiel.name + " " + I18n.l(beispiel.datum), beispiel.beispieldatei.url, title: beispiel.desc %></b>
|
||||
</div>
|
||||
<div class="span1" >
|
||||
<%= (beispiel.beispieldatei.size/1024.0).round(2).to_s %>KiB
|
||||
</div>
|
||||
<div class="span5">
|
||||
|
||||
<%=
|
||||
if can?(:like, beispiel)
|
||||
link_to ffi1_icon("like3")+" like" + "("+beispiel.get_likes.size.to_s+")", like_beispiel_path(beispiel),title: "liked by " + ((current_user.liked?(beispiel)) ? ("you and " + ((beispiel.get_likes.size - 1).to_s + " others")) : beispiel.get_likes.size.to_s), remote: true
|
||||
else
|
||||
"liked by " + beispiel.get_likes.size.to_s
|
||||
end
|
||||
%>
|
||||
|
||||
<%=
|
||||
if can?(:dislike, beispiel)
|
||||
link_to ffi1_icon("dislike")+" dislike" + "("+beispiel.get_dislikes.size.to_s+")", dislike_beispiel_path(beispiel),title:"disliked by " + ((current_user.disliked?(beispiel)) ? ("you and " + ((beispiel.get_dislikes.size - 1).to_s + " others")) : beispiel.get_dislikes.size.to_s) , remote: true
|
||||
else
|
||||
"disliked by " + beispiel.get_dislikes.size.to_s
|
||||
end
|
||||
|
||||
%>
|
||||
|
||||
<%= link_to ff_icon("icon-pencil")+"edit", edit_beispiel_path(beispiel) if can? :edit, beispiel%>
|
||||
<div class="span2" >
|
||||
<%= beispiel.lecturer.try(:name).to_s %>
|
||||
</div>
|
||||
<div class="span4">
|
||||
<%= flag_link(beispiel, "goodquality")%>
|
||||
<%= flag_link(beispiel, "badquality")%>
|
||||
<%= flag_link(beispiel, "delete")%>
|
||||
<%= like_dislike_for(beispiel) %>
|
||||
<%= link_to ff_icon("icon-pencil")+"edit", edit_beispiel_path(beispiel), remote: true if can? :edit, beispiel %>
|
||||
<%= link_to fa_icon("trash")+"delete", beispiel_path(beispiel), :method=>:delete, :data=>{:confirm=>I18n.t('beispiel.sure')} if can? :delete, beispiel %>
|
||||
<% link_to "Refresh", beispiel_path(beispiel,show_comments: true), remote: true %></br>
|
||||
</div>
|
||||
@@ -39,4 +28,5 @@
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<%= render_comments_for(beispiel) %>
|
||||
</div>
|
||||
|
||||
@@ -9,7 +9,8 @@
|
||||
</li>
|
||||
</ul>
|
||||
</p>
|
||||
<!--<%= form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| %>
|
||||
|
||||
<%= form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| %>
|
||||
<div><%= f.label :email %><br />
|
||||
<%= f.email_field :email, :autofocus => true %></div>
|
||||
|
||||
@@ -23,6 +24,4 @@
|
||||
<div><%= f.submit "Sign in" %></div>
|
||||
<% end %>
|
||||
|
||||
-->
|
||||
|
||||
<%= render "devise/shared/links" %>
|
||||
|
||||
@@ -65,5 +65,13 @@ end
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<%= render 'layouts/pretty_toolbar' %>
|
||||
<% if can?(:edit, @fetprofile) %>
|
||||
<div>
|
||||
<span>
|
||||
<%= link_to ff_icon("icon-pencil")+I18n.t('common.edit'), edit_fetprofile_path(@fetprofile) if can?(:edit, @fetprofile) %>
|
||||
<%= link_to fa_icon("trash")+I18n.t('common.delete'), fetprofile_path(@fetprofile),method: :delete, data: { confirm: "Are you sure?" } if can?(:delete, @fetprofile) %>
|
||||
</span>
|
||||
</div>
|
||||
<% end %>
|
||||
<%#= render 'layouts/pretty_toolbar' %>
|
||||
</div>
|
||||
|
||||
@@ -7,12 +7,14 @@
|
||||
fjs.parentNode.insertBefore(js, fjs);
|
||||
}(document, 'script', 'facebook-jssdk'));</script>
|
||||
|
||||
<div class="content-wrap content-column" style="max-width:100em;">
|
||||
<div class="content-wrap content-column" style="max-width:90em;">
|
||||
<h1><%= I18n.t('home.willkommen') %></h1>
|
||||
<%= render partial: "themen/small", object: @starttopic %>
|
||||
<%= raw(@starttopic.text) unless @starttopic.nil? %>
|
||||
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<div class="span5">
|
||||
<div class="span4">
|
||||
|
||||
<ul class="linklist">
|
||||
<li>
|
||||
@@ -21,41 +23,43 @@
|
||||
<li>
|
||||
<%= link_to ffi1_icon("academic") + I18n.t('home.login'), user_omniauth_authorize_path(:ldap) ,class: :linkbox %>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<%= link_to ffi1_icon("quiz")+ I18n.t("themengruppe.faqs"), faqs_themengruppen_path,class: :linkbox %>
|
||||
</li>
|
||||
<li><%= link_to ffi1_icon("books19")+"Beispielsammlung", studium_path(Studium.first, {:ansicht=>'semesteransicht'}) ,class: :btn ,class: :linkbox unless Studium.first.nil? %></li>
|
||||
<li><%= link_to ffi1_icon("books19")+"Beispielsammlung", studium_path(Studium.first, {:ansicht=>'semesteransicht'}) ,class: :btn ,class: :linkbox if Studium.count > 0 %></li>
|
||||
<li><%= link_to "Alte Beispielsammlung", "http://www.fet.at/alt/bin/view/Beispielsammlung/WebHome" ,class: :btn ,class: :linkbox %></li>
|
||||
</ul>
|
||||
<ul>
|
||||
|
||||
<% cache("stickytopics_startpage_"+cache_array_key(@stickythemen)) do %>
|
||||
<ul class="linklist">
|
||||
<% @stickythemen.each do |t1| %>
|
||||
<li>
|
||||
<%= link_to t1 do %>
|
||||
<%= render partial: "themen/nlink", object: t %>
|
||||
<%= end %>
|
||||
<%= link_to t1,:class=>:linkbox do %>
|
||||
<%= render partial: "themen/nlink", object: t1 %>
|
||||
<% end %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
||||
<% end %>
|
||||
<%= render 'beispiele' %>
|
||||
<div class="fb-like-box" data-href="https://www.facebook.com/FachschaftET" data-colorscheme="light" data-show-faces="true" data-header="true" data-stream="false" data-show-border="true"></div>
|
||||
|
||||
</div>
|
||||
<div class="span7">
|
||||
<ul class="unstyled linkbox-list" style="margin:5px;">
|
||||
|
||||
<div class="span5">
|
||||
<ul class="unstyled linkbox-list">
|
||||
<% @neuigkeiten.each do |n| %>
|
||||
<li><%= render n if can?(:show, n) %> </li>
|
||||
<% end %>
|
||||
</ul>
|
||||
Verschiedene Styles
|
||||
<ul>
|
||||
<li> <%= link_to "Darkblue", home_index_path({:theme=>"darkblue"}) %></li>
|
||||
<li> <%= link_to "Blue1", home_index_path({:theme=>"blue1"}) %></li>
|
||||
</div>
|
||||
|
||||
<li> <%= link_to "2003", home_index_path({:theme=>"2003"}) %></li>
|
||||
<li> <%= link_to "white_1", home_index_path({:theme=>"white_1"}) %></li>
|
||||
</ul>
|
||||
<div class="span3">
|
||||
<% cache("calendar_" + cache_array_key(@calentries)+params[:month].to_s+params[:year].to_s) do %>
|
||||
<%= render 'calendars/calentries', :object=>@calentries %>
|
||||
<% end %>
|
||||
|
||||
|
||||
<div class="fb-like-box" data-href="https://www.facebook.com/FachschaftET" data-colorscheme="light" data-show-faces="true" data-header="true" data-stream="false" data-show-border="true"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,15 +1,41 @@
|
||||
<h1> FET Intern NEU </h1>
|
||||
<h1> FET Intern NEU blue2</h1>
|
||||
<div class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<div class="span6">
|
||||
<div>
|
||||
<ul class="linklist">
|
||||
<li>
|
||||
<%= link_to "Adressliste", internlist_fetprofiles_path ,class: :linkbox %></li>
|
||||
<li> <%= link_to "Admin" , admin_home_index_path, class: :linkbox if current_user.has_role?(:fetadmin) %>
|
||||
<%= link_to fa_icon("list")+"Adressliste", internlist_fetprofiles_path ,class: :linkbox %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to ff_icon("ffi1-setting")+"Neue Oberfläche" , set_preferred_theme_user_path(current_user, params: {theme: "blue2"}), class: :linkbox if can? :set_preferred_theme , current_user %>
|
||||
</li></ul>
|
||||
<%= link_to ff_icon("ffi1-setting")+"Admin" , admin_home_index_path, class: :linkbox if current_user.has_role?(:fetadmin) %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to ff_icon("fa fa-folder")+"Treeview" , treeview_home_index_path, class: :linkbox if current_user.has_role?(:fetadmin) %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to ff_icon("ffi1-newspaper9")+"Crawler" , crawler_index_path, class: :linkbox if current_user.has_role?(:fetadmin) %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to ff_icon("ffi1-setting")+"Meetings" , meetingtyps_path, class: :linkbox if current_user.has_role?(:fetadmin) %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to ff_icon("ffi1-setting")+"Alte Oberfläche" , set_preferred_theme_user_path(current_user, params: {theme: "blue1"}), class: :linkbox if can? :set_preferred_theme, current_user %>
|
||||
</li>
|
||||
|
||||
</ul><br>
|
||||
</div>
|
||||
<div>Suche nach Protokollen
|
||||
<%= semantic_form_for :search,:remote=>true, :url=>search_documents_path, :html=>{:id=>"search_form",:class=>"", :method=>'get'} do |f| %>
|
||||
<%= f.input :query, :input_html => { :name => 'query' } , :label=>false, :class=>"search-query" %>
|
||||
<% f.actions do %>
|
||||
<% f.action :submit, :as => :input %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<div id="searchresults">
|
||||
<%= render :partial=>"documents/search_results", :object=>@results %>
|
||||
</div>
|
||||
</div>
|
||||
<ul class="unstyled linkbox-list">
|
||||
<li>
|
||||
<% @themengruppen.each do |themengruppe| %>
|
||||
|
||||
@@ -1,20 +1,15 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="shortcut icon" href="https://www.fet.at/logo2014_64.png">
|
||||
|
||||
<link rel="alternate" hreflang="de" href="<%= url_for(params.merge(:locale=>:de))%>" />
|
||||
|
||||
<link rel="alternate" hreflang="en" href="<%= url_for(params.merge(:locale=>:en))%>" />
|
||||
<!--<link rel="shortcut icon" href="http://www.fet.at/favicon.ico">-->
|
||||
<!---->
|
||||
|
||||
<%= 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" %>
|
||||
<%= javascript_include_tag "application" %>
|
||||
<%= csrf_meta_tags %>
|
||||
<% if content_for?(:header) %>
|
||||
|
||||
@@ -44,8 +44,20 @@
|
||||
|
||||
</ul></div>
|
||||
</li>
|
||||
<li>
|
||||
<% if not user_signed_in? %>
|
||||
<% if Rails.env.development? %>
|
||||
<%# link_to I18n.t('home.login'), user_omniauth_authorize_path(:developer) %>
|
||||
<%= render 'layouts/login' %>
|
||||
</ul>
|
||||
|
||||
<% else %>
|
||||
<%= link_to ffi1_icon("academic") + I18n.t('home.login'), user_omniauth_authorize_path(:ldap) %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<%= render 'layouts/login' %>
|
||||
<% end %>
|
||||
|
||||
</li></ul>
|
||||
|
||||
<!--<span class="pull-right"><%if I18n.locale == :en %>
|
||||
<%= link_to image_tag("/flaggen/png/at.png") + " Deutsch" ,switch_locale_url(:de)%>
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
<%= content_for :header do %>
|
||||
<title>Fetsite - <%= @lva.full_name %></title>
|
||||
<% set_meta_tags :og => {
|
||||
:url=>lva_path(:theme=>nil)
|
||||
}
|
||||
:url=>lva_path(:theme=>nil) }
|
||||
%>
|
||||
<%= display_meta_tags %>
|
||||
<% end %>
|
||||
|
||||
<div itemscope itemtype="schema.org/Article" >
|
||||
<div class="container-fluid">
|
||||
<%= render 'studien/tabs'%>
|
||||
@@ -17,6 +15,7 @@
|
||||
<%= render 'layouts/pretty_toolbar' %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row-fluid">
|
||||
<div class="span8">
|
||||
<h1 itemprop="name"><%= @lva.full_name %></h1>
|
||||
@@ -45,6 +44,7 @@
|
||||
<%= @lva.desc.to_s.html_safe %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="span4">
|
||||
<div class="contentbox">
|
||||
@@ -59,10 +59,12 @@
|
||||
<li><b><%= link_to modul.name , modul_path(modul)%></b>
|
||||
<ul>
|
||||
<% modul.modulgruppen.each do |g| %>
|
||||
|
||||
<li><%= link_to g.studium.title_context , studium_path(g.studium)%> (<%=link_to g.name, modulgruppe_path(g)%>)</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -70,34 +72,68 @@
|
||||
<h2> <%= I18n.t "lecturers.lecturers" %> </h2>
|
||||
<% @lva.lecturers.each do |lec| %>
|
||||
<%= render :partial=>'lecturers/lec_lva', :object=>lec %>
|
||||
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<%= new_question_for(@lva) %>
|
||||
<% unless @questions.nil? %>
|
||||
<% @questions.each do |q| %>
|
||||
<%= render q if can? :show, q %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
|
||||
<h2><%= I18n.t("lva.bspe") %></h2>
|
||||
<p><%= I18n.t("lva.ratebsp")%> <%= link_to ffi1_icon("facebook1") + I18n.t('home.fblogin'), user_omniauth_authorize_path(:facebook) ,class: :linkbox %>
|
||||
<p>
|
||||
<%= I18n.t("lva.ratebsp")%>
|
||||
<%= link_to ffi1_icon("facebook1") + I18n.t('home.fblogin'), user_omniauth_authorize_path(:facebook) ,class: :linkbox %>
|
||||
</p>
|
||||
<%= link_to t("beispiel.zip") , beispiel_sammlung_lva_path(@lva), class: :linkbox %>
|
||||
<% @beispiele_all.each do |b| %>
|
||||
<% cache("beispiel_" +I18n.locale.to_s+b.id.to_s+can?(:delete,b).to_s+"_"+can?(:edit,b).to_s + "_" + can?(:flag, b).to_s+ can?(:comment, b).to_s + "_" + can?(:like, b).to_s + "_" + b.updated_at.try(:utc).try(:to_s) + get_theme_help(current_user).to_s) do %>
|
||||
<% @beispiele.each do |b| %>
|
||||
<% cache("beispiel_" +I18n.locale.to_s+b.id.to_s+can?(:delete,b).to_s+"_"+can?(:edit,b).to_s + "_" + can?(:flag, b).to_s + "_" + can?(:like, b).to_s + "_" + b.updated_at.try(:utc).try(:to_s) + get_theme_help(current_user).to_s) do %>
|
||||
<%= render b%>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% if @beispiele_badQ.count > 0 %>
|
||||
<h3> Bad Quality or Outdated</h3>
|
||||
<% @beispiele_badQ.each do |b| %>
|
||||
<% cache("beispiel_" +I18n.locale.to_s+b.id.to_s+can?(:delete,b).to_s+"_"+can?(:edit,b).to_s + "_" + can?(:flag, b).to_s + "_" + can?(:like, b).to_s + "_" + b.updated_at.try(:utc).try(:to_s) + get_theme_help(current_user).to_s) do %>
|
||||
<%= render b%>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% if @beispiele_deleted.count > 0 %>
|
||||
<h3> Trash</h3>
|
||||
<% @beispiele_deleted.each do |b| %>
|
||||
|
||||
<% cache("beispiel_" +I18n.locale.to_s+b.id.to_s+can?(:delete,b).to_s+"_"+can?(:edit,b).to_s + "_" + can?(:flag, b).to_s + "_" + can?(:like, b).to_s + "_" + b.updated_at.try(:utc).try(:to_s) + get_theme_help(current_user).to_s) do %>
|
||||
<%= render b%>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row-fluid"> <div class="span12">
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
|
||||
<% unless @lva.nlinks.empty? %>
|
||||
<h2><%= I18n.t("rubrik.title") %></h2>
|
||||
<% @lva.nlinks.each do |l| %>
|
||||
<%= render l.neuigkeit %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<% cache("lva_beispiel_form_bulk_"+@lva.id.to_s+I18n.locale.to_s+@lva.updated_at.to_i.to_s) do %>
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
@@ -106,6 +142,7 @@
|
||||
</div>
|
||||
|
||||
<% end %>
|
||||
|
||||
<% unless @crawlobjects.nil? %>
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
|
||||
@@ -1,8 +1,21 @@
|
||||
<% if neuigkeit_view.nil?
|
||||
neuigkeit_view=@neuigkeit
|
||||
end
|
||||
%>
|
||||
<div id="neuigkeit_<%= neuigkeit_view.id %>" class="contentbox" itemscope itemtype="http://schema.org/Article">
|
||||
<meta itemprop="about" content="<%= neuigkeit_view.text_first_words %>"/>
|
||||
<meta itemprop="sameAs" content="<%= neuigkeit_url(neuigkeit_view,:theme=>nil)%>"/>
|
||||
<meta itemprop="url" content="<%= neuigkeit_url(neuigkeit_view,:theme=>nil)%>"/>
|
||||
<%= meta_itemprop("about", neuigkeit_view.text_first_words) %>
|
||||
<%= meta_itemprop("sameAs", neuigkeit_url(neuigkeit_view,:theme=>nil)) %>
|
||||
<%= meta_itemprop("url", neuigkeit_url(neuigkeit_view,:theme=>nil)) %>
|
||||
|
||||
<div>
|
||||
<% cache("menu_neuigkeit"+ neuigkeit_view.id.to_s + can?(:edit,neuigkeit_view).to_s + can?(:find_link, neuigkeit_view).to_s + can?(:new, Survey::Question).to_s + can?(:publish, neuigkeit_view).to_s + can?(:unpublish, neuigkeit_view).to_s + neuigkeit_view.published?.to_s + neuigkeit_view.flag_important.to_s + neuigkeit_view.flag_infoscreen.to_s) do %>
|
||||
<%= render partial: "menu" , object: neuigkeit_view%>
|
||||
<% end %>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
<%#= render 'layouts/pretty_toolbar', :object=> @toolbar_elements %>
|
||||
</div>
|
||||
<div class="media">
|
||||
<span itemprop="articleSection">
|
||||
<%= ff_icon(neuigkeit_view.rubrik.icon) unless neuigkeit_view.rubrik.icon.nil? or neuigkeit_view.rubrik.icon.empty? %> <%= neuigkeit_view.rubrik.name %>
|
||||
@@ -15,6 +28,7 @@
|
||||
</span>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<% unless neuigkeit_view.published? %>
|
||||
<div class="sticker sticker-red"> Not Published <%= link_to "Publish", publish_rubrik_neuigkeit_path(neuigkeit_view.rubrik,neuigkeit_view),remote:true, class: :btn if can? :publish, neuigkeit_view %></div>
|
||||
<% end %>
|
||||
@@ -31,7 +45,7 @@
|
||||
<% end %>
|
||||
<div class="media-body">
|
||||
<h1 itemprop="name">
|
||||
<%= raw(neuigkeit_view.title) %> <%= link_to fa_icon("edit"), edit_rubrik_neuigkeit_path(neuigkeit_view.rubrik, neuigkeit_view), remote: true if can? :edit, neuigkeit_view %>
|
||||
<%= raw(neuigkeit_view.title) %> <%#= link_to fa_icon("edit"), edit_rubrik_neuigkeit_path(neuigkeit_view.rubrik, neuigkeit_view), remote: true if can? :edit, neuigkeit_view %>
|
||||
</h1>
|
||||
<div itemprop="articleBody">
|
||||
<%= raw(neuigkeit_view.text) %>
|
||||
@@ -40,14 +54,19 @@
|
||||
</div>
|
||||
|
||||
<%= render_calentries_for(neuigkeit_view)%>
|
||||
|
||||
<%= new_calentry_div(neuigkeit_view) %>
|
||||
<% unless neuigkeit_view.meeting.nil? %>
|
||||
<%= render neuigkeit_view.meeting %>
|
||||
<% end%>
|
||||
|
||||
|
||||
|
||||
<%= render_attachments_for(neuigkeit_view) %>
|
||||
<%= render_attachments_list_for(neuigkeit_view) %>
|
||||
|
||||
<%= render 'layouts/pretty_toolbar', :object=> @toolbar_elements %>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<% @questions.each do |q| %>
|
||||
<%= render q if can? :show, q %>
|
||||
<% end %>
|
||||
|
||||
@@ -38,17 +38,13 @@
|
||||
</p>
|
||||
<%= render partial: "neuigkeit_view", object: @neuigkeit %>
|
||||
|
||||
<%= new_question_for(@neuigkeit) if can? :new, Survey::Question %>
|
||||
<% @questions.each do |q| %>
|
||||
<%= render q if can? :show, q %>
|
||||
<% end %>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="fb-like" data-href"<%= rubrik_neuigkeit_url(@rubrik,@neuigkeit,{themes: nil, locale: nil})%>" data-layout="standard" data-action="like" data-show-faces="true" data-share="true"></div>
|
||||
|
||||
<%= render_comments_for(@neuigkeit) %>
|
||||
|
||||
<%# link_to fa_icon("link") + "Neue Verknüpfung" , "#", id: "findlink-open" if can? :find_link, @neuigkeit %>
|
||||
|
||||
<%= link_to fa_icon("link") + "Neue Verknüpfung" , "#", id: "findlink-open" if can? :find_link, @neuigkeit %>
|
||||
<% cache(cache_array_key(@neuigkeit.nlinks, "NLinks")) do %>
|
||||
<%= render partial: 'neuigkeiten/nlink_list_whole', :object=>@neuigkeit.nlinks %>
|
||||
<% end %>
|
||||
@@ -62,6 +58,7 @@
|
||||
<%= render partial: 'nlink_list_search_whole', object: @nlink_search %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(function(){
|
||||
dialog = $( "#findlink-body" ).dialog({
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<% unless @calentries.nil? or @calentries.empty? or True%>
|
||||
<% unless @calentries.nil? or @calentries.empty? or true%>
|
||||
<div class="span3">
|
||||
<% unless @calentries.nil? or @calentries.empty? %>
|
||||
<% cache("calendar_" + @calentries.map{|c| c.id}.join('') + @calentries.max{|c|c.updated_at.to_i}.updated_at.to_i.to_s+"_"+I18n.locale.to_s+params[:month].to_s+params[:year].to_s) do %>
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
<div id="<%= beispiel.divid %>" class="contentbox">
|
||||
<div class="row-fluid">
|
||||
<div class="span5" >
|
||||
<b><%=link_to ffi1_icon("note20")+" " + beispiel.name + " " + I18n.l(beispiel.datum), beispiel.beispieldatei.url, title: beispiel.desc %></b>
|
||||
</div>
|
||||
<div class="span1" >
|
||||
<%= (beispiel.beispieldatei.size/1024.0).round(2).to_s %>KiB
|
||||
</div>
|
||||
<div class="span2" >
|
||||
<%= beispiel.lecturer.try(:name).to_s %>
|
||||
</div>
|
||||
<div class="span4">
|
||||
<%= flag_link(beispiel, "goodquality")%>
|
||||
<%= flag_link(beispiel, "badquality")%>
|
||||
<%= flag_link(beispiel, "delete")%>
|
||||
<%= like_dislike_for(beispiel) %>
|
||||
<%= link_to ff_icon("icon-pencil")+"edit", edit_beispiel_path(beispiel), remote: true if can? :edit, beispiel %>
|
||||
<%= link_to fa_icon("trash")+"delete", beispiel_path(beispiel), :method=>:delete, :data=>{:confirm=>I18n.t('beispiel.sure')} if can? :delete, beispiel %>
|
||||
<% link_to "Refresh", beispiel_path(beispiel,show_comments: true), remote: true %></br>
|
||||
</div>
|
||||
</div>
|
||||
<% unless beispiel.desc.nil? || beispiel.desc.empty? %>
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
|
||||
<%= beispiel.desc %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<%= render_comments_for(beispiel) %>
|
||||
</div>
|
||||
@@ -1,77 +0,0 @@
|
||||
<%= content_for :header do %>
|
||||
<title>FET - <%= @fetprofile.name %></title>
|
||||
<% unless @fetprofile.picture.url.nil?
|
||||
picture_url=URI(root_url)
|
||||
picture_url.path=@fetprofile.picture.portrait.url
|
||||
end
|
||||
%>
|
||||
|
||||
<% set_meta_tags :og => {
|
||||
:image => picture_url.to_s,
|
||||
:title => @fetprofile.name.to_s ,
|
||||
:type => "profile",
|
||||
:url=>fetprofile_url(@fetprofile,:theme=>nil),
|
||||
:profile=> {
|
||||
:first_name=>@fetprofile.vorname,
|
||||
:last_name=>@fetprofile.nachname
|
||||
}
|
||||
}
|
||||
%>
|
||||
<% set_meta_tags :og=>{:article=> {:published_time=>I18n.l(@neuigkeit.try(:datum).try(:to_date)) }} unless @neuigkeit.try(:datum).try(:to_date).nil? %>
|
||||
|
||||
<%= display_meta_tags %>
|
||||
<% end %>
|
||||
|
||||
|
||||
<%= render 'fetprofiles/tabs' %>
|
||||
|
||||
<div class="content-wrap content-column">
|
||||
|
||||
<p id="notice"><%= notice %></p>
|
||||
<div style="max-width:70em" itemtype="http://schema.org/Person" itemscope>
|
||||
<meta itemprop="sameAs" content="<%= fetprofile_path(@fetprofile, theme: nil) %>"/>
|
||||
<meta itemprop="url" content="<%= fetprofile_path(@fetprofile, theme: nil) %>"/>
|
||||
<div class="media">
|
||||
<span class="pull-left" itemprop="image" itemscope itemtype="http://schema.org/ImageObject">
|
||||
<span itemprop="thumbnail" itemscope itemtype="http://schema.org/ImageObject">
|
||||
<%= image_tag @fetprofile.picture.portrait.url %>
|
||||
<meta itemprop="url" content="<%= @fetprofile.picture.portrait.url%>" />
|
||||
</span>
|
||||
<meta itemprop="url" content="<%= @fetprofile.picture.url%>" />
|
||||
<meta itemprop="representativeOfPage" content="true" />
|
||||
</span>
|
||||
<div class="media-body">
|
||||
<h2><span itemprop="givenName"><%= @fetprofile.vorname %></span><span itemprop="familyName"> <%= @fetprofile.nachname %></span><% unless @fetprofile.short.empty? %><span itemprop=""> <%= @fetprofile.short %> </span><% end %></h2>
|
||||
<meta itemprop="name" content="<%= @fetprofile.name %>" />
|
||||
|
||||
<p itemprop="email">
|
||||
<%= @fetprofile.fetmail %>
|
||||
</p>
|
||||
<p itemprop="description">
|
||||
<%= @fetprofile.desc %>
|
||||
</p>
|
||||
<%= render partial: "interninfo", object: @fetprofile if can?(:seeintern, @fetprofile) %>
|
||||
|
||||
<ul>
|
||||
<% @memberships.each do |m| %>
|
||||
<li>
|
||||
<%= link_to gremium_path(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>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% if can?(:edit, @fetprofile) %>
|
||||
<div>
|
||||
<span>
|
||||
<%= link_to ff_icon("icon-pencil")+I18n.t('common.edit'), edit_fetprofile_path(@fetprofile) if can?(:edit, @fetprofile) %>
|
||||
<%= link_to fa_icon("trash")+I18n.t('common.delete'), fetprofile_path(@fetprofile),method: :delete, data: { confirm: "Are you sure?" } if can?(:delete, @fetprofile) %>
|
||||
</span>
|
||||
</div>
|
||||
<% end %>
|
||||
<%#= render 'layouts/pretty_toolbar' %>
|
||||
</div>
|
||||
@@ -1,67 +0,0 @@
|
||||
<div id="fb-root"></div>
|
||||
<script>(function(d, s, id) {
|
||||
var js, fjs = d.getElementsByTagName(s)[0];
|
||||
if (d.getElementById(id)) return;
|
||||
js = d.createElement(s); js.id = id;
|
||||
js.src = "//connect.facebook.net/de_DE/sdk.js#xfbml=1&appId=120379864660921&version=v2.0";
|
||||
fjs.parentNode.insertBefore(js, fjs);
|
||||
}(document, 'script', 'facebook-jssdk'));</script>
|
||||
|
||||
<div class="content-wrap content-column" style="max-width:90em;">
|
||||
<h1><%= I18n.t('home.willkommen') %></h1>
|
||||
<%= raw(@starttopic.text) unless @starttopic.nil? %>
|
||||
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<div class="span4">
|
||||
|
||||
<ul class="linklist">
|
||||
<li>
|
||||
<%= link_to ffi1_icon("facebook1") + I18n.t('home.fblogin'), user_omniauth_authorize_path(:facebook) ,class: :linkbox %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to ffi1_icon("academic") + I18n.t('home.login'), user_omniauth_authorize_path(:ldap) ,class: :linkbox %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to ffi1_icon("quiz")+ I18n.t("themengruppe.faqs"), faqs_themengruppen_path,class: :linkbox %>
|
||||
</li>
|
||||
<li><%= link_to ffi1_icon("books19")+"Beispielsammlung", studium_path(Studium.first, {:ansicht=>'semesteransicht'}) ,class: :btn ,class: :linkbox if Studium.count > 0 %></li>
|
||||
<li><%= link_to "Alte Beispielsammlung", "http://www.fet.at/alt/bin/view/Beispielsammlung/WebHome" ,class: :btn ,class: :linkbox %></li>
|
||||
</ul>
|
||||
|
||||
<% cache("stickytopics_startpage_"+cache_array_key(@stickythemen)) do %>
|
||||
<ul class="linklist">
|
||||
<% @stickythemen.each do |t1| %>
|
||||
<li>
|
||||
<%= link_to t1,:class=>:linkbox do %>
|
||||
<%= render partial: "themen/nlink", object: t1 %>
|
||||
<% end %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<% end %>
|
||||
<%= render 'beispiele' %>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="span5">
|
||||
<ul class="unstyled linkbox-list">
|
||||
<% @neuigkeiten.each do |n| %>
|
||||
<li><%= render n if can?(:show, n) %> </li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="span3">
|
||||
<% cache("calendar_" + cache_array_key(@calentries)+params[:month].to_s+params[:year].to_s) do %>
|
||||
<%= render 'calendars/calentries', :object=>@calentries %>
|
||||
<% end %>
|
||||
|
||||
|
||||
<div class="fb-like-box" data-href="https://www.facebook.com/FachschaftET" data-colorscheme="light" data-show-faces="true" data-header="true" data-stream="false" data-show-border="true"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,62 +0,0 @@
|
||||
<h1> FET Intern NEU blue2</h1>
|
||||
<div class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<div class="span6">
|
||||
<div>
|
||||
<ul class="linklist">
|
||||
<li>
|
||||
<%= link_to fa_icon("list")+"Adressliste", internlist_fetprofiles_path ,class: :linkbox %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to ff_icon("ffi1-setting")+"Admin" , admin_home_index_path, class: :linkbox if current_user.has_role?(:fetadmin) %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to ff_icon("fa fa-folder")+"Treeview" , treeview_home_index_path, class: :linkbox if current_user.has_role?(:fetadmin) %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to ff_icon("ffi1-newspaper9")+"Crawler" , crawler_index_path, class: :linkbox if current_user.has_role?(:fetadmin) %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to ff_icon("ffi1-setting")+"Meetings" , meetingtyps_path, class: :linkbox if current_user.has_role?(:fetadmin) %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to ff_icon("ffi1-setting")+"Alte Oberfläche" , set_preferred_theme_user_path(current_user, params: {theme: "blue1"}), class: :linkbox if can? :set_preferred_theme, current_user %>
|
||||
</li>
|
||||
|
||||
</ul><br>
|
||||
</div>
|
||||
<div>Suche nach Protokollen
|
||||
<%= semantic_form_for :search,:remote=>true, :url=>search_documents_path, :html=>{:id=>"search_form",:class=>"", :method=>'get'} do |f| %>
|
||||
<%= f.input :query, :input_html => { :name => 'query' } , :label=>false, :class=>"search-query" %>
|
||||
<% f.actions do %>
|
||||
<% f.action :submit, :as => :input %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<div id="searchresults">
|
||||
<%= render :partial=>"documents/search_results", :object=>@results %>
|
||||
</div>
|
||||
</div>
|
||||
<ul class="unstyled linkbox-list">
|
||||
<li>
|
||||
<% @themengruppen.each do |themengruppe| %>
|
||||
<div class="container-fluid">
|
||||
<%= render themengruppe if can?(:show,themengruppe)%>
|
||||
</div>
|
||||
<% end %>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<%= link_to "Users", users_path %>
|
||||
</div>
|
||||
<div class="span6">
|
||||
<h2>Neuigkeiten</h2>
|
||||
<ul class="unstyled linkbox-list">
|
||||
<% @neuigkeiten.each do |n| %>
|
||||
<li><%= render n if can?(:show, n) %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h2></h2>
|
||||
@@ -1,66 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="shortcut icon" href="https://www.fet.at/logo2014_64.png">
|
||||
|
||||
<link rel="alternate" hreflang="de" href="<%= url_for(params.merge(:locale=>:de))%>" />
|
||||
<link rel="alternate" hreflang="en" href="<%= url_for(params.merge(:locale=>:en))%>" />
|
||||
|
||||
<%= stylesheet_link_tag "themes/"+theme_name+"/application", :media => "all" unless theme_name.empty? %>
|
||||
<%= stylesheet_link_tag "application", :media=>"all" if theme_name.empty? %>
|
||||
<%= javascript_include_tag "application" %>
|
||||
<%= csrf_meta_tags %>
|
||||
<% if content_for?(:header) %>
|
||||
<%= yield :header %>
|
||||
<% else %>
|
||||
<title>Fetsite</title>
|
||||
<% end %>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="maincontainer" class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<div class="span10 offset1 header_span">
|
||||
<% cache("menu_u"+user_signed_in?.to_s+current_user.try(:id).to_s+"l"+I18n.locale.to_s+ can?(:seeintern, User).to_s+ can?(:index,Gallery).to_s+params[:theme].to_s, expires_in: 24.hours) do %>
|
||||
<div class="header_wrap">
|
||||
<div class="header hidden-print">
|
||||
<%= link_to home_index_path do %>
|
||||
<!-- <span class="feticon-fet_logo fa-4x color-1"> </span>-->
|
||||
<%= image_tag('/logo2014_64.png',{:style=>"float:left;height:50px",:height=>"50"}) %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="header visible-print">
|
||||
<%= image_tag('/logo2014_64.png',{:style=>"float:left;height:50px",:height=>"50"}) %>
|
||||
</div>
|
||||
<div class="visible-print">
|
||||
Fachschaft Elektrotechnik
|
||||
<hr/>
|
||||
</div>
|
||||
<div id="menudiv" style="margin-top:12px" class="hidden-print">
|
||||
<%= render :template => 'layouts/menu' %>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row-fluid">
|
||||
<div class="span10 offset1" id="contentdiv">
|
||||
<%= yield %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$('.dropdown-toggle').click(function(e) {
|
||||
e.preventDefault();
|
||||
setTimeout($.proxy(function() {
|
||||
if ('ontouchstart' in document.documentElement) {
|
||||
$(this).siblings('.dropdown-backdrop').off().remove();
|
||||
}
|
||||
}, this), 0);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,62 +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>
|
||||
<% if can? :index, Gallery %>
|
||||
<li><%= link_to I18n.t('fotos',:scope=>'home' ),galleries_path %></li>
|
||||
<% end %>
|
||||
<li><%= link_to I18n.t(:studien,:scope=>'home' ), studien_path %></li>
|
||||
<li> <%= link_to I18n.t("home.search"), search_home_index_path %></li>
|
||||
<li> <%= link_to I18n.t("home.kontakt"), kontakt_home_index_path %></li>
|
||||
<% if can?(:seeintern, User) %>
|
||||
<li>
|
||||
<%= link_to 'Intern' , intern_home_index_path %>
|
||||
</li><% end %>
|
||||
</ul>
|
||||
<ul class="nav nav-pills nav-stacked pull-right">
|
||||
<li>
|
||||
<!--<a href="#" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" > <%= image_tag("/flaggen/png/"+I18n.locale.to_s+".png") + " " +I18n.t('sprache',:scope=>'home')%><b class="caret"></b></a>-->
|
||||
<!-- Split button -->
|
||||
<div class="btn-group navbar-btn">
|
||||
<button type="button" class="btn btn-link dropdown-toggle" data-hover="dropdown" aria-expanded="false">
|
||||
<%= image_tag("/flaggen/png/"+I18n.locale.to_s+".png") + " " +I18n.t('sprache',:scope=>'home')%>
|
||||
</button>
|
||||
<button type="button" class="btn btn-link dropdown-toggle" data-hover="dropdown" data-toggle="dropdown" >
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li><%= link_to image_tag("/flaggen/png/at.png") + " Deutsch" ,switch_locale_url(:de)%> </li>
|
||||
|
||||
<li><%= link_to image_tag("/flaggen/png/gb.png") + " English" ,switch_locale_url(:en)%> </li>
|
||||
|
||||
</ul></div>
|
||||
</li>
|
||||
<%= render 'layouts/login' %>
|
||||
</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,158 +0,0 @@
|
||||
<%= content_for :header do %>
|
||||
<title>Fetsite - <%= @lva.full_name %></title>
|
||||
<% set_meta_tags :og => {
|
||||
:url=>lva_path(:theme=>nil) }
|
||||
%>
|
||||
<%= display_meta_tags %>
|
||||
<% end %>
|
||||
<div itemscope itemtype="schema.org/Article" >
|
||||
<div class="container-fluid">
|
||||
<%= render 'studien/tabs'%>
|
||||
<p id="notice"><%= notice %></p>
|
||||
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<%= render 'layouts/pretty_toolbar' %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row-fluid">
|
||||
<div class="span8">
|
||||
<h1 itemprop="name"><%= @lva.full_name %></h1>
|
||||
<meta itemprop="url" content="<%= lva_path(@lva) %>" />
|
||||
<ul class="linklist">
|
||||
<li>
|
||||
<%= link_to ffi1_icon("live2")+"ET-Forum", @lva.forumlink, class: :linkbox, itemprop: "discussionUrl" unless @lva.forumlink.nil? or @lva.forumlink.empty?%>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to "TISS", @lva.tisslink, class: :linkbox %>
|
||||
</li>
|
||||
</ul>
|
||||
<div itemprop="articleBody">
|
||||
<h2><%= I18n.t('lva.pruefungsinfo')%></h2>
|
||||
<div class="">
|
||||
<%= @lva.pruefungsinformation.to_s.html_safe %>
|
||||
</div>
|
||||
|
||||
<h2><%= I18n.t('lva.lernaufwand')%></h2>
|
||||
<div class="">
|
||||
<%= @lva.lernaufwand %>
|
||||
</div>
|
||||
|
||||
<h2><%= I18n.t('lva.desc')%></h2>
|
||||
<div class="">
|
||||
<%= @lva.desc.to_s.html_safe %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="span4">
|
||||
<div class="contentbox">
|
||||
<ul>
|
||||
<li><b><%= I18n.t('lva.lvanr')%>:</b> <%=@lva.lvanr %></li>
|
||||
<li><b>ECTS:</b> <%=@lva.ects %></li>
|
||||
<li><b><%= I18n.t('lva.stunden')%>:</b> <%=@lva.stunden %></li>
|
||||
</ul>
|
||||
<h2><%= I18n.t('lva.module')%></h2>
|
||||
<ul>
|
||||
<% @lva.modul.each do |modul| %>
|
||||
<li><b><%= link_to modul.name , modul_path(modul)%></b>
|
||||
<ul>
|
||||
<% modul.modulgruppen.each do |g| %>
|
||||
|
||||
<li><%= link_to g.studium.title_context , studium_path(g.studium)%> (<%=link_to g.name, modulgruppe_path(g)%>)</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="contentbox">
|
||||
<h2> <%= I18n.t "lecturers.lecturers" %> </h2>
|
||||
<% @lva.lecturers.each do |lec| %>
|
||||
<%= render :partial=>'lecturers/lec_lva', :object=>lec %>
|
||||
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<%= new_question_for(@lva) %>
|
||||
<% unless @questions.nil? %>
|
||||
<% @questions.each do |q| %>
|
||||
<%= render q if can? :show, q %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
|
||||
<h2><%= I18n.t("lva.bspe") %></h2>
|
||||
<p>
|
||||
<%= I18n.t("lva.ratebsp")%>
|
||||
<%= link_to ffi1_icon("facebook1") + I18n.t('home.fblogin'), user_omniauth_authorize_path(:facebook) ,class: :linkbox %>
|
||||
</p>
|
||||
<%= link_to t("beispiel.zip") , beispiel_sammlung_lva_path(@lva), class: :linkbox %>
|
||||
<% @beispiele.each do |b| %>
|
||||
<% cache("beispiel_" +I18n.locale.to_s+b.id.to_s+can?(:delete,b).to_s+"_"+can?(:edit,b).to_s + "_" + can?(:flag, b).to_s + "_" + can?(:like, b).to_s + "_" + b.updated_at.try(:utc).try(:to_s) + get_theme_help(current_user).to_s) do %>
|
||||
<%= render b%>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% if @beispiele_badQ.count > 0 %>
|
||||
<h3> Bad Quality or Outdated</h3>
|
||||
<% @beispiele_badQ.each do |b| %>
|
||||
<% cache("beispiel_" +I18n.locale.to_s+b.id.to_s+can?(:delete,b).to_s+"_"+can?(:edit,b).to_s + "_" + can?(:flag, b).to_s + "_" + can?(:like, b).to_s + "_" + b.updated_at.try(:utc).try(:to_s) + get_theme_help(current_user).to_s) do %>
|
||||
<%= render b%>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% if @beispiele_deleted.count > 0 %>
|
||||
<h3> Trash</h3>
|
||||
<% @beispiele_deleted.each do |b| %>
|
||||
|
||||
<% cache("beispiel_" +I18n.locale.to_s+b.id.to_s+can?(:delete,b).to_s+"_"+can?(:edit,b).to_s + "_" + can?(:flag, b).to_s + "_" + can?(:like, b).to_s + "_" + b.updated_at.try(:utc).try(:to_s) + get_theme_help(current_user).to_s) do %>
|
||||
<%= render b%>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
|
||||
<% unless @lva.nlinks.empty? %>
|
||||
<h2><%= I18n.t("rubrik.title") %></h2>
|
||||
<% @lva.nlinks.each do |l| %>
|
||||
<%= render l.neuigkeit %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<% cache("lva_beispiel_form_bulk_"+@lva.id.to_s+I18n.locale.to_s+@lva.updated_at.to_i.to_s) do %>
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<%= render 'beispiele/form_bulk' %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<% end %>
|
||||
|
||||
<% unless @crawlobjects.nil? %>
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<% @crawlobjects.each do |co| %>
|
||||
<%= render co %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,72 +0,0 @@
|
||||
<% if neuigkeit_view.nil?
|
||||
neuigkeit_view=@neuigkeit
|
||||
end
|
||||
%>
|
||||
<div id="neuigkeit_<%= neuigkeit_view.id %>" class="contentbox" itemscope itemtype="http://schema.org/Article">
|
||||
<%= meta_itemprop("about", neuigkeit_view.text_first_words) %>
|
||||
<%= meta_itemprop("sameAs", neuigkeit_url(neuigkeit_view,:theme=>nil)) %>
|
||||
<%= meta_itemprop("url", neuigkeit_url(neuigkeit_view,:theme=>nil)) %>
|
||||
|
||||
<div>
|
||||
<% cache("menu_neuigkeit"+ neuigkeit_view.id.to_s + can?(:edit,neuigkeit_view).to_s + can?(:find_link, neuigkeit_view).to_s + can?(:new, Survey::Question).to_s + can?(:publish, neuigkeit_view).to_s + can?(:unpublish, neuigkeit_view).to_s + neuigkeit_view.published?.to_s + neuigkeit_view.flag_important.to_s + neuigkeit_view.flag_infoscreen.to_s) do %>
|
||||
<%= render partial: "menu" , object: neuigkeit_view%>
|
||||
<% end %>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
<%#= render 'layouts/pretty_toolbar', :object=> @toolbar_elements %>
|
||||
</div>
|
||||
<div class="media">
|
||||
<span itemprop="articleSection">
|
||||
<%= ff_icon(neuigkeit_view.rubrik.icon) unless neuigkeit_view.rubrik.icon.nil? or neuigkeit_view.rubrik.icon.empty? %> <%= neuigkeit_view.rubrik.name %>
|
||||
</span>
|
||||
<span class="pull-right">
|
||||
<span itemprop="author"><%= neuigkeit_view.author.email.to_s unless neuigkeit_view.try(:author).try(:email).to_s %>
|
||||
<%= neuigkeit_view.author.text %></span>
|
||||
<% unless neuigkeit_view.try(:datum).try(:to_date).nil? %>
|
||||
<%= " "+ I18n.t("neuigkeit.am")+" " %><span itemprop="datePublished"><%= I18n.l(neuigkeit_view.try(:datum).try(:to_date)) %>
|
||||
</span>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<% unless neuigkeit_view.published? %>
|
||||
<div class="sticker sticker-red"> Not Published <%= link_to "Publish", publish_rubrik_neuigkeit_path(neuigkeit_view.rubrik,neuigkeit_view),remote:true, class: :btn if can? :publish, neuigkeit_view %></div>
|
||||
<% end %>
|
||||
<% unless neuigkeit_view.origurl.nil? || neuigkeit_view.origurl.empty? %>
|
||||
<div class="alert"><%= link_to "Zitiert von "+ neuigkeit_view.origurl, neuigkeit_view.origurl %>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="media">
|
||||
<% unless neuigkeit_view.picture_robust.big_thumb.to_s.empty? %>
|
||||
<div class="pull-left" href="#">
|
||||
<p><br><%= link_to image_tag(neuigkeit_view.picture_robust.big_thumb),neuigkeit_view.picture_robust.try(:url) %>
|
||||
</p>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="media-body">
|
||||
<h1 itemprop="name">
|
||||
<%= raw(neuigkeit_view.title) %> <%#= link_to fa_icon("edit"), edit_rubrik_neuigkeit_path(neuigkeit_view.rubrik, neuigkeit_view), remote: true if can? :edit, neuigkeit_view %>
|
||||
</h1>
|
||||
<div itemprop="articleBody">
|
||||
<%= raw(neuigkeit_view.text) %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%= render_calentries_for(neuigkeit_view)%>
|
||||
<%= new_calentry_div(neuigkeit_view) %>
|
||||
<% unless neuigkeit_view.meeting.nil? %>
|
||||
<%= render neuigkeit_view.meeting %>
|
||||
<% end%>
|
||||
|
||||
|
||||
|
||||
<%= render_attachments_list_for(neuigkeit_view) %>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<% @questions.each do |q| %>
|
||||
<%= render q if can? :show, q %>
|
||||
<% end %>
|
||||
@@ -1,77 +0,0 @@
|
||||
<%= content_for :header do %>
|
||||
<title>Fetsite - <%= @neuigkeit.title %> (<%= @neuigkeit.rubrik.name %>)</title>
|
||||
<% set_meta_tags :author => fetprofile_path(@neuigkeit.author.fetprofile) unless @neuigkeit.author.fetprofile.nil? %>
|
||||
<% unless @neuigkeit.picture_robust.url.nil? %>
|
||||
<%
|
||||
picture_url=URI(root_url)
|
||||
picture_url.path=@neuigkeit.picture_robust.url(:locale=>nil, :theme=>nil)
|
||||
%>
|
||||
<% end %>
|
||||
<% set_meta_tags :og =>
|
||||
{
|
||||
:image => picture_url.to_s,
|
||||
:title => @neuigkeit.title.to_s + " (" + @neuigkeit.rubrik.name.to_s + ")",
|
||||
:type => "article",
|
||||
:description =>@neuigkeit.text_first_words,
|
||||
:url=>neuigkeit_url(:theme=>nil)
|
||||
}
|
||||
%>
|
||||
<%= display_meta_tags %>
|
||||
<% end %>
|
||||
|
||||
<%= render 'rubriken/tabs' %>
|
||||
|
||||
<div id="fb-root"></div>
|
||||
|
||||
<script>(function(d, s, id) {
|
||||
var js, fjs = d.getElementsByTagName(s)[0];
|
||||
if (d.getElementById(id)) return;
|
||||
js = d.createElement(s); js.id = id;
|
||||
js.src = "//connect.facebook.net/de_DE/sdk.js#xfbml=1&appId=120379864660921&version=v2.0";
|
||||
fjs.parentNode.insertBefore(js, fjs);
|
||||
}(document, 'script', 'facebook-jssdk'));</script>
|
||||
|
||||
<div class="content-column content-wrap">
|
||||
<%= link_to "Refresh", neuigkeit_path(@neuigkeit), remote: true %>
|
||||
<p id="notice">
|
||||
<%= notice %>
|
||||
</p>
|
||||
<%= render partial: "neuigkeit_view", object: @neuigkeit %>
|
||||
|
||||
</div>
|
||||
<div class="fb-like" data-href"<%= rubrik_neuigkeit_url(@rubrik,@neuigkeit,{themes: nil, locale: nil})%>" data-layout="standard" data-action="like" data-show-faces="true" data-share="true"></div>
|
||||
|
||||
<%= render_comments_for(@neuigkeit) %>
|
||||
|
||||
<%# link_to fa_icon("link") + "Neue Verknüpfung" , "#", id: "findlink-open" if can? :find_link, @neuigkeit %>
|
||||
|
||||
<% cache(cache_array_key(@neuigkeit.nlinks, "NLinks")) do %>
|
||||
<%= render partial: 'neuigkeiten/nlink_list_whole', :object=>@neuigkeit.nlinks %>
|
||||
<% end %>
|
||||
|
||||
<div id="findlink-body" class="ui-dialog" style="">
|
||||
<% if can? :find_link, @neuigkeit %>
|
||||
Nach Element suchen:
|
||||
<%= semantic_form_for :find_link, :url=>find_link_rubrik_neuigkeit_path(@rubrik,@neuigkeit), :html=>{:id=>"search_form", :method=>'get'} , :remote=> true do |f| %>
|
||||
<%= f.input :query, :input_html => { :name => 'query' },:label=>false %>
|
||||
<% end %>
|
||||
<%= render partial: 'nlink_list_search_whole', object: @nlink_search %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(function(){
|
||||
dialog = $( "#findlink-body" ).dialog({
|
||||
autoOpen: false,
|
||||
width: 350,
|
||||
modal: true,
|
||||
title: "Neue Verknüpfung hinzufügen",
|
||||
buttons: {
|
||||
"Fertig": function() {
|
||||
dialog.dialog( "close" );
|
||||
}
|
||||
}
|
||||
});
|
||||
$("#findlink-open").on("click",function(){dialog.dialog("open")})
|
||||
});
|
||||
</script>
|
||||
@@ -225,6 +225,7 @@ Devise.setup do |config|
|
||||
# up on your models and hooks.
|
||||
#config.omniauth :facebook, 'appid', 'secret'
|
||||
secrets = YAML.load_file("#{::Rails.root.to_s}/config/omniauth_secrets.yml")
|
||||
config.omniauth :developer,:title => "Developer" unless Rails.env.production?
|
||||
config.omniauth :facebook, secrets["facebook"]["appid"], secrets["facebook"]["secret"]
|
||||
config.omniauth :ldap, :title => "My LDAP",
|
||||
:host => secrets["ldap"]["host"],
|
||||
@@ -236,6 +237,8 @@ Devise.setup do |config|
|
||||
:bind_dn =>secrets["ldap"]['bind'],
|
||||
:password => secrets["ldap"]['password']
|
||||
|
||||
|
||||
|
||||
# ==> Warden configuration<<
|
||||
# If you want to use other strategies, that are not supported by Devise, or
|
||||
# change the failure app, you can configure them inside the config.warden block.
|
||||
|
||||
@@ -72,6 +72,7 @@ end
|
||||
end
|
||||
end
|
||||
devise_for :users , :controllers=>{:omniauth_callbacks=> "users/omniauth_callbacks"}
|
||||
#match '/auth/:provider/callback', to: "session#new", via: [:get, :post]
|
||||
|
||||
|
||||
scope '(:locale)', constraints: {:locale=>/en|de/i} do
|
||||
|
||||
@@ -3,7 +3,7 @@ production:
|
||||
hostname: localhost
|
||||
port: 8080
|
||||
log_level: WARNING
|
||||
path: /solr/#/default #production #ollection1 #production
|
||||
path: /solr-4.10.2/default #production #ollection1 #production
|
||||
# solr_home: solr
|
||||
# read_timeout: 2
|
||||
# open_timeout: 0.5
|
||||
|
||||
Reference in New Issue
Block a user