forked from bofh/fetsite
merge master and stable
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -52,3 +52,4 @@ Gemfile.lock
|
|||||||
.#*
|
.#*
|
||||||
.*
|
.*
|
||||||
!/.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'
|
||||||
|
|||||||
25
README
Normal file
25
README
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
SETUP:
|
||||||
|
|
||||||
|
install ruby 2.1.10
|
||||||
|
|
||||||
|
install requirements
|
||||||
|
apt-get ...
|
||||||
|
|
||||||
|
|
||||||
|
mkdir /srv/fetsite
|
||||||
|
cd /srv/fetsite
|
||||||
|
|
||||||
|
copy / fetch Gemfile
|
||||||
|
|
||||||
|
make User fetsite
|
||||||
|
|
||||||
|
|
||||||
|
bundle install
|
||||||
|
|
||||||
|
# Config Files kopieren:
|
||||||
|
cp /srv/fetsite/config/omniout_secrets.yml.example /srv/fetsite/config/omniout_secrets.yml
|
||||||
|
cp /srv/fetsite/config/omniout_secrets.yml.example /srv/fetsite/config/omniout_secrets.yml
|
||||||
|
touch crawler_config.yml
|
||||||
|
|
||||||
|
# Datenbank erstellen
|
||||||
|
rake db:migrate
|
||||||
@@ -26,7 +26,7 @@ class Gremium < ActiveRecord::Base
|
|||||||
# has_many :members, through: :memberships
|
# has_many :members, through: :memberships
|
||||||
searchable do
|
searchable do
|
||||||
text :desc
|
text :desc
|
||||||
text :name, :boost=>4.0
|
text :name
|
||||||
end
|
end
|
||||||
|
|
||||||
belongs_to :thema # Gehört zu einem Thema
|
belongs_to :thema # Gehört zu einem Thema
|
||||||
|
|||||||
@@ -186,6 +186,6 @@ class Neuigkeit < ActiveRecord::Base
|
|||||||
searchable do
|
searchable do
|
||||||
text :text
|
text :text
|
||||||
text :datum
|
text :datum
|
||||||
text :title, :boost=>3.0
|
text :title
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ end
|
|||||||
|
|
||||||
searchable do
|
searchable do
|
||||||
text :desc
|
text :desc
|
||||||
text :name, :boost=>4.0
|
text :name
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ class Studium < ActiveRecord::Base
|
|||||||
text :zahl
|
text :zahl
|
||||||
text :typ
|
text :typ
|
||||||
text :abkuerzung
|
text :abkuerzung
|
||||||
text :name, :boost=>3.0
|
text :name
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ class Thema < ActiveRecord::Base
|
|||||||
# make topic searchable
|
# make topic searchable
|
||||||
searchable do
|
searchable do
|
||||||
text :text
|
text :text
|
||||||
text :title, :boost=>4.0
|
text :title
|
||||||
end
|
end
|
||||||
|
|
||||||
resourcify
|
resourcify
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ end
|
|||||||
|
|
||||||
searchable do
|
searchable do
|
||||||
text :text
|
text :text
|
||||||
text :title, :boost=>4.0
|
text :title
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -25,7 +25,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>
|
||||||
|
|||||||
@@ -35,10 +35,11 @@
|
|||||||
</div>
|
</div>
|
||||||
<% unless @calentries.nil? or @calentries.empty? or True%>
|
<% unless @calentries.nil? or @calentries.empty? or True%>
|
||||||
<div class="span3">
|
<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 %>
|
<% 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 %>
|
||||||
<%= render 'calendars/calentries', :object=>@calentries %>
|
<%= render 'calendars/calentries', :object=>@calentries %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<% end %>
|
||||||
<% 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 %>
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
<div class="content-wrap content-column" style="max-width:90em;">
|
<div class="content-wrap content-column" style="max-width:90em;">
|
||||||
<h1><%= I18n.t('home.willkommen') %></h1>
|
<h1><%= I18n.t('home.willkommen') %></h1>
|
||||||
<%= raw(@starttopic.text) %>
|
<%= raw(@starttopic.text) unless @starttopic.nil? %>
|
||||||
|
|
||||||
|
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
@@ -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>
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
<div class="content-wrap content-column" style="max-width:90em;">
|
<div class="content-wrap content-column" style="max-width:90em;">
|
||||||
<h1><%= I18n.t('home.willkommen') %></h1>
|
<h1><%= I18n.t('home.willkommen') %></h1>
|
||||||
<%= raw(@starttopic.text) %>
|
<%= raw(@starttopic.text) unless @starttopic.nil? %>
|
||||||
|
|
||||||
|
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
@@ -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,6 +1,7 @@
|
|||||||
<!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="https://www.fet.at/logo2014_64.png">
|
<link rel="shortcut icon" href="https://www.fet.at/logo2014_64.png">
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ de:
|
|||||||
savecont: "Zwischenspeichern"
|
savecont: "Zwischenspeichern"
|
||||||
intern: "Intern"
|
intern: "Intern"
|
||||||
manage: "Verwalten"
|
manage: "Verwalten"
|
||||||
|
new: "Neu"
|
||||||
home:
|
home:
|
||||||
sprache: "Deutsch"
|
sprache: "Deutsch"
|
||||||
kontakt: "Kontakt"
|
kontakt: "Kontakt"
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ de:
|
|||||||
active_members: "Aktive Mitglieder"
|
active_members: "Aktive Mitglieder"
|
||||||
notactive_members: "Pension"
|
notactive_members: "Pension"
|
||||||
new_profile: "Neues Profil anlegen"
|
new_profile: "Neues Profil anlegen"
|
||||||
|
new: "Neues Profil anlegen"
|
||||||
gremium:
|
gremium:
|
||||||
new: "Neues Gremium"
|
new: "Neues Gremium"
|
||||||
seit: "seit"
|
seit: "seit"
|
||||||
|
|||||||
@@ -3,17 +3,17 @@ production:
|
|||||||
hostname: localhost
|
hostname: localhost
|
||||||
port: 8080
|
port: 8080
|
||||||
log_level: WARNING
|
log_level: WARNING
|
||||||
path: /solr-4.10.2/default #production #ollection1 #production
|
path: /solr/#/default #production #ollection1 #production
|
||||||
# solr_home: solr
|
# solr_home: solr
|
||||||
# read_timeout: 2
|
# read_timeout: 2
|
||||||
# open_timeout: 0.5
|
# open_timeout: 0.5
|
||||||
|
|
||||||
development:
|
development:
|
||||||
solr:
|
solr:
|
||||||
hostname: localhost
|
hostname: solr
|
||||||
port: 8982
|
port: 8983
|
||||||
log_level: INFO
|
log_level: INFO
|
||||||
path: /solr/development
|
path: /solr/mycore
|
||||||
|
|
||||||
test:
|
test:
|
||||||
solr:
|
solr:
|
||||||
|
|||||||
@@ -14,19 +14,20 @@ 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;}
|
||||||
|
|
||||||
echo "Migrate the database..."
|
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