12 Commits

Author SHA1 Message Date
Pet
5f5fed7881 fixed to string conversion in missing galleries and photos 2018-10-29 10:52:26 +01:00
Pet
638795b8d3 nil? not nill? 2018-06-03 22:49:57 +02:00
Pet
1b3e5694c9 changed the infoscreenframe.css location 2018-05-23 16:49:33 +02:00
Pet
d7ff42dc18 Added the verleihkalender auto reload 2018-05-15 21:26:22 +02:00
Pet
37956e673d Added the verleihkalender auto reload 2018-05-15 21:24:33 +02:00
Pet
2f43d5966f Added the verleihkalender view 2018-05-15 21:21:09 +02:00
Pet
df3b771048 Added the verleihkalender view 2018-05-15 20:59:29 +02:00
Pet
c7267f9299 Added the verleihkalender view also to routes.rb 2018-05-15 20:34:28 +02:00
Pet
2afbd0fa45 Added the verleihkalender view 2018-05-15 20:15:01 +02:00
Pet
165268d695 Added the verleihkalender view 2018-05-15 20:14:44 +02:00
Pet
ad36b8dfc7 Merge branch 'latest' of https://git.triton.fet.at/git/fetsite into latest 2018-05-15 20:06:11 +02:00
Pet
cc3eccd43d Startseite - facebook login 2018-05-15 20:06:02 +02:00
10 changed files with 106 additions and 86 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

View File

@@ -25,6 +25,11 @@ class HomeController < ApplicationController
@neuigkeiten = Neuigkeit.accessible_by(current_ability, :show).where(flag_infoscreen: true) @neuigkeiten = Neuigkeit.accessible_by(current_ability, :show).where(flag_infoscreen: true)
render layout: false render layout: false
end end
def verleihkalender
authorize! :verleihkalender, User
#@neuigkeiten = Neuigkeit.accessible_by(current_ability, :show).where(flag_infoscreen: true)
render layout: false
end
def kontakt def kontakt
t=YAML.load_file("#{::Rails.root.to_s}/config/contact_topic.yml") t=YAML.load_file("#{::Rails.root.to_s}/config/contact_topic.yml")
@themen = Thema.where(:id=>t) @themen = Thema.where(:id=>t)
@@ -116,5 +121,4 @@ class HomeController < ApplicationController
File.open("config/contact_topic.yml",'w'){|f| f.write(t.to_yaml)} File.open("config/contact_topic.yml",'w'){|f| f.write(t.to_yaml)}
redirect_to admin_home_index_path redirect_to admin_home_index_path
end end
end end

View File

@@ -16,6 +16,9 @@ local=IPAddr.new("127.0.0.1")
if (user.has_role?("fetuser") || user.has_role?("fetadmin") || tunet.include?(IPAddr.new(request.remote_ip)) || local.include?(IPAddr.new(request.remote_ip))) if (user.has_role?("fetuser") || user.has_role?("fetadmin") || tunet.include?(IPAddr.new(request.remote_ip)) || local.include?(IPAddr.new(request.remote_ip)))
can :infoscreen, User can :infoscreen, User
end end
if (user.has_role?("fetuser") || user.has_role?("fetadmin") || tunet.include?(IPAddr.new(request.remote_ip)) || local.include?(IPAddr.new(request.remote_ip)))
can :verleihkalender, User
end
if( user.has_role?("fetuser") || user.has_role?("fetadmin")) if( user.has_role?("fetuser") || user.has_role?("fetadmin"))
can [:show,:answer, :create,:new, :create_from_template, :flag], Survey::Question can [:show,:answer, :create,:new, :create_from_template, :flag], Survey::Question

View File

