forked from bofh/fetsite
Merge branch 'latest' of https://git.triton.fet.at/git/fetsite into latest
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -51,4 +51,5 @@ Gemfile.lock
|
|||||||
/config/contact_topic.yml
|
/config/contact_topic.yml
|
||||||
.#*
|
.#*
|
||||||
.*
|
.*
|
||||||
!/.gitignore
|
!/.gitignore
|
||||||
|
*.pid
|
||||||
2
Gemfile
2
Gemfile
@@ -1,5 +1,5 @@
|
|||||||
source 'https://rubygems.org'
|
source 'https://rubygems.org'
|
||||||
|
gem 'rake', '~>11.0'
|
||||||
gem 'rails', '3.2.13'
|
gem 'rails', '3.2.13'
|
||||||
gem 'sprockets', '2.2.2'
|
gem 'sprockets', '2.2.2'
|
||||||
gem 'webrick', '1.3.1'
|
gem 'webrick', '1.3.1'
|
||||||
|
|||||||
@@ -71,12 +71,21 @@ class Document < ActiveRecord::Base
|
|||||||
def move_to_etherpad
|
def move_to_etherpad
|
||||||
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
|
||||||
self.ep_pad.html = '<div>'+self.text+'</div>'
|
|
||||||
end
|
if self.text.nill?
|
||||||
|
self.ep_pad.html = '<div>'+"text"+'</div>'
|
||||||
|
else
|
||||||
|
self.ep_pad.html = '<div>'+self.text+'</div>'
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
def dump_to_etherpad
|
def dump_to_etherpad
|
||||||
if self.is_etherpad?
|
if self.is_etherpad?
|
||||||
self.ep_pad.html = '<div>'+self.text+'</div>'
|
if self.text.nill?
|
||||||
|
self.ep_pad.html = '<div>'+"text"+'</div>'
|
||||||
|
else
|
||||||
|
self.ep_pad.html = '<div>'+self.text+'</div>'
|
||||||
|
end
|
||||||
else
|
else
|
||||||
self.move_to_etherpad
|
self.move_to_etherpad
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -22,7 +22,9 @@
|
|||||||
<ul class='breadcrumb hidden-print'>
|
<ul class='breadcrumb hidden-print'>
|
||||||
<% @document.versions.each do |v| %>
|
<% @document.versions.each do |v| %>
|
||||||
<li>
|
<li>
|
||||||
<%= link_to User.find(v.whodunnit).name+": "+ v.event + " (" + I18n.l(v.created_at)+ ") ", write_document_path(@document,:versionid=>v.id) unless v.whodunnit.nil? %>
|
|
||||||
|
<%= link_to User.find(v.whodunnit).try(:name)+": "+ v.event + " (" + I18n.l(v.created_at)+ ") ", write_document_path(@document,:versionid=>v.id) if User.exists?(v.whodunnit) unless v.whodunnit.nil? %>
|
||||||
|
|
||||||
<% end %> <span class="divider">/</span></li>
|
<% end %> <span class="divider">/</span></li>
|
||||||
</ul>
|
</ul>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
@@ -145,7 +145,7 @@ 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, rel: 'tooltip' %>
|
:class=>"btn-small",title: I18n.t('fotos.download')+': '+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')+': '+f.title, rel: 'tooltip', confirm: I18n.t('fotos.delete')+': '+f.title+', Sicher?' if can?(:delete,f) %>
|
||||||
<p></p>
|
<p></p>
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
<li>
|
<li>
|
||||||
<%= link_to ffi1_icon("quiz")+ I18n.t("themengruppe.faqs"), faqs_themengruppen_path,class: :linkbox %>
|
<%= link_to ffi1_icon("quiz")+ I18n.t("themengruppe.faqs"), faqs_themengruppen_path,class: :linkbox %>
|
||||||
</li>
|
</li>
|
||||||
<li><%= link_to ffi1_icon("books19")+"Beispielsammlung", studium_path(Studium.first, {:ansicht=>'semesteransicht'}) ,class: :btn ,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 "Alte Beispielsammlung", "http://www.fet.at/alt/bin/view/Beispielsammlung/WebHome" ,class: :btn ,class: :linkbox %></li>
|
<li><%= link_to "Alte Beispielsammlung", "http://www.fet.at/alt/bin/view/Beispielsammlung/WebHome" ,class: :btn ,class: :linkbox %></li>
|
||||||
</ul>
|
</ul>
|
||||||
<ul>
|
<ul>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<link rel="shortcut icon" href="<%= absurl("/logo2014_64.png")%>">
|
<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="de" href="<%= url_for(params.merge(:locale=>:de))%>" />
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
<% unless @calentries.nil? or @calentries.empty? or True%>
|
||||||
<div class="span3">
|
<div class="span3">
|
||||||
<% unless @calentries.nil? or @calentries.empty? %>
|
<% 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 %>
|
<% 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 %>
|
||||||
@@ -43,7 +43,7 @@
|
|||||||
<% if !current_user.nil? and current_user.has_role?(:fetuser) %>
|
<% if !current_user.nil? and current_user.has_role?(:fetuser) %>
|
||||||
<%= link_to calendars_url(:format=>:ics, :key=>Key.find_or_create(current_user,1).uuid) , calendars_path(:format=>:ics, :key=>Key.find_or_create(current_user,1).uuid)%>
|
<%= link_to calendars_url(:format=>:ics, :key=>Key.find_or_create(current_user,1).uuid) , calendars_path(:format=>:ics, :key=>Key.find_or_create(current_user,1).uuid)%>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div><% end %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
<li>
|
<li>
|
||||||
<%= link_to ffi1_icon("quiz")+ I18n.t("themengruppe.faqs"), faqs_themengruppen_path,class: :linkbox %>
|
<%= link_to ffi1_icon("quiz")+ I18n.t("themengruppe.faqs"), faqs_themengruppen_path,class: :linkbox %>
|
||||||
</li>
|
</li>
|
||||||
<li><%= link_to ffi1_icon("books19")+"Beispielsammlung", studium_path(Studium.first, {:ansicht=>'semesteransicht'}) ,class: :btn ,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>
|
<li><%= link_to "Alte Beispielsammlung", "http://www.fet.at/alt/bin/view/Beispielsammlung/WebHome" ,class: :btn ,class: :linkbox %></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
<li>
|
<li>
|
||||||
<%= link_to ffi1_icon("quiz")+ I18n.t("themengruppe.faqs"), faqs_themengruppen_path,class: :linkbox %>
|
<%= link_to ffi1_icon("quiz")+ I18n.t("themengruppe.faqs"), faqs_themengruppen_path,class: :linkbox %>
|
||||||
</li>
|
</li>
|
||||||
<li><%= link_to ffi1_icon("books19")+"Beispielsammlung", studium_path(Studium.first, {:ansicht=>'semesteransicht'}) ,class: :btn ,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>
|
<li><%= link_to "Alte Beispielsammlung", "http://www.fet.at/alt/bin/view/Beispielsammlung/WebHome" ,class: :btn ,class: :linkbox %></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|||||||
@@ -1,65 +1,66 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<link rel="shortcut icon" href="<%= absurl("/logo2014_64.png")%>">
|
<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="de" href="<%= url_for(params.merge(:locale=>:de))%>" />
|
||||||
<link rel="alternate" hreflang="en" href="<%= url_for(params.merge(:locale=>:en))%>" />
|
<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 "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? %>
|
||||||
<%= javascript_include_tag "application" %>
|
<%= javascript_include_tag "application" %>
|
||||||
<%= csrf_meta_tags %>
|
<%= csrf_meta_tags %>
|
||||||
<% if content_for?(:header) %>
|
<% if content_for?(:header) %>
|
||||||
<%= yield :header %>
|
<%= yield :header %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<title>Fetsite</title>
|
<title>Fetsite</title>
|
||||||
<% end %>
|
<% end %>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div id="maincontainer" class="container-fluid">
|
<div id="maincontainer" class="container-fluid">
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="span10 offset1 header_span">
|
<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 %>
|
<% 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_wrap">
|
||||||
<div class="header hidden-print">
|
<div class="header hidden-print">
|
||||||
<%= link_to home_index_path do %>
|
<%= link_to home_index_path do %>
|
||||||
<!-- <span class="feticon-fet_logo fa-4x color-1"> </span>-->
|
<!-- <span class="feticon-fet_logo fa-4x color-1"> </span>-->
|
||||||
<%= image_tag('/logo2014_64.png',{:style=>"float:left;height:50px",:height=>"50"}) %>
|
<%= image_tag('/logo2014_64.png',{:style=>"float:left;height:50px",:height=>"50"}) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<div class="header visible-print">
|
<div class="header visible-print">
|
||||||
<%= image_tag('/logo2014_64.png',{:style=>"float:left;height:50px",:height=>"50"}) %>
|
<%= image_tag('/logo2014_64.png',{:style=>"float:left;height:50px",:height=>"50"}) %>
|
||||||
</div>
|
</div>
|
||||||
<div class="visible-print">
|
<div class="visible-print">
|
||||||
Fachschaft Elektrotechnik
|
Fachschaft Elektrotechnik
|
||||||
<hr/>
|
<hr/>
|
||||||
</div>
|
</div>
|
||||||
<div id="menudiv" style="margin-top:12px" class="hidden-print">
|
<div id="menudiv" style="margin-top:12px" class="hidden-print">
|
||||||
<%= render :template => 'layouts/menu' %>
|
<%= render :template => 'layouts/menu' %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span10 offset1" id="contentdiv">
|
||||||
|
<%= yield %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row-fluid">
|
<script>
|
||||||
<div class="span10 offset1" id="contentdiv">
|
$('.dropdown-toggle').click(function(e) {
|
||||||
<%= yield %>
|
e.preventDefault();
|
||||||
</div>
|
setTimeout($.proxy(function() {
|
||||||
</div>
|
if ('ontouchstart' in document.documentElement) {
|
||||||
</div>
|
$(this).siblings('.dropdown-backdrop').off().remove();
|
||||||
<script>
|
}
|
||||||
$('.dropdown-toggle').click(function(e) {
|
}, this), 0);
|
||||||
e.preventDefault();
|
});
|
||||||
setTimeout($.proxy(function() {
|
</script>
|
||||||
if ('ontouchstart' in document.documentElement) {
|
|
||||||
$(this).siblings('.dropdown-backdrop').off().remove();
|
|
||||||
}
|
|
||||||
}, this), 0);
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -82,9 +82,12 @@
|
|||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="span12">
|
<div class="span12">
|
||||||
<%= new_question_for(@lva) %>
|
<%= new_question_for(@lva) %>
|
||||||
|
<% unless @questions.nil? %>
|
||||||
<% @questions.each do |q| %>
|
<% @questions.each do |q| %>
|
||||||
<%= render q if can? :show, q %>
|
<%= render q if can? :show, q %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
|
||||||
<h2><%= I18n.t("lva.bspe") %></h2>
|
<h2><%= I18n.t("lva.bspe") %></h2>
|
||||||
<p>
|
<p>
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ echo "Generating base configs..."
|
|||||||
# Generate clean config files if they don't exist
|
# Generate clean config files if they don't exist
|
||||||
cp -u config/database.yml.example config/database.yml
|
cp -u config/database.yml.example config/database.yml
|
||||||
cp -u config/omniauth_secrets.yml.example config/omniauth_secrets.yml
|
cp -u config/omniauth_secrets.yml.example config/omniauth_secrets.yml
|
||||||
|
touch config/crawl_config.yml
|
||||||
echo "Bundle install..."
|
echo "Bundle install..."
|
||||||
# Run Bundler
|
# Run Bundler
|
||||||
$bundler_command install || { echo "Bundler failed. Please run \"$bundle\_command install\" seperately and debug the errors, before running this script again";exit 1; }
|
$bundler_command install || { echo "Bundler failed. Please run \"$bundle\_command install\" seperately and debug the errors, before running this script again";exit 1; }
|
||||||
@@ -23,10 +23,12 @@ echo "Migrate the database..."
|
|||||||
# Run the migration
|
# Run the migration
|
||||||
$rake_command db:migrate || { echo "Migration failed. Please run \"$rake\_command db:migrate\" seperately and debug the errors, before running this script again"; exit 1; }
|
$rake_command db:migrate || { echo "Migration failed. Please run \"$rake\_command db:migrate\" seperately and debug the errors, before running this script again"; exit 1; }
|
||||||
|
|
||||||
|
|
||||||
echo "Start the sunspot server"
|
echo "Start the sunspot server"
|
||||||
# Run Sunspot
|
# Run Sunspot
|
||||||
$rake_command sunspot:solr:stop &> /dev/null
|
$rake_command sunspot:solr:stop &> /dev/null
|
||||||
$rake_command sunspot:solr:start || exit 1
|
$rake_command sunspot:solr:start || exit 1
|
||||||
|
bundle exec sunspot-solr start -p 8982
|
||||||
|
|
||||||
# Topic 1 is supposed to be the startpage topic
|
# Topic 1 is supposed to be the startpage topic
|
||||||
if [ ! -f config/start_topic.yml ]; then
|
if [ ! -f config/start_topic.yml ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user