From e0312386e71e742cd4377ea1128eb16c2ddd5090 Mon Sep 17 00:00:00 2001 From: Andreas Stephanides Date: Mon, 3 Apr 2017 15:25:22 +0200 Subject: [PATCH 01/15] no boost for studium --- app/models/studium.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/studium.rb b/app/models/studium.rb index 1fd5866..b3763e6 100755 --- a/app/models/studium.rb +++ b/app/models/studium.rb @@ -89,7 +89,7 @@ class Studium < ActiveRecord::Base text :zahl text :typ text :abkuerzung - text :name, :boost=>3.0 + text :name end end From 328adfe3a5fb7be276c8a00c668570e218d9b1e4 Mon Sep 17 00:00:00 2001 From: Andreas Stephanides Date: Mon, 3 Apr 2017 15:25:40 +0200 Subject: [PATCH 02/15] calentries view fixed --- app/views/rubriken/index.html.erb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/rubriken/index.html.erb b/app/views/rubriken/index.html.erb index f4c6301..740721d 100755 --- a/app/views/rubriken/index.html.erb +++ b/app/views/rubriken/index.html.erb @@ -35,10 +35,11 @@
- +<% 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 %> <%= render 'calendars/calentries', :object=>@calentries %> <% end %> + <% end %> <% 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)%> <% end %> From cd439ecf02f6c7c9de7600ea0365cead62eebaba Mon Sep 17 00:00:00 2001 From: Andreas Stephanides Date: Mon, 3 Apr 2017 15:26:01 +0200 Subject: [PATCH 03/15] solr config update --- config/sunspot.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/config/sunspot.yml b/config/sunspot.yml index cef12a4..236e868 100644 --- a/config/sunspot.yml +++ b/config/sunspot.yml @@ -3,18 +3,18 @@ production: hostname: localhost port: 8080 log_level: WARNING - path: /solr-4.10.2/default #production #ollection1 #production + path: /solr/#/default #production #ollection1 #production # solr_home: solr # read_timeout: 2 # open_timeout: 0.5 development: solr: - hostname: localhost - port: 8982 + hostname: solr + port: 8983 log_level: INFO - path: /solr/development - + path: /solr/mycore + test: solr: hostname: localhost From ffaa57c91439af17ac8c73b5dbbbcddd339fbd29 Mon Sep 17 00:00:00 2001 From: Andreas Stephanides Date: Mon, 3 Apr 2017 15:26:19 +0200 Subject: [PATCH 04/15] starttopic nil --- app/views/themes/blue1/home/index.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/themes/blue1/home/index.html.erb b/app/views/themes/blue1/home/index.html.erb index c62a6ea..b5826f3 100644 --- a/app/views/themes/blue1/home/index.html.erb +++ b/app/views/themes/blue1/home/index.html.erb @@ -9,7 +9,7 @@

<%= I18n.t('home.willkommen') %>

