From 011f772bc3b90a913e9a455cee83601c6cd0e7ce Mon Sep 17 00:00:00 2001 From: Andreas Stephanides Date: Sun, 17 Mar 2019 18:06:20 +0100 Subject: [PATCH] started to migrate themes new wrapper script --- Gemfile | 10 +-- Gemfile.lock | 21 +++--- .../assets/stylesheets}/application.css.scss | 2 +- .../blue2/assets/stylesheets}/extra.css.scss | 0 .../assets/stylesheets}/linkboxes.css.scss | 0 app/themes/blue2/views/layouts/blue2.html.erb | 66 +++++++++++++++++++ app/views/calendars/_calentries.html.erb | 4 +- app/views/home/index.html.erb | 4 +- app/views/layouts/menu.html.erb | 4 +- config/environments/development.rb | 2 +- install.md | 18 +++++ lib/tasks/factory_bot.rake | 15 +++++ puma | 3 + spec/factories/neuigkeit.rb | 10 ++- 14 files changed, 132 insertions(+), 27 deletions(-) rename app/{assets/stylesheets/themes/blue2 => themes/blue2/assets/stylesheets}/application.css.scss (99%) rename app/{assets/stylesheets/themes/blue2 => themes/blue2/assets/stylesheets}/extra.css.scss (100%) rename app/{assets/stylesheets/themes/blue2 => themes/blue2/assets/stylesheets}/linkboxes.css.scss (100%) create mode 100755 app/themes/blue2/views/layouts/blue2.html.erb create mode 100644 install.md create mode 100644 lib/tasks/factory_bot.rake create mode 100755 puma diff --git a/Gemfile b/Gemfile index 9f3c3ad..add1dd0 100755 --- a/Gemfile +++ b/Gemfile @@ -35,8 +35,8 @@ gem 'jquery-rails' # gem 'jbuilder' # Use unicorn as the app server - gem 'unicorn', '~>5.4' #4.8.0' - +# gem 'unicorn', '~>5.4' #4.8.0' +gem 'puma' # Deploy with Capistran # gem 'capistrano' @@ -54,7 +54,7 @@ gem "tinymce-rails" , '~>4.1.0' # Internationalisierung #gem "globalize3" ,'~>3.0.4' -gem "globalize" ,'~>4.0'#,:git =>'git://github.com/globalize/globalize.git' +gem "globalize" ,'~>5.1'#,:git =>'git://github.com/globalize/globalize.git' gem 'globalize-versioning' gem 'globalize-accessors' # Version controll @@ -90,7 +90,7 @@ group :development, :test do gem 'factory_bot_rails'#,"~>4.5.0" gem 'minitest'#, "~>4.7.5" gem 'progress_bar' -gem 'rspec-core', '~>3.8.0' +gem 'rspec-core'#, '~>3.8.0' gem 'rspec-support'#, '~>3.3.0' gem 'rspec-rails'#, '~>3.3.0' gem 'rspec-collection_matchers'#, '~>1.1.2' @@ -106,7 +106,7 @@ gem 'rmagick' gem 'bootstrap-addons-rails' gem "jquery-fileupload-rails"#, "0.4.1" -gem "jquery-ui-rails"#,"~> 4.1.0" +gem "jquery-ui-rails" #,"~> 4.1.0" gem "font-awesome-rails" gem "jquery-datetimepicker-rails" # gem "jquery-sortable-rails" diff --git a/Gemfile.lock b/Gemfile.lock index 8bf9706..1243014 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -119,7 +119,7 @@ GEM rest-client (>= 1.6) execjs (1.4.1) multi_json (~> 1.0) - factory_bot (5.0.1) + factory_bot (5.0.2) activesupport (>= 4.2.0) factory_bot_rails (5.0.1) factory_bot (~> 5.0.0) @@ -141,9 +141,10 @@ GEM git (1.5.0) globalid (0.4.2) activesupport (>= 4.2.0) - globalize (4.0.3) - activemodel (>= 4.0.0, < 5) - activerecord (>= 4.0.0, < 5) + globalize (5.2.0) + activemodel (>= 4.2, < 5.3) + activerecord (>= 4.2, < 5.3) + request_store (~> 1.0) globalize-accessors (0.1.5) globalize (>= 3) globalize-versioning (0.2.0) @@ -190,7 +191,6 @@ GEM activerecord kaminari-core (= 1.1.1) kaminari-core (1.1.1) - kgio (2.11.2) libv8 (3.16.14.19) loofah (2.2.3) crass (~> 1.0.2) @@ -257,6 +257,7 @@ GEM protected_attributes (1.1.4) activemodel (>= 4.0.1, < 5.0) public_suffix (3.0.3) + puma (3.12.0) pyu-ruby-sasl (0.0.3.3) rack (1.6.11) rack-oauth2 (1.9.3) @@ -291,7 +292,6 @@ GEM activesupport (= 4.2.11) rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) - raindrops (0.19.0) rake (12.3.2) rb-fsevent (0.10.3) rb-inotify (0.10.0) @@ -411,9 +411,6 @@ GEM unf (0.1.4) unf_ext unf_ext (0.0.7.5) - unicorn (5.4.1) - kgio (~> 2.6) - raindrops (~> 0.7) warden (1.2.7) rack (>= 1.0) webrick (1.4.2) @@ -452,7 +449,7 @@ DEPENDENCIES formtastic (~> 3.1) formtastic-bootstrap (~> 3.0.0) git - globalize (~> 4.0) + globalize (~> 5.1) globalize-accessors globalize-versioning haml @@ -472,13 +469,14 @@ DEPENDENCIES paperclip progress_bar protected_attributes + puma rails (~> 4.0) rake (~> 12.3) rmagick rolify rspec-activemodel-mocks rspec-collection_matchers - rspec-core (~> 3.8.0) + rspec-core rspec-expectations rspec-html-matchers rspec-rails @@ -500,7 +498,6 @@ DEPENDENCIES therubyracer tinymce-rails (~> 4.1.0) uglifier - unicorn (~> 5.4) webrick whenever yaml_db diff --git a/app/assets/stylesheets/themes/blue2/application.css.scss b/app/themes/blue2/assets/stylesheets/application.css.scss similarity index 99% rename from app/assets/stylesheets/themes/blue2/application.css.scss rename to app/themes/blue2/assets/stylesheets/application.css.scss index 07388ee..8981275 100755 --- a/app/assets/stylesheets/themes/blue2/application.css.scss +++ b/app/themes/blue2/assets/stylesheets/application.css.scss @@ -15,7 +15,7 @@ * require_tree . *= require jquery.fileupload-ui *= require jquery.datetimepicker - *= require jquery.ui.dialog + *= require jquery.ui/dialog *= require jquery.ui.tabs *= require jquery.ui.progressbar diff --git a/app/assets/stylesheets/themes/blue2/extra.css.scss b/app/themes/blue2/assets/stylesheets/extra.css.scss similarity index 100% rename from app/assets/stylesheets/themes/blue2/extra.css.scss rename to app/themes/blue2/assets/stylesheets/extra.css.scss diff --git a/app/assets/stylesheets/themes/blue2/linkboxes.css.scss b/app/themes/blue2/assets/stylesheets/linkboxes.css.scss similarity index 100% rename from app/assets/stylesheets/themes/blue2/linkboxes.css.scss rename to app/themes/blue2/assets/stylesheets/linkboxes.css.scss diff --git a/app/themes/blue2/views/layouts/blue2.html.erb b/app/themes/blue2/views/layouts/blue2.html.erb new file mode 100755 index 0000000..a9b8d5a --- /dev/null +++ b/app/themes/blue2/views/layouts/blue2.html.erb @@ -0,0 +1,66 @@ + + + + + + + + + + + + <%= stylesheet_link_tag "application", :media=>"all"%> + <%= 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 %> +
+
+
+
+ <%= yield %> +
+
+
+ + + diff --git a/app/views/calendars/_calentries.html.erb b/app/views/calendars/_calentries.html.erb index fbd7775..07d8fcc 100644 --- a/app/views/calendars/_calentries.html.erb +++ b/app/views/calendars/_calentries.html.erb @@ -1,3 +1,5 @@ +<% unless object.nil? %> <%= calendar object do |entry| %>
<%= link_to entry.name.to_s, polymorphic_path(entry.object) %>
-<% end %> + <% end %> + <% end %> diff --git a/app/views/home/index.html.erb b/app/views/home/index.html.erb index 89c88cc..8cee550 100755 --- a/app/views/home/index.html.erb +++ b/app/views/home/index.html.erb @@ -18,10 +18,10 @@