@@ -72,7 +72,7 @@ class Document < ActiveRecord::Base
unless self.is_etherpad? || self.id.nil? unless self.is_etherpad? || self.id.nil?
self.etherpadkey="document_"+ self.id.to_s self.etherpadkey="document_"+ self.id.to_s
if self.text.nill? if self.text.nil?
self.ep_pad.html = '<div>'+"text"+'</div>' self.ep_pad.html = '<div>'+"text"+'</div>'
else else
self.ep_pad.html = '<div>'+self.text+'</div>' self.ep_pad.html = '<div>'+self.text+'</div>'
@@ -81,7 +81,7 @@ class Document < ActiveRecord::Base
end end
def dump_to_etherpad def dump_to_etherpad
if self.is_etherpad? if self.is_etherpad?
if self.text.nill? if self.text.nil?
self.ep_pad.html = '<div>'+"text"+'</div>' self.ep_pad.html = '<div>'+"text"+'</div>'
else else
self.ep_pad.html = '<div>'+self.text+'</div>' self.ep_pad.html = '<div>'+self.text+'</div>'

View File

@@ -8,10 +8,9 @@ top: 0" %>
<% #, gallery_foto_path(@foto.gallery, ((@foto.gallery.fotos[@foto.gallery.fotos.index(@foto)+1].nil?) ? (@foto.gallery.fotos[0].try(:id).to_i) : @foto.gallery.fotos[@foto.gallery.fotos.index(@foto)+1].try(:id).to_i) ) %> <% #, gallery_foto_path(@foto.gallery, ((@foto.gallery.fotos[@foto.gallery.fotos.index(@foto)+1].nil?) ? (@foto.gallery.fotos[0].try(:id).to_i) : @foto.gallery.fotos[@foto.gallery.fotos.index(@foto)+1].try(:id).to_i) ) %>
<div style="position:absolute; bottom:0; "> <div style="position:absolute; bottom:0; ">
<%= link_to ff_icon('icon-circle-arrow-down').html_safe, @foto.datei.url, <%= link_to ff_icon('icon-circle-arrow-down').html_safe, @foto.datei.url,
:class=>"btn",title: I18n.t('fotos.download')+': '+@foto.title,:target=>:blank, :style=>"" %> :class=>"btn",title: I18n.t('fotos.download')+': '+@foto.title.to_s,:target=>:blank, :style=>"" %>
<!-- <div class="fb-like" data-href"<%= gallery_foto_path(@foto.gallery,@foto, {fotoid:@foto.id,theme: nil, locale: nil})%>" data-layout="standard" data-action="like" data-show-faces="true" data-share="true"></div>--> <!-- <div class="fb-like" data-href"<%= gallery_foto_path(@foto.gallery,@foto, {fotoid:@foto.id,theme: nil, locale: nil})%>" data-layout="standard" data-action="like" data-show-faces="true" data-share="true"></div>-->
<%= render_shareable :url=>gallery_foto_url(@foto.gallery,@foto, {theme: nil, locale: nil}),:static_link=>true, :buttons=>[:facebook, :twitter, :google_plus] %> <%= render_shareable :url=>gallery_foto_url(@foto.gallery,@foto, {theme: nil, locale: nil}),:static_link=>true, :buttons=>[:facebook, :twitter, :google_plus] %>
<p id="notice"><%= notice %></p> <p id="notice"><%= notice %></p>
</div> </div>

View File

@@ -145,9 +145,12 @@ end
</div> </div>
</div> </div>
<%= link_to ff_icon('icon-circle-arrow-down').html_safe, f.datei.url, <%= link_to ff_icon('icon-circle-arrow-down').html_safe, f.datei.url,
:class=>"btn-small",title: I18n.t('fotos.download')+': '+f.title.to_s, rel: 'tooltip' %> :class=>"btn-small",title: I18n.t('fotos.download').to_s+': '+f.title.to_s, rel: 'tooltip' %>
<%= link_to ff_icon('icon-remove-circle').html_safe, gallery_foto_path(@gallery, f), <%= link_to ff_icon('icon-remove-circle').html_safe, gallery_foto_path(@gallery, f),
:method => :delete, :class=>"btn-small btn-danger",title: I18n.t('fotos.delete')+': '+f.title, rel: 'tooltip', confirm: I18n.t('fotos.delete')+': '+f.title+', Sicher?' if can?(:delete,f) %> :method => :delete, :class=>"btn-small btn-danger",
title: I18n.t('fotos.delete').to_s+': '+f.title.to_s, rel: 'tooltip',
confirm: I18n.t('fotos.delete').to_s+': '+f.title.to_s+',
Sicher?' if can?(:delete,f) %>
<p></p> <p></p>
</div> </div>
<% end %> <% end %>
@@ -221,5 +224,3 @@ end
* html .fb-like{display:inline}/* ie6 inline block fix*/ * html .fb-like{display:inline}/* ie6 inline block fix*/
*+html .fb-like{display:inline}/* ie7 inline block fix*/ *+html .fb-like{display:inline}/* ie7 inline block fix*/
</style> </style>