-<%= raw(@starttopic.text) %> +<%= raw(@starttopic.text) unless @starttopic.nil? %>
From 14598fbbd958c05b4f2f0fb9a116e8bfba381c79 Mon Sep 17 00:00:00 2001 From: Andreas Stephanides Date: Mon, 3 Apr 2017 15:26:29 +0200 Subject: [PATCH 05/15] add a README --- README | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 README diff --git a/README b/README new file mode 100644 index 0000000..9b1b424 --- /dev/null +++ b/README @@ -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 \ No newline at end of file From dfef3721dc862eaab5a99dd9d68376f584adcad7 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 15 Apr 2017 15:32:26 +0200 Subject: [PATCH 06/15] test1 --- test1 | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 test1 diff --git a/test1 b/test1 new file mode 100644 index 0000000..e69de29 From 491e3601417791ff4deae24bdd262e19c89bd0a1 Mon Sep 17 00:00:00 2001 From: Andreas Stephanides Date: Tue, 18 Apr 2017 19:03:09 +0200 Subject: [PATCH 07/15] small fixes incl. solr --- app/models/gremium.rb | 2 +- app/models/neuigkeit.rb | 2 +- app/models/rubrik.rb | 2 +- app/models/thema.rb | 2 +- app/models/themengruppe.rb | 2 +- app/views/themes/blue2/home/index.html.erb | 2 +- config/locales/de.yml | 1 + config/locales/fetprofile_public.de.yml | 1 + 8 files changed, 8 insertions(+), 6 deletions(-) diff --git a/app/models/gremium.rb b/app/models/gremium.rb index 8ee1800..e7c4b1a 100644 --- a/app/models/gremium.rb +++ b/app/models/gremium.rb @@ -26,7 +26,7 @@ class Gremium < ActiveRecord::Base # has_many :members, through: :memberships searchable do text :desc - text :name, :boost=>4.0 + text :name end belongs_to :thema # Gehört zu einem Thema diff --git a/app/models/neuigkeit.rb b/app/models/neuigkeit.rb index 0db49de..1529f2f 100755 --- a/app/models/neuigkeit.rb +++ b/app/models/neuigkeit.rb @@ -186,6 +186,6 @@ class Neuigkeit < ActiveRecord::Base searchable do text :text text :datum - text :title, :boost=>3.0 + text :title end end diff --git a/app/models/rubrik.rb b/app/models/rubrik.rb index 50f2135..636f508 100755 --- a/app/models/rubrik.rb +++ b/app/models/rubrik.rb @@ -42,7 +42,7 @@ end searchable do text :desc - text :name, :boost=>4.0 + text :name end end diff --git a/app/models/thema.rb b/app/models/thema.rb index 1abc8b8..36cb2e5 100644 --- a/app/models/thema.rb +++ b/app/models/thema.rb @@ -47,7 +47,7 @@ class Thema < ActiveRecord::Base # make topic searchable searchable do text :text - text :title, :boost=>4.0 + text :title end resourcify diff --git a/app/models/themengruppe.rb b/app/models/themengruppe.rb index d37675a..8a27625 100644 --- a/app/models/themengruppe.rb +++ b/app/models/themengruppe.rb @@ -40,7 +40,7 @@ end searchable do text :text - text :title, :boost=>4.0 + text :title end end diff --git a/app/views/themes/blue2/home/index.html.erb b/app/views/themes/blue2/home/index.html.erb index 0b9527b..ff72839 100644 --- a/app/views/themes/blue2/home/index.html.erb +++ b/app/views/themes/blue2/home/index.html.erb @@ -9,7 +9,7 @@

<%= I18n.t('home.willkommen') %>

