From 6b37d44c9a482fb67c6f74502c2b2c4994425ef8 Mon Sep 17 00:00:00 2001 From: Andreas Stephanides Date: Tue, 25 Jul 2017 10:03:02 +0200 Subject: [PATCH 1/9] 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 2/9] 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 3/9] 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 4/9] 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 5/9] 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 6/9] 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 7/9] 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 9f1de3d9d07952d281dd431b31e5d08363258812 Mon Sep 17 00:00:00 2001 From: Andreas Stephanides Date: Mon, 14 May 2018 17:56:17 +0200 Subject: [PATCH 8/9] diverse hot fixes von der productive Version auf fetruby --- app/controllers/application_controller.rb | 2 +- app/models/document.rb | 14 +++++++++++--- app/views/documents/show.html.erb | 4 +++- app/views/galleries/show.html.erb | 2 +- app/views/layouts/application.html.erb | 2 +- app/views/rubriken/index.html.erb | 4 ++-- .../themes/blue2/layouts/application.html.erb | 2 +- app/views/themes/blue2/lvas/show.html.erb | 3 +++ 8 files changed, 23 insertions(+), 10 deletions(-) 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 diff --git a/app/models/document.rb b/app/models/document.rb index 5123b52..a789d95 100644 --- a/app/models/document.rb +++ b/app/models/document.rb @@ -70,13 +70,21 @@ class Document < ActiveRecord::Base end def move_to_etherpad unless self.is_etherpad? || self.id.nil? - self.etherpadkey="document_"+ self.id.to_s - self.ep_pad.html = '
      '+self.text+'
      ' + self.etherpadkey="document_"+ self.id.to_s + if self.text.nill? + self.ep_pad.html = '
      '+"text"+'
      ' + else + self.ep_pad.html = '
      '+self.text+'
      ' + end end end def dump_to_etherpad if self.is_etherpad? - self.ep_pad.html = '
      '+self.text+'
      ' + if self.text.nill? + self.ep_pad.html = '
      '+"text"+'
      ' + else + self.ep_pad.html = '
      '+self.text+'
      ' + end else self.move_to_etherpad end diff --git a/app/views/documents/show.html.erb b/app/views/documents/show.html.erb index 0e5705d..5a06936 100644 --- a/app/views/documents/show.html.erb +++ b/app/views/documents/show.html.erb @@ -22,7 +22,9 @@ <% end %> diff --git a/app/views/galleries/show.html.erb b/app/views/galleries/show.html.erb index 7b50b96..f9d564c 100644 --- a/app/views/galleries/show.html.erb +++ b/app/views/galleries/show.html.erb @@ -145,7 +145,7 @@ end
    <%= 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), :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) %>

    diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 52b01f4..1bde762 100755 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -3,7 +3,7 @@ - "> + diff --git a/app/views/rubriken/index.html.erb b/app/views/rubriken/index.html.erb index f4c6301..438c076 100755 --- a/app/views/rubriken/index.html.erb +++ b/app/views/rubriken/index.html.erb @@ -33,7 +33,7 @@ - + <% unless @calentries.nil? or @calentries.empty? or True%>
    <% 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 %> @@ -42,7 +42,7 @@ <% 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 %> -
    + <% end %> diff --git a/app/views/themes/blue2/layouts/application.html.erb b/app/views/themes/blue2/layouts/application.html.erb index 533cfef..c97572a 100755 --- a/app/views/themes/blue2/layouts/application.html.erb +++ b/app/views/themes/blue2/layouts/application.html.erb @@ -2,7 +2,7 @@ - "> + diff --git a/app/views/themes/blue2/lvas/show.html.erb b/app/views/themes/blue2/lvas/show.html.erb index d3c5e7d..84f6ed2 100755 --- a/app/views/themes/blue2/lvas/show.html.erb +++ b/app/views/themes/blue2/lvas/show.html.erb @@ -82,9 +82,12 @@
    <%= new_question_for(@lva) %> + <% unless @questions.nil? %> <% @questions.each do |q| %> <%= render q if can? :show, q %> <% end %> + <% end %> +

    <%= I18n.t("lva.bspe") %>

    From 734a137563d55947ee2495fe868603c2c941a3dd Mon Sep 17 00:00:00 2001 From: andis Date: Mon, 14 May 2018 18:55:37 +0200 Subject: [PATCH 9/9] 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