View File

@@ -15,9 +15,6 @@
<div class="span5"> <div class="span5">
<ul class="linklist"> <ul class="linklist">
<li>
<%= link_to ffi1_icon("facebook1") + I18n.t('home.fblogin'), user_omniauth_authorize_path(:facebook) ,class: :linkbox %>
</li>
<li> <li>
<%= link_to ffi1_icon("academic") + I18n.t('home.login'), user_omniauth_authorize_path(:ldap) ,class: :linkbox %> <%= link_to ffi1_icon("academic") + I18n.t('home.login'), user_omniauth_authorize_path(:ldap) ,class: :linkbox %>
</li> </li>
@@ -60,4 +57,3 @@ Verschiedene Styles
</div> </div>
</div> </div>
</div> </div>

View File

@@ -3,7 +3,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<%= stylesheet_link_tag "themes/"+theme_name+"/application", :media => "all" unless theme_name.empty? %> <%= stylesheet_link_tag "themes/"+theme_name+"/application", :media => "all" unless theme_name.empty? %>
<%= stylesheet_link_tag "application", :media=>"all" if theme_name.empty? %> <%= stylesheet_link_tag "application", :media=>"all" if theme_name.empty? %>
<%= stylesheet_link_tag "infoscreenframe.css" %> <%= stylesheet_link_tag "/iframe/infoscreenframe.css" %>
<%= javascript_include_tag "application" %> <%= javascript_include_tag "application" %>
<%= javascript_include_tag "jmpress" %> <%= javascript_include_tag "jmpress" %>

View File

@@ -0,0 +1,18 @@
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<%= stylesheet_link_tag "themes/"+theme_name+"/application", :media => "all" unless theme_name.empty? %>
<%= stylesheet_link_tag "application", :media=>"all" if theme_name.empty? %>
<%= stylesheet_link_tag "infoscreenframe.css" %>
<%= javascript_include_tag "application" %>
<%= javascript_include_tag "jmpress" %>
</head>
<body>
<iframe style="border-width: 0;"
src="https://calendar.google.com/calendar/embed?src=f7i0qj89nelp59lq8panbqr2ek%40group.calendar.google.com&src=8gec92r2kpn59jqm4gclg06nrg%40group.calendar.google.com&color=%23853104" width="100%" height="100%" frameborder="0" scrolling="no">
</iframe>
<script language="javascript" type="text/javascript">setTimeout("location.reload();",60000);</script>
<!-- reloads automatically once every 60sec = 1min -->
</body>

View File

@@ -80,6 +80,7 @@ end
get "" , controller: :home, action: :index get "" , controller: :home, action: :index
get "intern" , controller: :home, action: :intern get "intern" , controller: :home, action: :intern
get "infoscreen" , controller: :home, action: :infoscreen get "infoscreen" , controller: :home, action: :infoscreen
get "verleihkalender" , controller: :home, action: :verleihkalender
get "beispielsammlung", to: redirect('/studien') get "beispielsammlung", to: redirect('/studien')
scope '(:ansicht)' do scope '(:ansicht)' do
resources :studien, :only=>[:new,:edit,:update,:destroy,:show] do resources :studien, :only=>[:new,:edit,:update,:destroy,:show] do
@@ -275,5 +276,3 @@ end
end end
root :to => 'home#index' root :to => 'home#index'
end end