-<%= raw(@starttopic.text) %> +<%= raw(@starttopic.text) unless @starttopic.nil? %>
diff --git a/config/locales/de.yml b/config/locales/de.yml index cd61ce0..5b9c0a2 100755 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -16,6 +16,7 @@ de: savecont: "Zwischenspeichern" intern: "Intern" manage: "Verwalten" + new: "Neu" home: sprache: "Deutsch" kontakt: "Kontakt" diff --git a/config/locales/fetprofile_public.de.yml b/config/locales/fetprofile_public.de.yml index 04d744c..e5d49d6 100644 --- a/config/locales/fetprofile_public.de.yml +++ b/config/locales/fetprofile_public.de.yml @@ -6,6 +6,7 @@ de: active_members: "Aktive Mitglieder" notactive_members: "Pension" new_profile: "Neues Profil anlegen" + new: "Neues Profil anlegen" gremium: new: "Neues Gremium" seit: "seit" From 6b37d44c9a482fb67c6f74502c2b2c4994425ef8 Mon Sep 17 00:00:00 2001 From: Andreas Stephanides Date: Tue, 25 Jul 2017 10:03:02 +0200 Subject: [PATCH 08/15] AutoCommit Die Jul 25 10:03:02 CEST 2017 --- Gemfile | 4 ++-- initscript.sh | 6 +++--- sunspot-solr.pid | 1 + 3 files changed, 6 insertions(+), 5 deletions(-) create mode 100644 sunspot-solr.pid diff --git a/Gemfile b/Gemfile index a8dc2a8..fb8b9bc 100755 --- a/Gemfile +++ b/Gemfile @@ -1,5 +1,5 @@ source 'https://rubygems.org' - +gem 'rake', '~>11.0' gem 'rails', '3.2.13' gem 'sprockets', '2.2.2' gem 'webrick', '1.3.1' @@ -136,4 +136,4 @@ gem 'blueimp-gallery-rails' gem 'shareable' -gem 'sunspot_test' \ No newline at end of file +gem 'sunspot_test' diff --git a/initscript.sh b/initscript.sh index efc4133..271a308 100755 --- a/initscript.sh +++ b/initscript.sh @@ -14,14 +14,14 @@ echo "Generating base configs..." # Generate clean config files if they don't exist cp -u config/database.yml.example config/database.yml cp -u config/omniauth_secrets.yml.example config/omniauth_secrets.yml - +touch config/crawl_config.yml echo "Bundle install..." # 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..." # 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" # Run Sunspot diff --git a/sunspot-solr.pid b/sunspot-solr.pid new file mode 100644 index 0000000..a1e0cfa --- /dev/null +++ b/sunspot-solr.pid @@ -0,0 +1 @@ +12696 \ No newline at end of file From 6c4873d8697d2973973349cab317848722aa99ce Mon Sep 17 00:00:00 2001 From: Andreas Stephanides Date: Tue, 25 Jul 2017 11:03:01 +0200 Subject: [PATCH 09/15] AutoCommit Die Jul 25 11:03:01 CEST 2017 --- app/views/themes/blue1/home/index.html.erb | 2 +- initscript.sh | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/themes/blue1/home/index.html.erb b/app/views/themes/blue1/home/index.html.erb index b5826f3..da411dd 100644 --- a/app/views/themes/blue1/home/index.html.erb +++ b/app/views/themes/blue1/home/index.html.erb @@ -26,7 +26,7 @@
  • <%= link_to ffi1_icon("quiz")+ I18n.t("themengruppe.faqs"), faqs_themengruppen_path,class: :linkbox %>
  • -
  • <%= link_to ffi1_icon("books19")+"Beispielsammlung", studium_path(Studium.first, {:ansicht=>'semesteransicht'}) ,class: :btn ,class: :linkbox %>
  • +
  • <%= link_to ffi1_icon("books19")+"Beispielsammlung", studium_path(Studium.first, {:ansicht=>'semesteransicht'}) ,class: :btn ,class: :linkbox if Studium.count >0 %>
  • <%= link_to "Alte Beispielsammlung", "http://www.fet.at/alt/bin/view/Beispielsammlung/WebHome" ,class: :btn ,class: :linkbox %>
  • diff --git a/initscript.sh b/initscript.sh index 271a308..7b8705d 100755 --- a/initscript.sh +++ b/initscript.sh @@ -27,6 +27,7 @@ echo "Start the sunspot server" # Run Sunspot $rake_command sunspot:solr:stop &> /dev/null $rake_command sunspot:solr:start || exit 1 +bundle exec sunspot-solr start -p 8982 # Topic 1 is supposed to be the startpage topic if [ ! -f config/start_topic.yml ]; then From 610e6ae3dd5d949e8c34a7bcbe38a0b53ee50ecc Mon Sep 17 00:00:00 2001 From: ruby Date: Tue, 25 Jul 2017 17:11:51 +0200 Subject: [PATCH 10/15] new design --- app/controllers/application_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 881e9a1..5239999 100755 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -62,7 +62,7 @@ u=current_user if ! u.try(:preferredtheme).nil? and ThemesForRails.available_theme_names.include?(u.preferredtheme) u.preferredtheme else - "blue1" + "blue2" end end From 070e0dfedbac27055cb31e105bf1f1d34b41973c Mon Sep 17 00:00:00 2001 From: Andreas Stephanides Date: Thu, 27 Jul 2017 09:23:02 +0200 Subject: [PATCH 11/15] fixing blue2 index --- app/views/themes/blue2/home/index.html.erb | 2 +- .../themes/blue2/layouts/application.html.erb | 109 +++++++++--------- 2 files changed, 55 insertions(+), 56 deletions(-) diff --git a/app/views/themes/blue2/home/index.html.erb b/app/views/themes/blue2/home/index.html.erb index ff72839..89c88cc 100644 --- a/app/views/themes/blue2/home/index.html.erb +++ b/app/views/themes/blue2/home/index.html.erb @@ -26,7 +26,7 @@
  • <%= link_to ffi1_icon("quiz")+ I18n.t("themengruppe.faqs"), faqs_themengruppen_path,class: :linkbox %>
  • -
  • <%= link_to ffi1_icon("books19")+"Beispielsammlung", studium_path(Studium.first, {:ansicht=>'semesteransicht'}) ,class: :btn ,class: :linkbox %>
  • +
  • <%= link_to ffi1_icon("books19")+"Beispielsammlung", studium_path(Studium.first, {:ansicht=>'semesteransicht'}) ,class: :btn ,class: :linkbox if Studium.count > 0 %>
  • <%= link_to "Alte Beispielsammlung", "http://www.fet.at/alt/bin/view/Beispielsammlung/WebHome" ,class: :btn ,class: :linkbox %>
  • diff --git a/app/views/themes/blue2/layouts/application.html.erb b/app/views/themes/blue2/layouts/application.html.erb index 533cfef..1959b61 100755 --- a/app/views/themes/blue2/layouts/application.html.erb +++ b/app/views/themes/blue2/layouts/application.html.erb @@ -1,65 +1,64 @@ - - "> - - - + + "> + + - <%= 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 %> - Fetsite - <% end %> + <%= 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 %> + Fetsite + <% end %> -
    -
    -
    - <% 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 %> -
    -
    - <%= link_to home_index_path do %> - - <%= image_tag('/logo2014_64.png',{:style=>"float:left;height:50px",:height=>"50"}) %> - <% end %> -
    -
    - <%= image_tag('/logo2014_64.png',{:style=>"float:left;height:50px",:height=>"50"}) %> -
    -
    - Fachschaft Elektrotechnik -
    -
    - - -
    - <% end %> -
    +
    +
    +
    + <% 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 %> +
    +
    + <%= link_to home_index_path do %> + + <%= image_tag('/logo2014_64.png',{:style=>"float:left;height:50px",:height=>"50"}) %> + <% end %> +
    +
    + <%= image_tag('/logo2014_64.png',{:style=>"float:left;height:50px",:height=>"50"}) %> +
    +
    + Fachschaft Elektrotechnik +
    +
    + + +
    + <% end %> +
    +
    +
    +
    + <%= yield %> +
    +
    -
    -
    - <%= yield %> -
    -
    -
    - + From 242d05f4fa1c9c6c6a4da977d859019c629d7b8f Mon Sep 17 00:00:00 2001 From: Andreas Stephanides Date: Wed, 23 Aug 2017 10:03:01 +0200 Subject: [PATCH 12/15] AutoCommit Mit Aug 23 10:03:01 CEST 2017 --- app/views/home/index.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/home/index.html.erb b/app/views/home/index.html.erb index 61a4ff1..83cf3db 100755 --- a/app/views/home/index.html.erb +++ b/app/views/home/index.html.erb @@ -25,7 +25,7 @@
  • <%= link_to ffi1_icon("quiz")+ I18n.t("themengruppe.faqs"), faqs_themengruppen_path,class: :linkbox %>
  • -
  • <%= link_to ffi1_icon("books19")+"Beispielsammlung", studium_path(Studium.first, {:ansicht=>'semesteransicht'}) ,class: :btn ,class: :linkbox %>
  • +
  • <%= link_to ffi1_icon("books19")+"Beispielsammlung", studium_path(Studium.first, {:ansicht=>'semesteransicht'}) ,class: :btn ,class: :linkbox unless Studium.first.nil? %>
  • <%= link_to "Alte Beispielsammlung", "http://www.fet.at/alt/bin/view/Beispielsammlung/WebHome" ,class: :btn ,class: :linkbox %>
    • From b8903c6d9a7e19d518f71e80d5cf72a93a2bb791 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 10 Mar 2018 06:59:53 +0000 Subject: [PATCH 13/15] ignore pid files --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 0901348..a56c92f 100755 --- a/.gitignore +++ b/.gitignore @@ -51,4 +51,5 @@ Gemfile.lock /config/contact_topic.yml .#* .* -!/.gitignore \ No newline at end of file +!/.gitignore +*.pid \ No newline at end of file From 8cb6ec785c42169417cbe22d8bd8bfa9d5e89048 Mon Sep 17 00:00:00 2001 From: ruby fuer rvm Date: Sat, 10 Mar 2018 07:10:03 +0000 Subject: [PATCH 14/15] no sunspot pid file --- sunspot-solr.pid | 1 - 1 file changed, 1 deletion(-) delete mode 100644 sunspot-solr.pid diff --git a/sunspot-solr.pid b/sunspot-solr.pid deleted file mode 100644 index a1e0cfa..0000000 --- a/sunspot-solr.pid +++ /dev/null @@ -1 +0,0 @@ -12696 \ No newline at end of file From 734a137563d55947ee2495fe868603c2c941a3dd Mon Sep 17 00:00:00 2001 From: andis Date: Mon, 14 May 2018 18:55:37 +0200 Subject: [PATCH 15/15] testtmp --- test.tmp | 1 + 1 file changed, 1 insertion(+) create mode 100644 test.tmp diff --git a/test.tmp b/test.tmp new file mode 100644 index 0000000..9daeafb --- /dev/null +++ b/test.tmp @@ -0,0 +1 @@ +test