forked from bofh/fetsite
started to migrate themes new wrapper script
This commit is contained in:
10
Gemfile
10
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"
|
||||
|
||||
21
Gemfile.lock
21
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
|
||||
|
||||
@@ -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
|
||||
|
||||
66
app/themes/blue2/views/layouts/blue2.html.erb
Executable file
66
app/themes/blue2/views/layouts/blue2.html.erb
Executable file
@@ -0,0 +1,66 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
|
||||
<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="alternate" hreflang="de" href="<%= url_for(params.merge(:locale=>:de))%>" />
|
||||
<link rel="alternate" hreflang="en" href="<%= url_for(params.merge(:locale=>:en))%>" />
|
||||
|
||||
|
||||
<%= stylesheet_link_tag "application", :media=>"all"%>
|
||||
<%= javascript_include_tag "application" %>
|
||||
<%= csrf_meta_tags %>
|
||||
<% if content_for?(:header) %>
|
||||
<%= yield :header %>
|
||||
<% else %>
|
||||
<title>Fetsite</title>
|
||||
<% end %>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="maincontainer" class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<div class="span10 offset1 header_span">
|
||||
<% 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 %>
|
||||
<div class="header_wrap">
|
||||
<div class="header hidden-print">
|
||||
<%= link_to home_index_path do %>
|
||||
<!-- <span class="feticon-fet_logo fa-4x color-1"> </span>-->
|
||||
<%= image_tag('/logo2014_64.png',{:style=>"float:left;height:50px",:height=>"50"}) %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="header visible-print">
|
||||
<%= image_tag('/logo2014_64.png',{:style=>"float:left;height:50px",:height=>"50"}) %>
|
||||
</div>
|
||||
<div class="visible-print">
|
||||
Fachschaft Elektrotechnik
|
||||
<hr/>
|
||||
</div>
|
||||
<div id="menudiv" style="margin-top:12px" class="hidden-print">
|
||||
<%= render :template => 'layouts/menu' %>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row-fluid">
|
||||
<div class="span10 offset1" id="contentdiv">
|
||||
<%= yield %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$('.dropdown-toggle').click(function(e) {
|
||||
e.preventDefault();
|
||||
setTimeout($.proxy(function() {
|
||||
if ('ontouchstart' in document.documentElement) {
|
||||
$(this).siblings('.dropdown-backdrop').off().remove();
|
||||
}
|
||||
}, this), 0);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,3 +1,5 @@
|
||||
<% unless object.nil? %>
|
||||
<%= calendar object do |entry| %>
|
||||
<div><%= link_to entry.name.to_s, polymorphic_path(entry.object) %></div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
@@ -18,10 +18,10 @@
|
||||
|
||||
<ul class="linklist">
|
||||
<li>
|
||||
<%= link_to ffi1_icon("facebook1") + I18n.t('home.fblogin'), user_omniauth_authorize_path(:facebook) ,class: :linkbox %>
|
||||
<%= link_to ffi1_icon("facebook1") + I18n.t('home.fblogin'), user_facebook_omniauth_authorize_path ,class: :linkbox %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to ffi1_icon("academic") + I18n.t('home.login'), user_omniauth_authorize_path(:ldap) ,class: :linkbox %>
|
||||
<%= link_to ffi1_icon("academic") + I18n.t('home.login'), user_ldap_omniauth_authorize_path ,class: :linkbox %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to ffi1_icon("quiz")+ I18n.t("themengruppe.faqs"), faqs_themengruppen_path,class: :linkbox %>
|
||||
|
||||
@@ -47,11 +47,11 @@
|
||||
<li>
|
||||
<% if not user_signed_in? %>
|
||||
<% if Rails.env.development? %>
|
||||
<%# link_to I18n.t('home.login'), user_omniauth_authorize_path(:developer) %>
|
||||
<%# link_to I18n.t('home.login'), user_developer_omniauth_authorize_path %>
|
||||
<%= render 'layouts/login' %>
|
||||
|
||||
<% else %>
|
||||
<%= link_to ffi1_icon("academic") + I18n.t('home.login'), user_omniauth_authorize_path(:ldap) %>
|
||||
<%= link_to ffi1_icon("academic") + I18n.t('home.login'), user_ldap_omniauth_authorize_path(:ldap) %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<%= render 'layouts/login' %>
|
||||
|
||||
@@ -32,7 +32,7 @@ Fetsite::Application.configure do
|
||||
# Log the query plan for queries taking more than this (works
|
||||
# with SQLite, MySQL, and PostgreSQL)
|
||||
# config.active_record.auto_explain_threshold_in_seconds = 0.5
|
||||
|
||||
config.active_record.raise_in_transactional_callbacks=true
|
||||
# Do not compress assets
|
||||
config.assets.compress = false
|
||||
|
||||
|
||||
18
install.md
Normal file
18
install.md
Normal file
@@ -0,0 +1,18 @@
|
||||
|
||||
aks root
|
||||
|
||||
prerequirements installieren
|
||||
clone fetsite & Rechte ändern
|
||||
|
||||
Als fetsite
|
||||
## Installation der aktuellen Seite
|
||||
1. RVM Installieren (Siehe Interne docs)
|
||||
|
||||
2. Ruby 2.5 installieren
|
||||
|
||||
|
||||
3. gemset
|
||||
rvm gemset create fetsite
|
||||
|
||||
bundle install
|
||||
|
||||
15
lib/tasks/factory_bot.rake
Normal file
15
lib/tasks/factory_bot.rake
Normal file
@@ -0,0 +1,15 @@
|
||||
# lib/tasks/factory_bot.rake
|
||||
namespace :factory_bot do
|
||||
desc "Verify that all FactoryBot factories are valid"
|
||||
task lint: :environment do
|
||||
if Rails.env.test?
|
||||
# DatabaseCleaner.clean_with(:deletion)
|
||||
# DatabaseCleaner.cleaning do
|
||||
FactoryBot.lint
|
||||
# end
|
||||
else
|
||||
system("bundle exec rake factory_bot:lint RAILS_ENV='test'")
|
||||
fail if $?.exitstatus.nonzero?
|
||||
end
|
||||
end
|
||||
end
|
||||
3
puma
Executable file
3
puma
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
source /home/fetsite/.rvm/environments/ruby-2.5.3
|
||||
bundle exec puma "$@"
|
||||
@@ -1,9 +1,13 @@
|
||||
FactoryBot.define do
|
||||
sequence (:title) {|n| "Wichtige Neuigkeit #{n}"}
|
||||
sequence (:text) {|n| "Wichtiger text #{n}"}
|
||||
sequence (:neuigkeit_text) {|n| "Wichtiger text #{n}"}
|
||||
|
||||
factory :neuigkeit do
|
||||
title
|
||||
text
|
||||
title
|
||||
# sequence (:text) {|n| "Wichtiger text #{n}"}
|
||||
text {generate :neuigkeit_text}
|
||||
|
||||
# text {generate :neuigkeit_text }
|
||||
datum {1.days.ago}
|
||||
association :author, factory: :user
|
||||
|
||||
|
||||
Reference in New Issue
Block a user