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 diff --git a/Gemfile b/Gemfile index 8b9613c..334c1b6 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' diff --git a/app/models/document.rb b/app/models/document.rb index 621fa67..ad4a713 100644 --- a/app/models/document.rb +++ b/app/models/document.rb @@ -71,12 +71,21 @@ class Document < ActiveRecord::Base def move_to_etherpad unless self.is_etherpad? || self.id.nil? self.etherpadkey="document_"+ self.id.to_s - self.ep_pad.html = '
'+self.text+'
' - end + + 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/home/index.html.erb b/app/views/home/index.html.erb index aa7de16..7be3a4c 100755 --- a/app/views/home/index.html.erb +++ b/app/views/home/index.html.erb @@ -22,7 +22,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 %>
  • 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..bf9ee0b 100755 --- a/app/views/themes/blue2/layouts/application.html.erb +++ b/app/views/themes/blue2/layouts/application.html.erb @@ -1,65 +1,66 @@ + - "> + - <%= 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 %> -
    -
    -
    - + 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") %>

    diff --git a/initscript.sh b/initscript.sh index fc5cb88..97f2155 100755 --- a/initscript.sh +++ b/initscript.sh @@ -14,7 +14,7 @@ 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; } @@ -23,10 +23,12 @@ 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; } + 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 diff --git a/test.tmp b/test.tmp new file mode 100644 index 0000000..9daeafb --- /dev/null +++ b/test.tmp @@ -0,0 +1 @@ +test