Author SHA1 Message Date
dependabot[bot]andGitHub 0296e0840d Bump rails_admin from 1.3.0 to 1.4.3
Bumps [rails_admin](https://github.com/sferik/rails_admin) from 1.3.0 to 1.4.3.
- [Release notes](https://github.com/sferik/rails_admin/releases)
- [Changelog](https://github.com/sferik/rails_admin/blob/v1.4.3/CHANGELOG.md)
- [Commits](https://github.com/sferik/rails_admin/compare/v1.3.0...v1.4.3)

Signed-off-by: dependabot[bot] <support@github.com>
2021-01-14 19:27:43 +00:00
gurix af8f55fc23 fixed missing site 2019-07-09 17:53:48 +02:00
gurix 554c8cc5c3 content changes 2019-07-09 17:06:30 +02:00
gurix 5ff8944e80 removed some pages 2019-06-28 18:50:50 +02:00
gurix bac73000c1 fixed broken spec 2019-05-28 16:46:57 +02:00
gurix 0e96429f76 remove right side 2019-05-28 16:44:13 +02:00
gurix 0a47824571 content changes 2019-05-28 16:34:22 +02:00
gurix 4d369d2646 removed duftsäckli 2019-02-08 18:32:21 +01:00
gurix 6d3e30faff removed statements 2019-02-08 18:30:49 +01:00
gurix 13a27f8529 removed content 2019-02-08 18:28:47 +01:00
gurix 13342dd595 dont remove donation at the moment 2019-01-18 20:20:45 +01:00
gurix 45050f1c67 removed some content 2019-01-18 20:18:33 +01:00
Markus GrafandGitHub aab4141e5e Update _right_side.it.slim 2019-01-18 20:06:39 +01:00
Markus GrafandGitHub 3a80de2974 Update _right_side.fr.slim 2019-01-18 20:06:16 +01:00
Markus GrafandGitHub 1d8cbaba89 Update _right_side.de.slim 2019-01-18 20:05:25 +01:00
gurix e21cfd2807 changed reason for transfer 2018-10-05 20:58:31 +02:00
gurix 3a7e871909 Bundle update for the sake of security. 2018-10-05 19:07:46 +02:00
gurix 1d3989394e Remove some older content. 2018-10-05 18:42:33 +02:00
gurix aeed65d7d8 Remove donation progress. 2018-10-05 18:41:56 +02:00
gurix 4b6702a3e2 Updated address for donation. 2018-10-05 18:41:26 +02:00
gurix bafb0604dd bundle update beceause of security 2018-05-29 09:05:55 +02:00
gurix 01e39563d6 removed icon 2018-05-29 08:48:31 +02:00
gurix 3f7ff9480d Updated statistics 2018-05-29 08:48:16 +02:00
gurix 6429885f39 updated button 2018-02-10 23:52:48 +01:00
gurix 8f343a91de added cbd button 2018-02-10 23:04:31 +01:00
gurix 359717100d Merge branch 'master' of github.com:gurix/ch420 2018-01-25 14:43:28 +01:00
gurix 8785f49386 bundle update paperclip because of CVE-2017-0889 2018-01-25 14:43:10 +01:00
Markus GrafandGitHub 0cc858d22e fixed typo 2017-12-20 23:08:04 +01:00
gurix 0993d6387c using old eth address 2017-12-20 15:29:24 +01:00
gurix ed18fa6067 changed ethereum 2017-12-20 15:09:14 +01:00
gurix c7f26e1acd added ethereum 2017-12-20 12:27:48 +01:00
gurix cf566f5e9d fixed false class 2017-12-18 21:04:06 +01:00
gurix f6558753f3 Adjusted donation state 2017-12-15 23:12:43 +01:00
Markus GrafandGitHub 44bc6e1118 Update donation.de.slim 2017-12-08 16:19:06 +01:00
Markus GrafandGitHub b102223a2d Update donation.de.slim 2017-12-05 16:44:02 +01:00
gurix d883f80f18 Added statement admin link 2017-11-29 12:23:29 +01:00
60 changed files with 293 additions and 1134 deletions
-7
View File
@@ -14,9 +14,6 @@ gem 'coffee-rails', '~> 4.1.0'
# Integrate Paperclip into Mongoid. # Integrate Paperclip into Mongoid.
gem 'mongoid-paperclip' gem 'mongoid-paperclip'
# Adds support for multiparameter fields to mongoid 4.x series.
gem 'mongoid-sadstory'
# Markdown rendering # Markdown rendering
gem 'redcarpet' gem 'redcarpet'
@@ -110,10 +107,6 @@ group :development do
# Access an IRB console on exception pages or by using <%= console %> in views # Access an IRB console on exception pages or by using <%= console %> in views
gem 'web-console', '~> 2.0' gem 'web-console', '~> 2.0'
# Better Errors replaces the standard Rails error page with a much better and more useful error page.
gem "better_errors"
gem "binding_of_caller"
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
# gem 'spring' # gem 'spring'
end end
+51 -60
View File
@@ -50,17 +50,13 @@ GEM
aws-sigv4 (1.0.2) aws-sigv4 (1.0.2)
bcrypt (3.1.11) bcrypt (3.1.11)
benchmark-ips (2.7.2) benchmark-ips (2.7.2)
better_errors (2.4.0)
coderay (>= 1.0.0)
erubi (>= 1.0.0)
rack (>= 0.9.0)
binding_of_caller (0.7.2) binding_of_caller (0.7.2)
debug_inspector (>= 0.0.1) debug_inspector (>= 0.0.1)
bootstrap-sass (3.3.7) bootstrap-sass (3.3.7)
autoprefixer-rails (>= 5.2.1) autoprefixer-rails (>= 5.2.1)
sass (>= 3.3.4) sass (>= 3.3.4)
bson (4.2.2) bson (4.2.2)
builder (3.2.3) builder (3.2.4)
byebug (9.1.0) byebug (9.1.0)
capybara (2.15.1) capybara (2.15.1)
addressable addressable
@@ -80,8 +76,8 @@ GEM
coffee-script-source coffee-script-source
execjs execjs
coffee-script-source (1.12.2) coffee-script-source (1.12.2)
concurrent-ruby (1.0.5) concurrent-ruby (1.1.7)
crass (1.0.2) crass (1.0.6)
css_parser (1.6.0) css_parser (1.6.0)
addressable addressable
debug_inspector (0.0.3) debug_inspector (0.0.3)
@@ -105,7 +101,6 @@ GEM
dotenv-rails (2.2.1) dotenv-rails (2.2.1)
dotenv (= 2.2.1) dotenv (= 2.2.1)
railties (>= 3.2, < 5.2) railties (>= 3.2, < 5.2)
erubi (1.7.0)
erubis (2.7.0) erubis (2.7.0)
execjs (2.7.0) execjs (2.7.0)
factory_girl (4.8.1) factory_girl (4.8.1)
@@ -114,60 +109,61 @@ GEM
i18n (~> 0.5) i18n (~> 0.5)
faraday (0.13.1) faraday (0.13.1)
multipart-post (>= 1.2, < 3) multipart-post (>= 1.2, < 3)
ffi (1.9.18) ffi (1.14.2)
font-awesome-rails (4.7.0.2) font-awesome-rails (4.7.0.6)
railties (>= 3.2, < 5.2) railties (>= 3.2, < 6.2)
geocoder (1.4.4) geocoder (1.4.4)
get_process_mem (0.2.1) get_process_mem (0.2.1)
globalid (0.4.0) globalid (0.4.2)
activesupport (>= 4.2.0) activesupport (>= 4.2.0)
haml (5.0.3) haml (5.2.1)
temple (>= 0.8.0) temple (>= 0.8.0)
tilt tilt
heapy (0.1.3) heapy (0.1.3)
i18n (0.8.6) i18n (0.9.5)
concurrent-ruby (~> 1.0)
i18n-js (3.0.1) i18n-js (3.0.1)
i18n (~> 0.6, >= 0.6.6) i18n (~> 0.6, >= 0.6.6)
jbuilder (2.7.0) jbuilder (2.7.0)
activesupport (>= 4.2.0) activesupport (>= 4.2.0)
multi_json (>= 1.2) multi_json (>= 1.2)
jmespath (1.3.1) jmespath (1.3.1)
jquery-rails (4.3.1) jquery-rails (4.3.3)
rails-dom-testing (>= 1, < 3) rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0) railties (>= 4.2.0)
thor (>= 0.14, < 2.0) thor (>= 0.14, < 2.0)
jquery-ui-rails (5.0.5) jquery-ui-rails (6.0.1)
railties (>= 3.2.16) railties (>= 3.2.16)
json (1.8.6) json (1.8.6)
kaminari (1.0.1) kaminari (1.1.1)
activesupport (>= 4.1.0) activesupport (>= 4.1.0)
kaminari-actionview (= 1.0.1) kaminari-actionview (= 1.1.1)
kaminari-activerecord (= 1.0.1) kaminari-activerecord (= 1.1.1)
kaminari-core (= 1.0.1) kaminari-core (= 1.1.1)
kaminari-actionview (1.0.1) kaminari-actionview (1.1.1)
actionview actionview
kaminari-core (= 1.0.1) kaminari-core (= 1.1.1)
kaminari-activerecord (1.0.1) kaminari-activerecord (1.1.1)
activerecord activerecord
kaminari-core (= 1.0.1) kaminari-core (= 1.1.1)
kaminari-core (1.0.1) kaminari-core (1.1.1)
kaminari-mongoid (1.0.1) kaminari-mongoid (1.0.1)
kaminari-core (~> 1.0) kaminari-core (~> 1.0)
mongoid mongoid
loofah (2.1.1) loofah (2.8.0)
crass (~> 1.0.2) crass (~> 1.0.2)
nokogiri (>= 1.5.9) nokogiri (>= 1.5.9)
mail (2.6.6) mail (2.7.1)
mime-types (>= 1.16, < 4) mini_mime (>= 0.1.1)
memory_profiler (0.9.8) memory_profiler (0.9.8)
method_source (0.9.0) method_source (0.9.0)
mime-types (3.1) mime-types (3.1)
mime-types-data (~> 3.2015) mime-types-data (~> 3.2015)
mime-types-data (3.2016.0521) mime-types-data (3.2016.0521)
mimemagic (0.3.2) mimemagic (0.3.2)
mini_mime (0.1.4) mini_mime (1.0.2)
mini_portile2 (2.3.0) mini_portile2 (2.4.0)
minitest (5.10.3) minitest (5.14.3)
mongo (2.4.3) mongo (2.4.3)
bson (>= 4.2.1, < 5.0.0) bson (>= 4.2.1, < 5.0.0)
mongoid (5.0.2) mongoid (5.0.2)
@@ -185,19 +181,17 @@ GEM
mongoid (~> 5.0) mongoid (~> 5.0)
rake rake
rspec (~> 3.3) rspec (~> 3.3)
mongoid-sadstory (0.0.2)
mongoid
mongoid_paranoia (0.2.1) mongoid_paranoia (0.2.1)
mongoid (>= 4) mongoid (>= 4)
mongoid-compatibility mongoid-compatibility
multi_json (1.12.2) multi_json (1.12.2)
multipart-post (2.0.0) multipart-post (2.0.0)
nested_form (0.3.2) nested_form (0.3.2)
nokogiri (1.8.1) nokogiri (1.10.10)
mini_portile2 (~> 2.3.0) mini_portile2 (~> 2.4.0)
origin (2.3.1) origin (2.3.1)
orm_adapter (0.5.0) orm_adapter (0.5.0)
paperclip (5.1.0) paperclip (5.2.0)
activemodel (>= 4.2.0) activemodel (>= 4.2.0)
activesupport (>= 4.2.0) activesupport (>= 4.2.0)
cocaine (~> 0.5.5) cocaine (~> 0.5.5)
@@ -211,8 +205,8 @@ GEM
pry (>= 0.10.4) pry (>= 0.10.4)
public_suffix (3.0.0) public_suffix (3.0.0)
puma (3.10.0) puma (3.10.0)
rack (1.6.8) rack (1.6.13)
rack-pjax (1.0.0) rack-pjax (1.1.0)
nokogiri (~> 1.5) nokogiri (~> 1.5)
rack (>= 1.1) rack (>= 1.1)
rack-test (0.6.3) rack-test (0.6.3)
@@ -230,25 +224,25 @@ GEM
sprockets-rails sprockets-rails
rails-deprecated_sanitizer (1.0.3) rails-deprecated_sanitizer (1.0.3)
activesupport (>= 4.2.0.alpha) activesupport (>= 4.2.0.alpha)
rails-dom-testing (1.0.8) rails-dom-testing (1.0.9)
activesupport (>= 4.2.0.beta, < 5.0) activesupport (>= 4.2.0, < 5.0)
nokogiri (~> 1.6) nokogiri (~> 1.6)
rails-deprecated_sanitizer (>= 1.0.1) rails-deprecated_sanitizer (>= 1.0.1)
rails-html-sanitizer (1.0.3) rails-html-sanitizer (1.3.0)
loofah (~> 2.0) loofah (~> 2.3)
rails-i18n (4.0.9) rails-i18n (4.0.9)
i18n (~> 0.7) i18n (~> 0.7)
railties (~> 4.0) railties (~> 4.0)
rails_12factor (0.0.3) rails_12factor (0.0.3)
rails_serve_static_assets rails_serve_static_assets
rails_stdout_logging rails_stdout_logging
rails_admin (1.2.0) rails_admin (1.4.3)
builder (~> 3.1) builder (~> 3.1)
coffee-rails (~> 4.0) coffee-rails (~> 4.0)
font-awesome-rails (>= 3.0, < 5) font-awesome-rails (>= 3.0, < 5)
haml (>= 4.0, < 6) haml (>= 4.0, < 6)
jquery-rails (>= 3.0, < 5) jquery-rails (>= 3.0, < 5)
jquery-ui-rails (~> 5.0) jquery-ui-rails (>= 5.0, < 7)
kaminari (>= 0.14, < 2.0) kaminari (>= 0.14, < 2.0)
nested_form (~> 0.3) nested_form (~> 0.3)
rack-pjax (>= 0.7) rack-pjax (>= 0.7)
@@ -262,13 +256,13 @@ GEM
activesupport (= 4.2.10) activesupport (= 4.2.10)
rake (>= 0.8.7) rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0) thor (>= 0.18.1, < 2.0)
rake (12.1.0) rake (12.3.3)
rb-fsevent (0.10.2) rb-fsevent (0.10.4)
rb-inotify (0.9.10) rb-inotify (0.10.1)
ffi (>= 0.5.0, < 2) ffi (~> 1.0)
rdoc (4.3.0) rdoc (4.3.0)
redcarpet (3.4.0) redcarpet (3.4.0)
remotipart (1.3.1) remotipart (1.4.4)
responders (2.4.0) responders (2.4.0)
actionpack (>= 4.2.0, < 5.3) actionpack (>= 4.2.0, < 5.3)
railties (>= 4.2.0, < 5.3) railties (>= 4.2.0, < 5.3)
@@ -302,12 +296,12 @@ GEM
rspec-mocks (~> 3.6.0) rspec-mocks (~> 3.6.0)
rspec-support (~> 3.6.0) rspec-support (~> 3.6.0)
rspec-support (3.6.0) rspec-support (3.6.0)
sass (3.5.1) sass (3.7.4)
sass-listen (~> 4.0.0) sass-listen (~> 4.0.0)
sass-listen (4.0.0) sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4) rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7) rb-inotify (~> 0.9, >= 0.9.7)
sass-rails (5.0.6) sass-rails (5.0.7)
railties (>= 4.0.0, < 6) railties (>= 4.0.0, < 6)
sass (~> 3.1) sass (~> 3.1)
sprockets (>= 2.8, < 4.0) sprockets (>= 2.8, < 4.0)
@@ -328,21 +322,21 @@ GEM
actionpack (>= 3.1) actionpack (>= 3.1)
railties (>= 3.1) railties (>= 3.1)
slim (~> 3.0) slim (~> 3.0)
sprockets (3.7.1) sprockets (3.7.2)
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
rack (> 1, < 3) rack (> 1, < 3)
sprockets-rails (3.2.1) sprockets-rails (3.2.2)
actionpack (>= 4.0) actionpack (>= 4.0)
activesupport (>= 4.0) activesupport (>= 4.0)
sprockets (>= 3.0.0) sprockets (>= 3.0.0)
stackprof (0.2.10) stackprof (0.2.10)
stripe (3.6.0) stripe (3.6.0)
faraday (~> 0.10) faraday (~> 0.10)
temple (0.8.0) temple (0.8.2)
thor (0.20.0) thor (0.20.3)
thread_safe (0.3.6) thread_safe (0.3.6)
tilt (2.0.8) tilt (2.0.10)
tzinfo (1.2.3) tzinfo (1.2.9)
thread_safe (~> 0.1) thread_safe (~> 0.1)
uglifier (3.2.0) uglifier (3.2.0)
execjs (>= 0.3.0, < 3) execjs (>= 0.3.0, < 3)
@@ -361,8 +355,6 @@ PLATFORMS
DEPENDENCIES DEPENDENCIES
aws-sdk (< 3.0) aws-sdk (< 3.0)
better_errors
binding_of_caller
bootstrap-sass (~> 3.3.5) bootstrap-sass (~> 3.3.5)
byebug byebug
capybara capybara
@@ -382,7 +374,6 @@ DEPENDENCIES
mongoid (~> 5.0.0) mongoid (~> 5.0.0)
mongoid-paperclip mongoid-paperclip
mongoid-rspec (= 3.0.0) mongoid-rspec (= 3.0.0)
mongoid-sadstory
mongoid_paranoia mongoid_paranoia
paperclip-i18n paperclip-i18n
pry-rails pry-rails
Binary file not shown.

Before

Width:  |  Height:  |  Size: 233 KiB

After

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

-4
View File
@@ -38,10 +38,6 @@
.alert-notice .alert-notice
@extend .alert-info @extend .alert-info
.form-inline > *
margin: 5px
body.admin body.admin
background: repeating-linear-gradient(45deg, yellow, yellow 50px, black 50px, black 100px) background: repeating-linear-gradient(45deg, yellow, yellow 50px, black 50px, black 100px)
+7
View File
@@ -15,3 +15,10 @@
margin: 15px margin: 15px
width: 80px width: 80px
height: 80px height: 80px
.crypto_address
word-wrap: break-word
font-weight: bold
img.crypto_address
margin: 5px
@@ -33,11 +33,6 @@ class ApplicationController < ActionController::Base
false false
end end
def only_admin
return true if current_supporter && current_supporter.admin?
raise ActionController::RoutingError, 'Not Found'
end
protected protected
def configure_permitted_parameters def configure_permitted_parameters
+4 -4
View File
@@ -7,15 +7,15 @@ class ChargesController < ApplicationController
begin begin
@amount = Float(@amount).round(2) @amount = Float(@amount).round(2)
rescue rescue
flash[:error] = 'Bitte geben sie einen Betrag in CHF ein.' flash[:danger] = 'Bitte geben sie einen Betrag in CHF ein.'
redirect_to donation_path redirect_to donation_path
return return
end end
@amount = (@amount * 100).to_i # Must be an integer! @amount = (@amount * 100).to_i # Must be an integer!
if @amount < 500 if @amount < 1000
flash[:error] = 'Ihre Spende muss mindestens 5.- CHF betragen.' flash[:danger] = 'Ihre Spende muss mindestens 10.- CHF betragen.'
redirect_to donation_path redirect_to donation_path
return return
end end
@@ -23,7 +23,7 @@ class ChargesController < ApplicationController
Stripe::Charge.create(amount: @amount, currency: 'CHF', source: params[:stripeToken], description: 'Initiativspende') Stripe::Charge.create(amount: @amount, currency: 'CHF', source: params[:stripeToken], description: 'Initiativspende')
rescue Stripe::CardError => e rescue Stripe::CardError => e
flash[:error] = e.message flash[:danger] = e.message
redirect_to donation_path redirect_to donation_path
end end
end end
+5
View File
@@ -57,4 +57,9 @@ class GreendaysController < ApplicationController
def greenday_params def greenday_params
params.require(:greenday).permit(:title, :address, :homepage, :description, :logo, :delete_logo) params.require(:greenday).permit(:title, :address, :homepage, :description, :logo, :delete_logo)
end end
def only_admin
return true if current_supporter && current_supporter.admin?
raise ActionController::RoutingError, 'Not Found'
end
end end
@@ -1,90 +0,0 @@
class Network::SignatureCollectionsController < ApplicationController
before_action :only_admin, except: [:index, :show]
before_action :set_network_signature_collection, only: [:show, :edit, :update, :destroy]
# GET /network/signature_collections
# GET /network/signature_collections.json
def index
@query, @location, @distance = params[:query], params[:location], params[:distance]
@network_signature_collections = Network::SignatureCollection.where(:event_date_start.gte => DateTime.now)
@network_signature_collections = @network_signature_collections.or(location_zip_s: /#{@query}/i) if @query
@network_signature_collections = @network_signature_collections.or(location_name: /#{@query}/i) if @query
@network_signature_collections = @network_signature_collections.or(location_address: /#{@query}/i) if @query
distance_from_location
end
def distance_from_location
return unless @location && @distance
location_coordinates = Geocoder.coordinates(@location)
return unless location_coordinates # only filter when coordinates found
@network_signature_collections = @network_signature_collections.geo_near(location_coordinates.reverse).max_distance(@distance.to_f/111)
end
# GET /network/signature_collections/1
# GET /network/signature_collections/1.json
def show
end
# GET /network/signature_collections/new
def new
@network_signature_collection = Network::SignatureCollection.new
end
# GET /network/signature_collections/1/edit
def edit
end
# POST /network/signature_collections
# POST /network/signature_collections.json
def create
@network_signature_collection = Network::SignatureCollection.new(network_signature_collection_params)
respond_to do |format|
if @network_signature_collection.save
format.html { redirect_to @network_signature_collection, notice: 'Signature collection was successfully created.' }
format.json { render :show, status: :created, location: @network_signature_collection }
else
format.html { render :new }
format.json { render json: @network_signature_collection.errors, status: :unprocessable_entity }
end
end
end
# PATCH/PUT /network/signature_collections/1
# PATCH/PUT /network/signature_collections/1.json
def update
respond_to do |format|
if @network_signature_collection.update(network_signature_collection_params)
format.html { redirect_to @network_signature_collection, notice: 'Signature collection was successfully updated.' }
format.json { render :show, status: :ok, location: @network_signature_collection }
else
format.html { render :edit }
format.json { render json: @network_signature_collection.errors, status: :unprocessable_entity }
end
end
end
# DELETE /network/signature_collections/1
# DELETE /network/signature_collections/1.json
def destroy
@network_signature_collection.destroy
respond_to do |format|
format.html { redirect_to network_signature_collections_url, notice: 'Signature collection was successfully destroyed.' }
format.json { head :no_content }
end
end
private
# Use callbacks to share common setup or constraints between actions.
def set_network_signature_collection
@network_signature_collection = Network::SignatureCollection.find(params[:id])
end
# Never trust parameters from the scary internet, only allow the white list through.
def network_signature_collection_params
params.require(:network_signature_collection).permit(:location_name, :location_zip, :location_address, :event_date_start, :event_date_end)
end
end
+1 -1
View File
@@ -9,7 +9,7 @@ class SupportersController < ApplicationController
@supporter = Supporter.new supporter_form_params.merge(language: I18n.locale) @supporter = Supporter.new supporter_form_params.merge(language: I18n.locale)
@supporter.password = random_password = SecureRandom.hex(5) @supporter.password = random_password = SecureRandom.hex(5)
if !input_to_fast? && @supporter.save if !input_to_fast? && @supporter.save
SupporterMailer.welcome_email(@supporter, random_password).deliver_now # SupporterMailer.welcome_email(@supporter, random_password).deliver_now
sendy_registraion sendy_registraion
redirect_to thanks_path redirect_to thanks_path
else else
@@ -1,30 +0,0 @@
class Network::SignatureCollection
include Mongoid::Document
include Geocoder::Model::Mongoid
field :location_name, type: String
field :location_zip, type: Integer
field :location_zip_s, type: String
field :location_address, type: String
field :event_date_start, type: Time
field :event_date_end, type: Time
field :coordinates, type: Array
geocoded_by :address
before_save :update_location # auto-fetch coordinates
before_save :stringify_zip # auto-fetch coordinates
def address
"#{location_zip} #{location_name}, Switzerland"
end
def update_location
geocode
end
def stringify_zip
self.location_zip_s = self.location_zip.to_s
end
index({coordinates: "2d"})
end
-5
View File
@@ -1,5 +0,0 @@
address
| Verein Legalize it! <br/>
| Quellenstrasse 25 <br/>
| Postfach 2159 <br/>
| CH-8031 Zürich
-7
View File
@@ -1,7 +0,0 @@
h2 Kontakt
p
| Nino Forrer (#{mail_to 'nino@hanflegal.ch'})
em Strategie / Presse
br
| Markus Graf (#{mail_to 'markus@hanflegal.ch'})
em Inhalt / Technik
-7
View File
@@ -1,7 +0,0 @@
h2 Contatti
p
| Nino Forrer (#{mail_to 'nino@hanflegal.ch'})
em Strategie / Presse
br
| Markus Graf (#{mail_to 'markus@hanflegal.ch'})
em Inhalt / Technik
@@ -1,2 +0,0 @@
.donation_button
=link_to t('donation'), donation_path
+7 -9
View File
@@ -41,7 +41,6 @@ html lang="#{I18n.locale}"
meta name="twitter:image:alt" content="#{t('shared.header.logo')}" meta name="twitter:image:alt" content="#{t('shared.header.logo')}"
body class="#{'admin' if controller.admin_area}" body class="#{'admin' if controller.admin_area}"
= render 'donation_button'
javascript: javascript:
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@@ -52,8 +51,9 @@ html lang="#{I18n.locale}"
ga('send', 'pageview'); ga('send', 'pageview');
.container.anouncement .container.anouncement
/.text-center.lead.alert.alert-success /.text-center.lead.alert.alert-success
a href="https://wemakeit.com/projects/cannabislegalisierungs-crowd" class="text-success" | Für das Projekt Initiative ist Ende Januar ein neuer Träger­verein gegründet worden.
= t('shared.crowdfunding') br
| Weitere Informationen dazu werden folgen.
nav.languages.pull-right nav.languages.pull-right
h2.sr-only =t('shared.lang') h2.sr-only =t('shared.lang')
@@ -76,12 +76,10 @@ html lang="#{I18n.locale}"
main= yield main= yield
hr hr
footer.row footer.row
.col-xs-12.col-sm-6 /.col-xs-12.col-sm-6
= render 'core_statements' /= render 'core_statements'
.col-xs-12.col-sm-4 .col-xs-12
= render 'contact' p Dieses Onlineformular wurde vom <a href="https://www.hanflegal.ch">Verein Legalize it!</a> erstellt, um Unterstützende für eine neue Volksinitiative zur Legalisierung von Cannabis in der Schweiz zu sammeln. Die Geschichte des Initiativprojekts kann im <a href="/pages/archiv">Archiv</a> nachgelesen werden. Fragen zum Initiativprojekt können an <a href="mailto: info@cannabis-consensus.ch">info@cannabis-consensus.ch</a> gestellt werden.
.col-xs-12.col-sm-2
= render 'address'
javascript: javascript:
I18n.defaultLocale = "#{I18n.default_locale}"; I18n.defaultLocale = "#{I18n.default_locale}";
@@ -1,12 +0,0 @@
= simple_form_for(@network_signature_collection) do |f|
= f.error_notification
.form-inputs
= f.input :location_name
= f.input :location_zip, as: :numeric
= f.input :location_address
= f.input :event_date_start, as: :datetime
= f.input :event_date_end, as: :datetime
.form-actions
= f.button :submit, value: t('shared.save')
@@ -1,2 +0,0 @@
json.extract! network_signature_collection, :id, :location_name, :location_zip, :location_address, :event_date_start, :event_date_end, :created_at, :updated_at
json.url network_signature_collection_url(network_signature_collection, format: :json)
@@ -1,8 +0,0 @@
h1 Editing network_signature_collection
== render 'form'
= link_to 'Show', @network_signature_collection
' |
= link_to 'Back', network_signature_collections_path
@@ -1,47 +0,0 @@
h1 = title t('.title')
css:
.form-inline > * {
margin: 5px;
}
form
.form-inline
input.form-control placeholder="#{t('.search')}" name="query" value="#{@query}"
input.form-control placeholder="#{t('.location')}" name="location" value="#{@location}"
select.form-control name="distance"
- [5, 10, 20, 50, 100, 150, 200].each do | d |
- if d == @distance.to_i
option value="#{d}" selected="selected" #{d} Km
- else
option value="#{d}" #{d} Km
input.btn.btn-primary type="submit" value="#{t('.search')}"
table.table
thead
tr
th = Network::SignatureCollection.human_attribute_name :location_name
th = Network::SignatureCollection.human_attribute_name :location_zip
th = Network::SignatureCollection.human_attribute_name :location_address
th = Network::SignatureCollection.human_attribute_name :event_date_start
th = Network::SignatureCollection.human_attribute_name :event_date_end
- if admin?
th
th
th
tbody.list
- @network_signature_collections.each do |network_signature_collection|
tr
td.location_name = network_signature_collection.location_name
td.location_zip = network_signature_collection.location_zip
td.location_address = network_signature_collection.location_address
td.event_date_start = l network_signature_collection.event_date_start, format: :short
td.event_date_end = l network_signature_collection.event_date_end, format: :short
- if admin?
td = link_to t('shared.show'), network_signature_collection
td = link_to t('shared.edit'), edit_network_signature_collection_path(network_signature_collection)
td = link_to t('shared.destroy'), network_signature_collection, data: { confirm: 'Are you sure?' }, method: :delete
br
= link_to t('.new'), new_network_signature_collection_path
@@ -1 +0,0 @@
json.array! @network_signature_collections, partial: 'network_signature_collections/network_signature_collection', as: :network_signature_collection
@@ -1,5 +0,0 @@
h1 New network_signature_collection
== render 'form'
= link_to 'Back', network_signature_collections_path
@@ -1,21 +0,0 @@
p#notice = notice
p
strong = Network::SignatureCollection.human_attribute_name :location_name
= @network_signature_collection.location_name
p
strong = Network::SignatureCollection.human_attribute_name :location_zip
= @network_signature_collection.location_zip
p
strong = Network::SignatureCollection.human_attribute_name :location_address
= @network_signature_collection.location_address
p
strong = Network::SignatureCollection.human_attribute_name :event_date_start
= @network_signature_collection.event_date_start
p
strong = Network::SignatureCollection.human_attribute_name :event_date_end
= @network_signature_collection.event_date_end
= link_to 'Edit', edit_network_signature_collection_path(@network_signature_collection)
' |
= link_to 'Back', network_signature_collections_path
@@ -1 +0,0 @@
json.partial! "network_signature_collections/network_signature_collection", network_signature_collection: @network_signature_collection
+41
View File
@@ -0,0 +1,41 @@
markdown:
## März 2019
[So will eine neue Hanf-Allianz das Kiffen legalisieren](https://www.blick.ch/news/schweiz/starker-jugendschutz-staatliche-markt-kontrolle-so-will-eine-neue-hanf-allianz-das-kiffen-legalisieren-id15196799.html)
## Februar 2019
[Cannabis-Initiative erhält neuen Schub](https://www.aargauerzeitung.ch/schweiz/volksinitiative-geplant-legalisierung-von-cannabis-erhaelt-neuen-schub-134096909)
## November 2018
[Podium über Cannabis](https://zueriost.ch/news/2018-11-21/kaum-bedenken-fuer-cannabislegalisierung)
## Juni 2018
[Une votation populaire](https://www.letemps.ch/suisse/essais-pilotes-cannabis-legal-lespoir-tenu-villes-face-parlement)
## April 2018
[Die grössten Hürden für die Cannabis-Legalisierung](https://www.vice.com/de_ch/article/qvxaab/7-gegner-der-cannabis-legalisierung-initiative-hanflegal-dech)
## März 2018
[Unterschriftensammlung wird aus gutem Grund verschoben](https://www.watson.ch/schweiz/gesellschaft%20&%20politik/943177354-kiffer-freunde-wollen-buergerliche-fuer-gras-legaliserung-ins-boot-holen)
## November 2017
[Das gibt der Cannabis-Initiative Rückenwind](https://www.20min.ch/schweiz/news/story/-Das-gibt-der-Cannabis-Initiative-Rueckenwind--30790796)
## Oktober 2017
[Der VICE-Guide zum Kiffen in der Schweiz](https://www.vice.com/de_ch/article/59yzbz/der-vice-guide-zum-kiffen-in-der-schweiz)
## August 2017
[Schützt die Jugend - legalisiert Cannabis!](https://www.nzz.ch/meinung/drogenpolitik-schuetzt-die-jugend-legalisiert-cannabis-ld.1312315)
## April 2017
[Könnte das Verbot fallen?](https://www.vice.com/de_ch/article/d7bdwz/wieso-haben-wir-in-der-schweiz-das-kiffen-noch-immer-nicht-legalisiert-weedweek2017)
## Januar 2017
[12mila simpatizzanti](http://www.caffe.ch/stories/attualita/56687_vogliamo_che_lerba_venga_legalizzata/)
## Dezember 2016
[Wann wird Cannabis in der Schweiz legalisiert?](http://www.solothurnerzeitung.ch/schweiz/wann-wird-cannabis-in-der-schweiz-legalisiert-130765070)
## Mai 2016
[Kiffer wandern drei Stunden durchs Rheintal](http://www.20min.ch/schweiz/ostschweiz/story/Kiffer-wandern-drei-Stunden-durchs-Rheintal-15418622)
## April 2016
[«Legalize it!» plant Volksinitiative zur Cannabis-Legalisierung](http://www.watson.ch/Schweiz/Gesellschaft%20&%20Politik/807046564-%C2%ABLegalize-it!%C2%BB-Privater-Verein-plant-Volksinitiative-zur-Cannabis-Legalisierung)
-101
View File
@@ -1,101 +0,0 @@
h1 = title 'Wie macht man eine Volksinitiative?'
p TL;DR: Wenn wir 100'000 CHF erreichen, versuchen wir Methode C, wenn wir 250'000 CHF erreichen, Methode B und wenn wir 500'000 oder mehr erreichen, Methode A. Wenn wir weniger als 100'000 erreichen, können wir keine Initiative machen. <a href="#{donation_path}">Über Spenden, die wir hier entgegen nehmen</a>, würden wir uns sehr freuen!
h2 Einleitung
p Im April haben wir unseren Initiativtext bei der Bundeskanzlei eingereicht. Jedoch steht die Initiative noch auf der Kippe, denn: Uns fehlen bestimmte Ressourcen für die Sammlung und Beglaubigung der Initiative.
h2 Was wir unter Ressourcen verstehen
p Die Ressourcen jedes Projekts unterteilen wir in vier Kategorien: Arbeit, Zeit, Personen und Kapital. Ein kleines Beispiel zur Veranschaulichung:
p Anna und Bea wollen in einem Tag eine Holzbox bauen. Dafür sitzen die beiden erst zwei Stunden zusammen und planen. Danach läuft Anna innerhalb einer Stunde in den Baumarkt, kauft sechs Bretter à je 5 CHF, einen Hammer à 30 CHF und vier Nägel à 2 CHF und läuft zurück. Bea baut danach innerhalb von zwei Stunden die Holzbox.
ul
li Personen: 2 (Anna und Bea)
li Kapital: 6 Bretter x 5 CHF + 1 Hammer à 30 CHF + 4 Nägel à 2 CHF = 68 CHF
li Arbeit: Fahrt Baumarkt Anna (1h) + Bau Holzbox Bea (2h) = 3h
li Zeit: Arbeit (3h) + Zweistündige Sitzung à 2 Personen (4h) = 7h
p Das Projekt benötigt also 2 Personen, dauert 7 Stunden (wobei 3 Stunden davon die eigentliche Arbeit darstellt) und kostet 68 CHF. Soweit mal unsere simple Methode der Planung.
h2 Die Frage ist jetzt natürlich: Wie viel benötigt die Sammlung und Beglaubigung einer Volksinitiative an...
h3 ...Arbeit?
p Wenn wir von durchschnittlich 10 Unterschriften, die pro Stunde gesammelt werden, ausgehen (mehr dazu unten im Text), wäre die Anzahl Arbeitsstunden für die Sammlung = ca 10'000h
p Bezüglich Beglaubigung haben wir uns Referenzzahlen eingeholt von anderen Kampagnen und rechnen mit Arbeitsstunden von ca. 2'000h.
p Wir rechnen also damit, dass insgesamt mindestens 10'000h + 2'000h = 12'000 Arbeit geleistet werden muss, nur für die Sammlung und Beglaubigung einer Volksinitiative.
h3 ...Zeit?
p Nach vielen Gesprächen mit Personen anderer Initiativen haben wir als Richtwert für die Anzahl Zeitstunden im Vergleich zu den Anzahl Arbeitsstunden den Faktor 2 definiert. Also jede Stunde Arbeit an der Initiative erfordert eine zusätzliche Stunde, die in die Vorplanung geht.
ul
li Zeit Sammlung: 10'000h
li Zeit Beglaubigung: 2'000h.
p Wir rechnen also mit zusätzlichen 10'000h + 2'000h = 12'000 Zeitstunden neben den 12'000 Arbeitsstunden, nur für die Sammlung und Beglaubigung einer Volksinitiative.
h3 ...Personen?
p Grundsätzlich gibt es drei Kategorien:
ol
li Bezahlte Personen, die ein Arbeitspensum haben.
li Aktive Personen, die 7 oder mehr Stunden pro Woche aufwenden können. Und zwar jede Woche über einen Zeitraum von 18 Monaten.
li Pikett Personen, die man punktuell für kurze Arbeiten (< 5 Stunden), wie zum Beispiel das Helfen bei einer Sammlung, anfragen kann.
p Wie viele Personen man von jeder Kategorie benötigt, wird weiter unten erläutert.
h3 ...Geld?
p Die wahrscheinliche wichtigste Komponente, wie immer im Leben, ist die Frage des Geldes: Wie viel Geld benötigt man für die Sammlung und Beglaubigung einer Volksinitiative?
p Wir stellen drei Varianten vor:
.well
b Variante A - Die 500'000 CHF-Variante
br
em Geschätzte Erfolgschance: 90 Prozent
ul
li Bezahlte Personen: 2
li Aktive Personen > 7h/Woche : Keine
li Pikett Personen < 5h: Keine
li Lohnkosten: 2 Personen à 100 Prozent à 5'000 CHF / Monat über 18 Monate = 180'000 CHF
li Bezahlte Sammler: 2 CHF pro Unterschrift à 110'000 Unterschriften = 220'000 CHF.
li Beglaubigungskosten: 100'000 CHF (Externes Büro)
li Reserven: Keine
p <strong>Schlussrechnung</strong>: Lohnkosten (180'000 CHF) + Sammelkosten (220'000 CHF) + Beglaubigungskosten (100'000 CHF) = <strong>500'000 CHF.</strong>
hr
b Variante B - Die 250'000 CHF-Variante
br
em Geschätzte Erfolgschance: 50 Prozent
ul
li Bezahlte Personen: 2
li Aktive Personen >7h / Woche: 10
li Pikett Personen < 5h: ca. 50
li Lohnkosten: 2 Personen à 100 Prozent à 5'000 CHF / Monat über 18 Monate = 180'000 CHF
li Sammelkosten: 60'000 CHF (Porto, Werbung, Sammeltage)
li Beglaubigungskosten: 0 (alles von Aktivisten gemacht)
li Reserven: 10'000 CHF
p <strong>Schlussrechnung</strong>: Lohnkosten (180'000 CHF) + Sammelkosten (60'000 CHF) + Reserven (10'000 CHF) = <strong>250'000 CHF.</strong>
p Das Problem bei dieser Variante ist, dass einerseits 250'000 CHF auftreiben sehr schwer ist, noch schwieriger ist aber, 10 Personen zu finden, die über einen 18monativen Zeitraum > 7 Stunden ehrenamtlich pro Woche helfen.
hr
b Variante C - Die 100'000 CHF-Variante
br
em Geschätzte Erfolgschance: 25 Prozent
ul
li Bezahlte Personen: 2
li Aktive Personen >7h / Woche: (400 à 2 Wochen)
li Pikett Personen: ca. 2'000 (à 1 Tag)
li Lohnkosten: 84'000 CHF
li Sammelkosten: 6'000 CHF
li Beglaubigungskosten: 0 (alles von Aktivisten gemacht)
li Reserven: 10'000 CHF
p <strong>Schlussrechnung</strong>: Lohnkosten (84'000 CHF) + Sammelkosten (6'000 CHF) = <strong>100'000 CHF.</strong>
p Wir werden das Konzept zu dieser Variante, das sehr bald hier erscheinen wird, noch ganz konkret im Detail beschreiben. In diesem <a href="http://www.tagesanzeiger.ch/zuerich/region/kiffer-wollen-temporekord-im-unterschriftensammeln/story/25552535">TA-Artikel</a> findet ihr aber einen kleinen Vorgeschmack, in welche Richtung wir denken.
h2 Drei Varianten - Welche wird es?
p Welche Variante es wird, hängt also vor allem davon ab, wie viel Geld bis Ende Jahr eingespielt wird. Wir nehmen den 31.12.2017 als Stichdatum, weil wir denken, dass ein halbes Jahr eine sinnvolle Referenzgrösse ist um zu schauen, wie die Situation ausschaut. Welche Variante es wird, hängt also einfach von den Einnahmen zusammen: Um die 100'000 CHF = Variante C, um die 250'000 CHF = Variante B und 500'000 oder mehr = Variante A. Sollten wir weniger als 100'000 CHF einspielen, dann werden wir wohl den Initiativtext zurückziehen, denn einen gewissen Geldbetrag brauchen wir einfach, um eine Initiative durchzuziehen.
p Soweit mal die Aussichten. Wir sind positiv eingestellt und überzeugt, dass wir bis Ende Jahr eine gute Bilanz ziehen können. Wenn ihr uns unterstützen wollt, dann könnt ihr das hier tun. Auf die kommende Legalisierung!
+20 -37
View File
@@ -15,56 +15,34 @@ javascript:
} }
}); });
h2 Spendenbarometer
b Aktueller Stand: 73'000 CHF
.row
.col-xs-12
.progress-target style="width: 20%"
= link_to "Variante C:", collection_concept_path
br
| 100'000 CHF
.progress-target style="width: 30%"
= link_to "Variante B:", collection_concept_path
br
| 250'000 CHF
.progress-target style="width: 48%"
= link_to "Variante A:", collection_concept_path
br
| 500'000 CHF
.progress
.progress-bar.progress-bar-success role="progressbar" aria-valuenow="73000" aria-valuemin="0" aria-valuemax="500000" style="width: 14.6%"
p Detailliertere Informationen, wie dieses Geld eingesetzt wird, findest du unter <a href="#{collection_concept_path}">«Wie macht man eine Volksinitiative?»</a>
h2 Via Kreditkarte online spenden h2 Via Kreditkarte online spenden
= form_tag charges_path do = form_tag charges_path do
= hidden_field_tag(:stripeToken) = hidden_field_tag(:stripeToken)
- if flash[:error].present? #error_explanation.text-danger.hidden
#error_explanation.text-danger = flash[:error] if flash[:error].present?
= flash[:error]
.row .row
.col-xs12.col-md-5 .col-xs12.col-md-5
button.donatebox.btn.btn-success onclick="donate(20)" 20 .- button.donatebox.btn.btn-success onclick="donate(20)" 20 .-
button.donatebox.btn.btn-success onclick="donate(50)" 50 .- button.donatebox.btn.btn-success onclick="donate(50)" 50 .-
button.donatebox.btn.btn-success onclick="donate(100)" 100 .- button.donatebox.btn.btn-success onclick="donate(100)" 100 .-
button.donatebox.btn.btn-success onclick="donate(200)" 200 .- button.donatebox.btn.btn-success onclick="donate(200)" 200 .-
button.donatebox.btn.btn-success onclick="donate(500)" 500 .-
button.donatebox.btn.btn-success onclick="donate(1000)" 1000 .-
.col-xs12.col-md-6 .col-xs12.col-md-6
.form-group .form-group
strong oder einen eigenen Betrag strong oder einen eigenen Betrag
.form-group .form-group
.input-group .input-group
.input-group-addon CHF .input-group-addon CHF
= text_field_tag(:amount, 50 , class: 'form-control') = text_field_tag(:amount, 100 , class: 'form-control')
.form-group .form-group
button#donateButton.btn.btn-success Spenden übermitteln button#donateButton.btn.btn-success Spenden übermitteln
h2 Mit Bitcoin und Bitcoin Cash spenden h2 Mit Bitcoin, Bitcoin Cash oder Ethereum spenden
.row .row
.col-md-6.col-xs-12 .col-md-6.col-xs-12
p p
@@ -72,14 +50,18 @@ h2 Mit Bitcoin und Bitcoin Cash spenden
div div
| Gerne nehmen wir auch Spenden via Bitcoin unter folgender Adresse entgegen: | Gerne nehmen wir auch Spenden via Bitcoin unter folgender Adresse entgegen:
br br
strong 1LaYbTiCjhrUhxrQ9D5BQUfxPmRqJ7Q3gG span.crypto_address 1LaYbTiCjhrUhxrQ9D5BQUfxPmRqJ7Q3gG
br
| oder Bitcoin Cash:
br
i.crypto_address 1LVGcneFcYqCkhDFNsnhWb6x7cCHHxakg9
.col-md-6.col-xs-12 .col-md-6.col-xs-12
p p
= image_tag '1LVGcneFcYqCkhDFNsnhWb6x7cCHHxakg9.png', alt: 'Bitcoin Cash Adresse: 1LVGcneFcYqCkhDFNsnhWb6x7cCHHxakg9', width: '150', class: 'pull-right' = image_tag 'ethereum_address.png', alt: 'Ethereum Adresse: 0x8747d7F53FdaCD01bb269757E2bdd885B3033A45', width: '150', class: 'pull-right crypto_address'
div div
| Oder Bitcoin Cash unter folgender Adresse: | Gerne nehmen wir auch Spenden via Ethereum unter folgender Adresse entgegen:
br br
strong 1LVGcneFcYqCkhDFNsnhWb6x7cCHHxakg9 span.crypto_address 0x8747d7F53FdaCD01bb269757E2bdd885B3033A45
.clearfix .clearfix
h2 Per Überweisung spenden h2 Per Überweisung spenden
@@ -87,7 +69,7 @@ h2 Per Überweisung spenden
.col-md-7.col-xs-12 .col-md-7.col-xs-12
dl.dl-horizontal dl.dl-horizontal
dt Postkonto: dt Postkonto:
dd 87-091354-3, Verein Legalize it!, Postfach 2159, 8031 Zürich dd 87-091354-3, Verein Legalize it!, Quellenstrasse 25, 8005 Zürich
dt IBAN: dt IBAN:
dd CH02 0900 0000 8709 1354 3 dd CH02 0900 0000 8709 1354 3
dt Zahlungszweck: dt Zahlungszweck:
@@ -96,7 +78,6 @@ h2 Per Überweisung spenden
= link_to asset_path('Einzahlungsschein_Spende_Initiative.pdf') do = link_to asset_path('Einzahlungsschein_Spende_Initiative.pdf') do
= image_tag('Einzahlungsschein_Spende_Initiative.jpg', class:'img-responsive', alt: 'Einzahlungsschein Spende initiative') = image_tag('Einzahlungsschein_Spende_Initiative.jpg', class:'img-responsive', alt: 'Einzahlungsschein Spende initiative')
p p
b Wir würden uns freuen, wenn ihr das macht und uns finanziell unter die Arme greift. b Wir würden uns freuen, wenn ihr das macht und uns finanziell unter die Arme greift.
@@ -121,10 +102,12 @@ javascript:
amount = parseFloat(amount); amount = parseFloat(amount);
if (isNaN(amount)) { if (isNaN(amount)) {
$('#error_explanation').toggleClass('hidden')
$('#error_explanation').html('<p>Bitte geben sie einen Betrag in CHF ein.</p>'); $('#error_explanation').html('<p>Bitte geben sie einen Betrag in CHF ein.</p>');
} }
else if (amount < 5.00) { else if (amount < 10.00) {
$('#error_explanation').html('<p>Ihre Spende muss mindestens 5.- CHF betragen.</p>'); $('#error_explanation').toggleClass('hidden')
$('#error_explanation').html('<p>Ihre Spende muss mindestens 10.- CHF betragen.</p>');
} }
else { else {
amount = amount * 100; // Needs to be an integer! amount = amount * 100; // Needs to be an integer!
-18
View File
@@ -1,18 +0,0 @@
h1 = title 'Netzwerk Legalisierung'
p Liebe Legalisierende
p Du bist auf der offiziellen Webseite für die Volksinitiative zur Legalisierung von Cannabis in der Schweiz.
p Das Netzwerk Legalisierung ist ein Versuch, eine Kampagne völlig neu zu organisieren. Konkret ermöglicht dir das Netzwerk, die Kampagne für die Legalisierung selbst zu gestalten und die Legalisierung dann auch mit den anderen im Netzwerk voranzutreiben. Das Netzwerk Legalisierung ist also ein grosses Werkzeug, aufgebaut aus vielen kleinen Werkzeugen.
p Entstanden ist die Idee, weil der Verein Legalize it!, der die Initiative lanciert hat, kaum Ressourcen zur Verfügung stehen. Im Gegensatz zu Parteien und grossen Organisationen ist Legalize it! kein durchorganisierter politischer Verein mit tausenden Mitgliedern und einem immer-vollen Konto. Der Verein Legalize it! kann also die Initiative nicht alleine meistern.
p Letztendlich bedeutet dies: Ob die Legalisierung durchkommt, hängt entscheidend von dir und allen anderen Mitwirkenden im Netzwerk ab. Legalisierung passiert nicht, sondern muss gemacht werden.
p Wenig überraschend werden wir beim Verein dafür immer wieder gefragt, wie man sich für die Legalisierung konkret einsetzen kann. Denn Hunderttausende sind von der heutigen Bevormundungspolitik als Konsumierende direkt betroffen. Und sie alle wissen, dass sie direkt betroffen sind.
p Um die Legalisierung voranzubringen, bracht es verschieden Vorgehensweisen. Darum sammeln wir all eure Aktionen auf dieser Plattform. Das Netzwerk Legalisierung ist daher so aufgebaut, dass alle Möglichkeiten, sich für die Legalisierung von Cannabis einzusetzen, auf einer Plattform gesammelt werden.
p Ohne einen stramm-durchorganisierten Verein im Eiltempo hochzuziehen, wollen wir so als schlank-organisiertes und smart organisiertes Netzwerk gemeinsam die Legalisierung erreichen.
h2 So funktioniert es
p Das Netzwerk ist in drei Hauptkategorien und sieben Unterkategorien aufgeteilt. Schau dir die Seiten am besten von links nach rechts mal an, damit du einen Überblick bekommst.
p Die erste Hauptkategorie beschäftigt sich mit dem, was nötig ist, damit die Initiative überhaupt zu Stande kommt. Es geht also um die Unterschriftensammlung und Finanzierung. Erreichen wir die Ziele in der ersten Kategorie nicht, ist es nicht möglich, diese Initiative durchzuführen.
p In der zweiten Hauptkategorie in der Mitte werden die Grundlagen der Überzeugungs- und Kampagnenarbeit thematisiert. Das ist zum einen die Selbstbildung, zum anderen der Aufbau von Netzwerk-Cliquen.
p In der dritten Hauptkategorie rechts geht es um die eigentliche Überzeugungs- und Kampagnenarbeit. Es geht um die Überzeugungsarbeit in deinem eignen Umfeld, halb-öffentliche und öffentliche Überzeugungsarbeit mittels Social Media und politischer Aktionen, sowie die Möglichkeiten das Netzwerk intern zu stärken. In der dritten Hauptkategorie geht es also um deine konkreten Möglichkeiten, die Kampagne selbst zu gestalten und zu organisieren, um die Leute gezielt zu überzeugen. Du findest in der dritten Hauptkategorie dazu einen einführenden Text, das Aktionen- und Veranstaltungstool, sowie Möglichkeiten zum Ideen-Austausch.
p Damit du das Netzwerk nutzen kannst musst du dich lediglich hier registrieren:
- @supporter = Supporter.new
= render 'supporters/form'
+1 -40
View File
@@ -1,43 +1,4 @@
h1 h1 = title t('.title')
= title t('.title')
| Du bist nun ein Teil der Bewegung!
h2 Wie sieht das weitere Vorgehen aus?
p
| Wir informieren dich per E-Mail über die nächsten Schritte und kommen aktiv auf dich zu.
| Auf #{link_to 'https://www.hanflegal.ch/initiative', 'https://www.hanflegal.ch/initiative'} informieren wir über laufende Aktivitäten.
h2 Was kannst du machen?
ul
li = link_to 'Spende für die Legalisierung', donation_path
li Versende den <a href="mailto:?subject=Es wird Zeit, Cannabis in der Schweiz legalisieren&body=Ich hab meine Unterstützung zugesichert unter https://ch420.herokuapp.com. Unterstütze uns auch du.">Link zum Online-Formular</a> an all deine Freunde und Bekannte
li Folge uns auf <a href="https://www.facebook.com/vereinlegalizeit">Facebook</a> und <a href="https://twitter.com/VereinLegalize">Twitter</a>
li Teile unser Projekt in den sozialen Medien mit dem Hashtag #CH420
li Erzähle allen von unserem Vorhaben und bitte Sie mitzumachen
li Werde Mitglied beim <a href="https://www.hanflegal.ch">Verein Legalize it!</a>
h2 Folge uns auf Facebook
#fb-root
javascript:
(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/de_DE/sdk.js#xfbml=1&version=v2.4&appId=236723906381514";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
.fb-like data-action="like" data-href="https://www.facebook.com/vereinlegalizeit" data-layout="standard" data-share="true" data-show-faces="true"
h2 Folge uns auf Twitter
p
<a href="https://twitter.com/vereinlegalize" class="twitter-follow-button" data-show-count="false" data-lang="de" data-size="large">@vereinlegalize folgen</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
.lead Setze ein Zeichen und zeig, dass du uns unterstützt
p
<a href="https://twitter.com/share" class="twitter-share-button" data-url="https://ch420.herokuapp.com" data-text="Ja, ich will Cannabis in der Schweiz legalisieren" data-via="vereinlegalize" data-lang="de" data-size="large" data-hashtags="ch420">Twittern</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
p p
a href="/" Zurück zum Formular a href="/" Zurück zum Formular
-40
View File
@@ -1,40 +0,0 @@
h1
= title t('.title')
| Tu fais maintenant partie du mouvement!
h2 Quelles sont les prochaines étapes?
p
| Nous allons tenvoyer par e-mail les informations sur les prochaines étapes.
| Sur #{link_to 'https://www.hanflegal.ch/initiative', 'https://www.hanflegal.ch/initiative'} initiative nous informons des activités en cours.
h2 Que peux-tu faire?
ul
li Envoie le <a href="mailto:?subject=Oui, je veux légaliser le cannabis en Suisse.&body=Envoie un signe et montre que tu nous soutiens sur https://ch420.herokuapp.com. Unterstütze uns auch du.">lien pour le formulaire en ligne</a> à tous tes amis et connaissances
li Suis-nous sur <a href="https://www.facebook.com/vereinlegalizeit">Facebook</a> et <a href="https://twitter.com/VereinLegalize">Twitter</a>
li Partage notre projet sur les réseaux sociaux avec le hashtag #CH420
li Raconte à tout le monde ce que nous avons prévu et demande leurs de participer
li Deviens un <a href="https://www.hanflegal.ch">membre de lassociation Legalize it!</a>
h2 Suis-nous sur Facebook
#fb-root
javascript:
(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/de_DE/sdk.js#xfbml=1&version=v2.4&appId=236723906381514";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
.fb-like data-action="like" data-href="https://www.facebook.com/vereinlegalizeit" data-layout="standard" data-share="true" data-show-faces="true"
h2 Retour au formulaire
p
<a href="https://twitter.com/vereinlegalize" class="twitter-follow-button" data-show-count="false" data-lang="de" data-size="large">@vereinlegalize folgen</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
h2 Envoie un signe et montre que tu nous soutiens
p
<a href="https://twitter.com/share" class="twitter-share-button" data-url="https://ch420.herokuapp.com" data-text="Ja, ich will Cannabis in der Schweiz legalisieren" data-via="vereinlegalize" data-lang="de" data-size="large" data-hashtags="ch420">Twittern</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
p
a href="/fr" Retour au formulaire
-39
View File
@@ -1,39 +0,0 @@
h1
= title t('.title')
| Ora sei una parte del movimento!
h2 Qual’é la strada da seguire?
p
| Vi informeremo via e-mail circa i prossimi passi e diventare attivo.
| Su #{link_to 'https://www.hanflegal.ch/initiative', 'https://www.hanflegal.ch/initiative'} può informarsi sulle attività in corso.
h2 Che cosa puoi fare?
ul
li Invia il <a href="mailto:?subject=Si, voglio legalizzare la cannabis in Svizzera&body=https://ch420.herokuapp.com">link del formulario on-line</a> a tutti i tuoi amici e conoscenti
li Seguici su <a href="https://www.facebook.com/vereinlegalizeit">Facebook</a> e <a href="https://twitter.com/VereinLegalize">Twitter</a>
li Racconta die nostri progetti sui social media con lHashtag #CH420
li Di a tutti di unirsi ai nostri progetti
li Diventa un membro dell <a href="https://www.hanflegal.ch">associazione Verein Legalize it!</a>
h2 Seguici su Facebook
#fb-root
javascript:
(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/de_DE/sdk.js#xfbml=1&version=v2.4&appId=236723906381514";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
.fb-like data-action="like" data-href="https://www.facebook.com/vereinlegalizeit" data-layout="standard" data-share="true" data-show-faces="true"
h2 Seguici su Twitter
p
<a href="https://twitter.com/vereinlegalize" class="twitter-follow-button" data-show-count="false" data-lang="de" data-size="large">@vereinlegalize folgen</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
p
<a href="https://twitter.com/share" class="twitter-share-button" data-url="https://ch420.herokuapp.com" data-text="Ja, ich will Cannabis in der Schweiz legalisieren" data-via="vereinlegalize" data-lang="de" data-size="large" data-hashtags="ch420">Twittern</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
p
a href="/it" Vai alla modulo
+1 -3
View File
@@ -1,8 +1,6 @@
header header
.row .row
.col-md-1.col-xs-4 .col-xs-8
= image_tag('ch420_logo.png', class:'img-responsive pagelogo', alt: t('.logo'))
.col-md-7.col-xs-8
h1 h1
= t('.title_html') = t('.title_html')
.col-xs-12.col-md-4.hidden-xs.hidden-sm .col-xs-12.col-md-4.hidden-xs.hidden-sm
+6 -2
View File
@@ -1,4 +1,8 @@
= simple_form_for @supporter do |f| - title(t('shared.header.title_html'))
.row
.col-xs-12
h2.sr-only = t('.form')
= simple_form_for @supporter do |f|
= f.input :first_name, placeholder: t('.placeholders.first_name') = f.input :first_name, placeholder: t('.placeholders.first_name')
= f.input :last_name, placeholder: t('.placeholders.last_name') = f.input :last_name, placeholder: t('.placeholders.last_name')
= f.input :street, placeholder: t('.placeholders.street') = f.input :street, placeholder: t('.placeholders.street')
@@ -16,7 +20,7 @@
= link_to t('.terms_and_conditions'), terms_and_conditions_path, class: 'small' = link_to t('.terms_and_conditions'), terms_and_conditions_path, class: 'small'
javascript: javascript:
var cities = new Bloodhound({ var cities = new Bloodhound({
datumTokenizer: Bloodhound.tokenizers.whitespace, datumTokenizer: Bloodhound.tokenizers.whitespace,
queryTokenizer: Bloodhound.tokenizers.whitespace, queryTokenizer: Bloodhound.tokenizers.whitespace,
-24
View File
@@ -1,24 +0,0 @@
.well
h2.sr-only Über die Initiative
p = image_tag 'li_logo.svg', class: 'img-responsive', alt: 'Logo des Vereins Legalize it!'
p Wir wollen die nötigen Unterschriften für eine Volksinitiative zur Cannabis-Legalisierung sammeln. Für die Umsetzung setzt man auf ein neues Sammelkonzept. Dies funktioniert in drei Schritten:
p
strong Schritt 1:
| Durch dieses Onlineformular sammeln wir Sympathisanten und potentielle Aktivisten.
p
strong Schritt 2:
| Sobald die geforderte Anzahl Personen gesammelt sind, schauen wir, wie viele Ressourcen an Helfer/innen an welchen Orten benötigt werden.
p
strong Schritt 3:
| Durch eine ausgeklügelte Logistik werden Sympathisanten und Aktivisten zusammengebracht, um gemeinsam die nötigen Unterschriften zu generieren.
p.lead Wenn du also <span class="text-success">Cannabis in der Schweiz legalisieren</span> willst, fülle das nebenstehende Formular aus und schreibe mit uns Geschichte.
/ p.embed-responsive.embed-responsive-4by3
iframe.embed-responsive-item src="https://www.youtube.com/embed/l5DjuLXRVVM" frameborder="0" allowfullscreen=""
/ p.embed-responsive.embed-responsive-4by3
iframe src="https://www.youtube.com/embed/videoseries?list=PLlC7Go4yV6YKunLd6O627HTQlNswQQ6vw" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen
h3 Wer steht hinter dieser Aktion?
p Die Aktion wurde von Mitgliedern des Verein Legalize it! initiiert. Seit 25 Jahren helfen wir vom Verein Legalize it! Menschen, die mit THC-Produkten Umgang pflegen, bei den unterschiedlichsten Fragen.
-19
View File
@@ -1,19 +0,0 @@
.well
h2.sr-only A propos de l'initiative
p = image_tag 'li_logo.svg', class: 'img-responsive', alt: 'Logo de l\'association Legalize It!'
p Nous voulons recueillir les signatures nécessaires pour une initiative populaire pour la légalisation du cannabis. Pour lexécution de ce projet, un nouveau concept de collection a été mis sur pieds. Cela fonctionne en trois étapes:
p
strong Etape 1:
| Avec ce formulaire en ligne, nous recueillions des sympathisants et des militants potentiels.
p
strong Etape 2:
| Une fois que le nombre nécessaire de personnes est atteint, nous pouvons regarder dans quel région de la Suisse se trouvent les différents militants.
p
strong Etape 3:
| Grâce à une logistique sophistiquée, les sympathisants et militants seront réunis pour pouvoir obtenir ensemble les signatures nécessaires.
p.lead Donc, si tu désires <span class="text-success">légaliser le cannabis en Suisse</span>, remplis le formulaire ci-dessous et aide nous à faire un grand pas dans l'histoire
h3 Qui se trouve derrière cette action?
p L'action a été lancée par les membres de l'association Legalize It!. Depuis 25 ans, nous, de lassociation Legalize It!, aidons les gens qui utilisent des produits à base de THC et répondons volontiers à leurs questions.
-20
View File
@@ -1,20 +0,0 @@
.well
h2.sr-only A proposito l'iniziativa
p = image_tag 'li_logo.svg', class: 'img-responsive', alt: 'Logo dell\'associazione Legalize It!'
p Vogliamo raccogliere le firme necessarie per un'iniziativa popolare per la legalizzazione della cannabis. Per implementare l'accento su un nuovo concetto collettivo. Questo funziona in tre fasi:
p
strong Fase 1:
| Con questo modulo on-line che raccoglie simpatizzanti e potenziali attivisti.
p
strong Fase 2:
| Una volta raccolto il numero richiesto di persone, andiamo a vedere quante risorse di aiuto sono in nel luogo dove richiesto.
p
strong Fase 3:
| Utilizzando un sofisticata logistica riuniremo simpatizzanti e attivisti per generare congiuntamente le firme necessarie.
p.lead Quindi, se anche tu vuoi <span class="text-success">legalizzare la Cannabis</span> in Svizzera, compila il seguente modulo e riscrivi la storia con noi.
h3 Chi c’é dietro questa azione?
p L'azione è stata sostenuta da membri dell'associazione Legalize It! Da 25 anni aiutiamo l'associazione Legalize It! Le persone che si prendono cura con prodotti THC si occupano di una vasta gamma di questioni.
+1 -10
View File
@@ -1,7 +1,7 @@
- if supporter_signed_in? - if supporter_signed_in?
h1.sr-only = title t('.title', name: current_supporter.first_name) h1.sr-only = title t('.title', name: current_supporter.first_name)
.row .row
.col-xs-12.col-md-7 .col-xs-12
.panel.panel-default .panel.panel-default
.panel-heading .panel-heading
h2.panel-title = t '.my_data' h2.panel-title = t '.my_data'
@@ -31,14 +31,5 @@
= render 'publicity' = render 'publicity'
aside.col-md-5.col-xs-12
= render 'right_side'
- else - else
- title(t('shared.header.title_html'))
.row
.col-xs-12.col-md-7
h2.sr-only = t('.form')
= render 'form' = render 'form'
aside.col-md-5.col-xs-12
= render 'right_side'
+6 -1
View File
@@ -1,7 +1,6 @@
--- ---
title: '#CH420 Statistiken Onlineforumlar' title: '#CH420 Statistiken Onlineforumlar'
author: "Markus Graf" author: "Markus Graf"
date: "23. April 2016"
output: html_document output: html_document
--- ---
@@ -28,4 +27,10 @@ pielabels<- paste(percentlabels, "%", sep="")
cols <- rainbow(4) cols <- rainbow(4)
pie(ages, main="Altersverteilung #CH420", col=cols, labels=pielabels, cex=0.8, sub=paste("N =", sum(ages))) pie(ages, main="Altersverteilung #CH420", col=cols, labels=pielabels, cex=0.8, sub=paste("N =", sum(ages)))
legend("topright", c("30-64",">64","< 18","18-30"), cex=0.8, fill=cols) legend("topright", c("30-64",">64","< 18","18-30"), cex=0.8, fill=cols)
support <- table(all$support)
pielabels<- support
cols <- rainbow(2)
pie(support, main="Supportverteilung #CH420", col=cols, labels=pielabels, cex=0.8, sub=paste("N =", sum(support)))
legend("topright", c("Unterschreibende","Sammler"), cex=0.8, fill=cols)
``` ```
+1 -19
View File
@@ -19,14 +19,10 @@ de:
numbers: Zahlen numbers: Zahlen
statements: Statements statements: Statements
collection_concept: Wie macht man eine Volksinitiative? collection_concept: Wie macht man eine Volksinitiative?
network: Netzwerk
signature_collections: Unterschriftensammlung
lang: Sprache lang: Sprache
are_you_sure: Bist du sicher? are_you_sure: Bist du sicher?
edit: Bearbeiten edit: Bearbeiten
show: Anzeigen
destroy: Löschen
save: Speichern save: Speichern
description: Volksinitiative zur Legalisierung von Cannabis in der Schweiz. description: Volksinitiative zur Legalisierung von Cannabis in der Schweiz.
@@ -113,13 +109,7 @@ de:
title: Statements von unseren Unterstützern title: Statements von unseren Unterstützern
submit_your_own_statement: Veröffentliche dein eigenes Statement... submit_your_own_statement: Veröffentliche dein eigenes Statement...
read_more: das ganze Statement lesen. read_more: das ganze Statement lesen.
network:
signature_collections:
index:
new: Neue Sammlung erfasssen
title: Unterschriftensammlungen
search: Suche
location: Ort
routes: routes:
initiative_text: initiativtext initiative_text: initiativtext
arguments: argumentarium arguments: argumentarium
@@ -130,8 +120,6 @@ de:
statementes: statements statementes: statements
collection_concept: Sammelkonzept collection_concept: Sammelkonzept
greendays: greensaturday greendays: greensaturday
network: netzwerk
signature_collections: unterschriftensammlung
mongoid: mongoid:
models: models:
@@ -159,9 +147,3 @@ de:
organisation: Organisation organisation: Organisation
statement: Statement statement: Statement
avatar: Bild avatar: Bild
network/signature_collection:
location_name: Ort
location_zip: Postleitzahl
location_address: Adresse
event_date_start: Startzeit
event_date_end: Endzeit
-4
View File
@@ -24,8 +24,6 @@ fr:
statements: Déclarations statements: Déclarations
collection_concept: Comment faire une initiative populaire? (en allemand) collection_concept: Comment faire une initiative populaire? (en allemand)
my_account: Mon compte my_account: Mon compte
network: Réseau
signature_collections: Collection des signatures
lang: Langue lang: Langue
are_you_sure: Tu es sûre? are_you_sure: Tu es sûre?
@@ -119,8 +117,6 @@ fr:
statements: declarations statements: declarations
collection_concept: plan_de_collecte collection_concept: plan_de_collecte
greendays: greensaturday greendays: greensaturday
network: reseau
signature_collections: collection_signature
mongoid: mongoid:
models: models:
-4
View File
@@ -21,8 +21,6 @@ it:
statements: Dichiarazioni statements: Dichiarazioni
collection_concept: Come fare un iniziativa popolare? (in tedesco) collection_concept: Come fare un iniziativa popolare? (in tedesco)
my_account: Il mio account my_account: Il mio account
network: Reticolato
signature_collections: collezione di firme
counter: counter:
supporters: "Sostenitore:" supporters: "Sostenitore:"
@@ -123,8 +121,6 @@ it:
statements: dichiarazioni statements: dichiarazioni
collection_concept: sistema_di_raccolta collection_concept: sistema_di_raccolta
greendays: greensaturday greendays: greensaturday
network: reticolato
signature_collections: collezione_firme
mongoid: mongoid:
attributes: attributes:
+4 -21
View File
@@ -57,38 +57,21 @@ SimpleNavigation::Configuration.run do |navigation|
# against the current URI. You may also use a proc, or the symbol <tt>:subpath</tt>. # against the current URI. You may also use a proc, or the symbol <tt>:subpath</tt>.
# #
primary.item :greendays, '#Greensaturday', greendays_path #primary.item :greendays, '#Greensaturday', greendays_path
unless supporter_signed_in? unless supporter_signed_in?
primary.item :home, I18n.t('.shared.topnavigation.support'), "/#{I18n.locale}" primary.item :home, I18n.t('.shared.topnavigation.support'), "/#{I18n.locale}"
end end
# primary.item :initiative, I18n.t('.shared.topnavigation.initiative'), initiative_text_path
primary.item :archivb, "Archiv", '/pages/archiv'
primary.item :initiative, I18n.t('.shared.topnavigation.initiative'), initiative_text_path do | initiative |
initiative.item :arguments, I18n.t('.shared.topnavigation.arguments'), arguments_path
initiative.item :faq, I18n.t('.shared.topnavigation.faq'), faq_path
initiative.item :numbers, I18n.t('.shared.topnavigation.numbers'), numbers_path
initiative.item :collection_concept, I18n.t('.shared.topnavigation.collection_concept'), collection_concept_path
end
primary.item :statements, I18n.t('.shared.topnavigation.statements'), statements_path do |statements|
statements.item :new_statement, I18n.t('.supporters.publicity.renew'), new_publicity_path
end
primary.item :donation, I18n.t('donation'), donation_path
primary.item :network, I18n.t('.shared.topnavigation.network'), network_path do | network |
network.item :signature_collections, I18n.t('.shared.topnavigation.signature_collections'), network_signature_collections_path
end
primary.item :blog, 'Blog', 'http://blog.cannabis-initiative.ch/', link_html: { target: '_blank'}
if supporter_signed_in? if supporter_signed_in?
primary.item :home, I18n.t('.shared.topnavigation.my_account'), "/#{I18n.locale}" do |my_account| primary.item :home, I18n.t('.shared.topnavigation.my_account'), "/#{I18n.locale}" do |my_account|
my_account.item :edit_account, I18n.t('.supporters.new.edit'), edit_supporter_registration_path() my_account.item :edit_account, I18n.t('.supporters.new.edit'), edit_supporter_registration_path()
my_account.item :sign_out, I18n.t('.shared.topnavigation.sign_out'), destroy_supporter_session_path, link_html: { 'data-method' => :delete } my_account.item :sign_out, I18n.t('.shared.topnavigation.sign_out'), destroy_supporter_session_path, link_html: { 'data-method' => :delete }
end end
else else
primary.item :home, I18n.t('.shared.topnavigation.sign_in'), new_supporter_session_path # primary.item :home, I18n.t('.shared.topnavigation.sign_in'), new_supporter_session_path
end end
+3 -15
View File
@@ -1,5 +1,4 @@
Rails.application.routes.draw do Rails.application.routes.draw do
devise_for :supporters devise_for :supporters
root to: 'supporters#new' root to: 'supporters#new'
@@ -12,21 +11,10 @@ Rails.application.routes.draw do
end end
localized do localized do
get 'network', to: 'pages#show', as: :network, page: 'network' #resources :greendays
namespace :network do #get '/initiative_text', to: 'pages#show', as: :initiative_text, page: 'initiative_text'
resources :signature_collections
end
resources :greendays
get '/initiative_text', to: 'pages#show', as: :initiative_text, page: 'initiative_text'
get '/arguments', to: 'pages#show', as: :arguments, page: 'arguments'
get '/faq', to: 'pages#show', as: :faq, page: 'faq'
get '/terms_and_conditions', to: 'pages#show', as: :terms_and_conditions, page: 'terms_and_conditions' get '/terms_and_conditions', to: 'pages#show', as: :terms_and_conditions, page: 'terms_and_conditions'
get '/sponsoring', to: 'pages#show', as: :sponsoring, page: 'sponsoring' #get '/donation', to: 'pages#show', as: :donation, page: 'donation'
get '/donation', to: 'pages#show', as: :donation, page: 'donation'
get '/numbers', to: 'pages#show', as: :numbers, page: 'numbers'
get '/collection_concept', to: 'pages#show', as: :collection_concept, page: 'collection_concept'
get '/statements', to: 'pages#show', as: :statements, page: 'statements'
end end
get '/cities_autocomplete', to: 'cities_autocomplete#index', as: :cities_autocomplete get '/cities_autocomplete', to: 'cities_autocomplete#index', as: :cities_autocomplete
-8
View File
@@ -5,11 +5,3 @@
# #
# cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }]) # cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
# Mayor.create(name: 'Emanuel', city: cities.first) # Mayor.create(name: 'Emanuel', city: cities.first)
@cities = CSV.read Rails.root.join('db', 'plz_ch.csv')
@cities.sample(122).each do |city|
tmp_date = DateTime.now + rand(50)
Network::SignatureCollection.create(location_zip: city.first, location_name: city.last, location_address: Faker::Address.street_address, event_date_start: tmp_date, event_date_end: tmp_date+rand(10).to_f/10)
end
# Network::SignatureCollection.where(location: {"$near" => x.location, '$maxDistance' => 1.fdiv(111.12)}).map &:location_name
@@ -1,141 +0,0 @@
require 'rails_helper'
# This spec was generated by rspec-rails when you ran the scaffold generator.
# It demonstrates how one might use RSpec to specify the controller code that
# was generated by Rails when you ran the scaffold generator.
#
# It assumes that the implementation code is generated by the rails scaffold
# generator. If you are using any extension libraries to generate different
# controller code, this generated spec may or may not pass.
#
# It only uses APIs available in rails and/or rspec-rails. There are a number
# of tools you can use to make these specs even more expressive, but we're
# sticking to rails and rspec-rails APIs to keep things simple and stable.
#
# Compared to earlier versions of this generator, there is very limited use of
# stubs and message expectations in this spec. Stubs are only used when there
# is no simpler way to get a handle on the object needed for the example.
# Message expectations are only used when there is no simpler way to specify
# that an instance is receiving a specific message.
#
# Also compared to earlier versions of this generator, there are no longer any
# expectations of assigns and templates rendered. These features have been
# removed from Rails core in Rails 5, but can be added back in via the
# `rails-controller-testing` gem.
RSpec.describe Network::SignatureCollectionsController, type: :controller do
# This should return the minimal set of attributes required to create a valid
# Network::SignatureCollection. As you add validations to Network::SignatureCollection, be sure to
# adjust the attributes here as well.
let(:valid_attributes) {
skip("Add a hash of attributes valid for your model")
}
let(:invalid_attributes) {
skip("Add a hash of attributes invalid for your model")
}
# This should return the minimal set of values that should be in the session
# in order to pass any filters (e.g. authentication) defined in
# Network::SignatureCollectionsController. Be sure to keep this updated too.
let(:valid_session) { {} }
describe "GET #index" do
it "returns a success response" do
signature_collection = Network::SignatureCollection.create! valid_attributes
get :index, {}, valid_session
expect(response).to be_success
end
end
describe "GET #show" do
it "returns a success response" do
signature_collection = Network::SignatureCollection.create! valid_attributes
get :show, {:id => signature_collection.to_param}, valid_session
expect(response).to be_success
end
end
describe "GET #new" do
it "returns a success response" do
get :new, {}, valid_session
expect(response).to be_success
end
end
describe "GET #edit" do
it "returns a success response" do
signature_collection = Network::SignatureCollection.create! valid_attributes
get :edit, {:id => signature_collection.to_param}, valid_session
expect(response).to be_success
end
end
describe "POST #create" do
context "with valid params" do
it "creates a new Network::SignatureCollection" do
expect {
post :create, {:network_signature_collection => valid_attributes}, valid_session
}.to change(Network::SignatureCollection, :count).by(1)
end
it "redirects to the created network_signature_collection" do
post :create, {:network_signature_collection => valid_attributes}, valid_session
expect(response).to redirect_to(Network::SignatureCollection.last)
end
end
context "with invalid params" do
it "returns a success response (i.e. to display the 'new' template)" do
post :create, {:network_signature_collection => invalid_attributes}, valid_session
expect(response).to be_success
end
end
end
describe "PUT #update" do
context "with valid params" do
let(:new_attributes) {
skip("Add a hash of attributes valid for your model")
}
it "updates the requested network_signature_collection" do
signature_collection = Network::SignatureCollection.create! valid_attributes
put :update, {:id => signature_collection.to_param, :network_signature_collection => new_attributes}, valid_session
signature_collection.reload
skip("Add assertions for updated state")
end
it "redirects to the network_signature_collection" do
signature_collection = Network::SignatureCollection.create! valid_attributes
put :update, {:id => signature_collection.to_param, :network_signature_collection => valid_attributes}, valid_session
expect(response).to redirect_to(signature_collection)
end
end
context "with invalid params" do
it "returns a success response (i.e. to display the 'edit' template)" do
signature_collection = Network::SignatureCollection.create! valid_attributes
put :update, {:id => signature_collection.to_param, :network_signature_collection => invalid_attributes}, valid_session
expect(response).to be_success
end
end
end
describe "DELETE #destroy" do
it "destroys the requested network_signature_collection" do
signature_collection = Network::SignatureCollection.create! valid_attributes
expect {
delete :destroy, {:id => signature_collection.to_param}, valid_session
}.to change(Network::SignatureCollection, :count).by(-1)
end
it "redirects to the network_signature_collections list" do
signature_collection = Network::SignatureCollection.create! valid_attributes
delete :destroy, {:id => signature_collection.to_param}, valid_session
expect(response).to redirect_to(network_signature_collections_url)
end
end
end
@@ -1,5 +0,0 @@
require 'rails_helper'
RSpec.describe Network::SignatureCollection, type: :model do
pending "add some examples to (or delete) #{__FILE__}"
end
+1 -1
View File
@@ -1,6 +1,6 @@
require 'rails_helper' require 'rails_helper'
RSpec.describe "Greendays", type: :request do RSpec.describe "Greendays", pending: true, type: :request do
describe "GET /greendays" do describe "GET /greendays" do
it "works! (now write some real specs)" do it "works! (now write some real specs)" do
get greendays_path get greendays_path
@@ -1,10 +0,0 @@
require 'rails_helper'
RSpec.describe "Network::SignatureCollections", type: :request do
describe "GET /network_signature_collections" do
it "works! (now write some real specs)" do
get network_signature_collections_path
expect(response).to have_http_status(200)
end
end
end
+1 -1
View File
@@ -1,6 +1,6 @@
require 'rails_helper' require 'rails_helper'
RSpec.describe "greendays/edit", type: :view do RSpec.describe "greendays/edit", pending: true, type: :view do
before(:each) do before(:each) do
@greenday = assign(:greenday, Greenday.create!( @greenday = assign(:greenday, Greenday.create!(
:title => "MyString", :title => "MyString",
+1 -1
View File
@@ -1,6 +1,6 @@
require 'rails_helper' require 'rails_helper'
RSpec.describe 'greendays/index' do RSpec.describe 'greendays/index', pending: true do
before(:each) do before(:each) do
assign(:greendays, [ assign(:greendays, [
Greenday.create!( Greenday.create!(
+1 -1
View File
@@ -1,6 +1,6 @@
require 'rails_helper' require 'rails_helper'
RSpec.describe "greendays/new", type: :view do RSpec.describe "greendays/new", pending: true, type: :view do
before(:each) do before(:each) do
assign(:greenday, Greenday.new( assign(:greenday, Greenday.new(
:title => "MyString", :title => "MyString",
@@ -1,24 +0,0 @@
require 'rails_helper'
RSpec.describe "network/signature_collections/edit", type: :view do
before(:each) do
@network_signature_collection = assign(:network_signature_collection, Network::SignatureCollection.create!(
:location_name => "MyString",
:location_zip => 1,
:location_address => "MyString"
))
end
it "renders the edit network_signature_collection form" do
render
assert_select "form[action=?][method=?]", network_signature_collection_path(@network_signature_collection), "post" do
assert_select "input#network_signature_collection_location_name[name=?]", "network_signature_collection[location_name]"
assert_select "input#network_signature_collection_location_zip[name=?]", "network_signature_collection[location_zip]"
assert_select "input#network_signature_collection_location_address[name=?]", "network_signature_collection[location_address]"
end
end
end
@@ -1,25 +0,0 @@
require 'rails_helper'
RSpec.describe "network/signature_collections/index", type: :view do
before(:each) do
assign(:network_signature_collections, [
Network::SignatureCollection.create!(
:location_name => "Location Name",
:location_zip => 2,
:location_address => "Location Address"
),
Network::SignatureCollection.create!(
:location_name => "Location Name",
:location_zip => 2,
:location_address => "Location Address"
)
])
end
it "renders a list of network/signature_collections" do
render
assert_select "tr>td", :text => "Location Name".to_s, :count => 2
assert_select "tr>td", :text => 2.to_s, :count => 2
assert_select "tr>td", :text => "Location Address".to_s, :count => 2
end
end
@@ -1,24 +0,0 @@
require 'rails_helper'
RSpec.describe "network/signature_collections/new", type: :view do
before(:each) do
assign(:network_signature_collection, Network::SignatureCollection.new(
:location_name => "MyString",
:location_zip => 1,
:location_address => "MyString"
))
end
it "renders new network_signature_collection form" do
render
assert_select "form[action=?][method=?]", network_signature_collections_path, "post" do
assert_select "input#network_signature_collection_location_name[name=?]", "network_signature_collection[location_name]"
assert_select "input#network_signature_collection_location_zip[name=?]", "network_signature_collection[location_zip]"
assert_select "input#network_signature_collection_location_address[name=?]", "network_signature_collection[location_address]"
end
end
end
@@ -1,18 +0,0 @@
require 'rails_helper'
RSpec.describe "network/signature_collections/show", type: :view do
before(:each) do
@network_signature_collection = assign(:network_signature_collection, Network::SignatureCollection.create!(
:location_name => "Location Name",
:location_zip => 2,
:location_address => "Location Address"
))
end
it "renders attributes in <p>" do
render
expect(rendered).to match(/Location Name/)
expect(rendered).to match(/2/)
expect(rendered).to match(/Location Address/)
end
end