Author SHA1 Message Date
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 279 additions and 1120 deletions
+5 -12
View File
@@ -14,9 +14,6 @@ gem 'coffee-rails', '~> 4.1.0'
# Integrate Paperclip into Mongoid.
gem 'mongoid-paperclip'
# Adds support for multiparameter fields to mongoid 4.x series.
gem 'mongoid-sadstory'
# Markdown rendering
gem 'redcarpet'
@@ -32,7 +29,7 @@ gem 'paperclip-i18n'
# Amazon's S3 file hosting service
gem 'aws-sdk', '< 3.0' # see https://github.com/thoughtbot/paperclip/issues/2484
# A fixtures replacement
# A fixtures replacement
gem 'factory_girl'
# It's a small library to provide the Rails I18n translations on the JavaScript.
@@ -57,7 +54,7 @@ gem 'route_translator'
gem 'roadie-rails', '~> 1.0'
# Devise is a flexible authentication solution for Rails based on Warden.
gem 'devise'
gem 'devise'
# Translations for devise
gem 'devise-i18n'
@@ -95,7 +92,7 @@ group :development, :test do
gem 'byebug'
gem 'mongoid-rspec', '3.0.0'
gem 'rspec-rails', '~> 3.0'
gem 'pry-rails'
gem 'dotenv-rails'
end
@@ -103,17 +100,13 @@ end
group :development do
# A series of things you can use to benchmark a Rails or Ruby app.
gem 'derailed_benchmarks'
# To use all profiling methods available
gem 'stackprof'
# Access an IRB console on exception pages or by using <%= console %> in views
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
# gem 'spring'
end
+37 -46
View File
@@ -50,10 +50,6 @@ GEM
aws-sigv4 (1.0.2)
bcrypt (3.1.11)
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)
debug_inspector (>= 0.0.1)
bootstrap-sass (3.3.7)
@@ -81,7 +77,7 @@ GEM
execjs
coffee-script-source (1.12.2)
concurrent-ruby (1.0.5)
crass (1.0.2)
crass (1.0.4)
css_parser (1.6.0)
addressable
debug_inspector (0.0.3)
@@ -105,7 +101,6 @@ GEM
dotenv-rails (2.2.1)
dotenv (= 2.2.1)
railties (>= 3.2, < 5.2)
erubi (1.7.0)
erubis (2.7.0)
execjs (2.7.0)
factory_girl (4.8.1)
@@ -114,51 +109,52 @@ GEM
i18n (~> 0.5)
faraday (0.13.1)
multipart-post (>= 1.2, < 3)
ffi (1.9.18)
font-awesome-rails (4.7.0.2)
railties (>= 3.2, < 5.2)
ffi (1.9.25)
font-awesome-rails (4.7.0.4)
railties (>= 3.2, < 6.0)
geocoder (1.4.4)
get_process_mem (0.2.1)
globalid (0.4.0)
globalid (0.4.1)
activesupport (>= 4.2.0)
haml (5.0.3)
haml (5.0.4)
temple (>= 0.8.0)
tilt
heapy (0.1.3)
i18n (0.8.6)
i18n (0.9.5)
concurrent-ruby (~> 1.0)
i18n-js (3.0.1)
i18n (~> 0.6, >= 0.6.6)
jbuilder (2.7.0)
activesupport (>= 4.2.0)
multi_json (>= 1.2)
jmespath (1.3.1)
jquery-rails (4.3.1)
jquery-rails (4.3.3)
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
jquery-ui-rails (5.0.5)
railties (>= 3.2.16)
json (1.8.6)
kaminari (1.0.1)
kaminari (1.1.1)
activesupport (>= 4.1.0)
kaminari-actionview (= 1.0.1)
kaminari-activerecord (= 1.0.1)
kaminari-core (= 1.0.1)
kaminari-actionview (1.0.1)
kaminari-actionview (= 1.1.1)
kaminari-activerecord (= 1.1.1)
kaminari-core (= 1.1.1)
kaminari-actionview (1.1.1)
actionview
kaminari-core (= 1.0.1)
kaminari-activerecord (1.0.1)
kaminari-core (= 1.1.1)
kaminari-activerecord (1.1.1)
activerecord
kaminari-core (= 1.0.1)
kaminari-core (1.0.1)
kaminari-core (= 1.1.1)
kaminari-core (1.1.1)
kaminari-mongoid (1.0.1)
kaminari-core (~> 1.0)
mongoid
loofah (2.1.1)
loofah (2.2.2)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mail (2.6.6)
mime-types (>= 1.16, < 4)
mail (2.7.0)
mini_mime (>= 0.1.1)
memory_profiler (0.9.8)
method_source (0.9.0)
mime-types (3.1)
@@ -167,7 +163,7 @@ GEM
mimemagic (0.3.2)
mini_mime (0.1.4)
mini_portile2 (2.3.0)
minitest (5.10.3)
minitest (5.11.3)
mongo (2.4.3)
bson (>= 4.2.1, < 5.0.0)
mongoid (5.0.2)
@@ -185,19 +181,17 @@ GEM
mongoid (~> 5.0)
rake
rspec (~> 3.3)
mongoid-sadstory (0.0.2)
mongoid
mongoid_paranoia (0.2.1)
mongoid (>= 4)
mongoid-compatibility
multi_json (1.12.2)
multipart-post (2.0.0)
nested_form (0.3.2)
nokogiri (1.8.1)
nokogiri (1.8.5)
mini_portile2 (~> 2.3.0)
origin (2.3.1)
orm_adapter (0.5.0)
paperclip (5.1.0)
paperclip (5.2.0)
activemodel (>= 4.2.0)
activesupport (>= 4.2.0)
cocaine (~> 0.5.5)
@@ -211,7 +205,7 @@ GEM
pry (>= 0.10.4)
public_suffix (3.0.0)
puma (3.10.0)
rack (1.6.8)
rack (1.6.10)
rack-pjax (1.0.0)
nokogiri (~> 1.5)
rack (>= 1.1)
@@ -230,19 +224,19 @@ GEM
sprockets-rails
rails-deprecated_sanitizer (1.0.3)
activesupport (>= 4.2.0.alpha)
rails-dom-testing (1.0.8)
activesupport (>= 4.2.0.beta, < 5.0)
rails-dom-testing (1.0.9)
activesupport (>= 4.2.0, < 5.0)
nokogiri (~> 1.6)
rails-deprecated_sanitizer (>= 1.0.1)
rails-html-sanitizer (1.0.3)
loofah (~> 2.0)
rails-html-sanitizer (1.0.4)
loofah (~> 2.2, >= 2.2.2)
rails-i18n (4.0.9)
i18n (~> 0.7)
railties (~> 4.0)
rails_12factor (0.0.3)
rails_serve_static_assets
rails_stdout_logging
rails_admin (1.2.0)
rails_admin (1.3.0)
builder (~> 3.1)
coffee-rails (~> 4.0)
font-awesome-rails (>= 3.0, < 5)
@@ -262,13 +256,13 @@ GEM
activesupport (= 4.2.10)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (12.1.0)
rb-fsevent (0.10.2)
rake (12.3.1)
rb-fsevent (0.10.3)
rb-inotify (0.9.10)
ffi (>= 0.5.0, < 2)
rdoc (4.3.0)
redcarpet (3.4.0)
remotipart (1.3.1)
remotipart (1.4.2)
responders (2.4.0)
actionpack (>= 4.2.0, < 5.3)
railties (>= 4.2.0, < 5.3)
@@ -302,12 +296,12 @@ GEM
rspec-mocks (~> 3.6.0)
rspec-support (~> 3.6.0)
rspec-support (3.6.0)
sass (3.5.1)
sass (3.5.6)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
sass-rails (5.0.6)
sass-rails (5.0.7)
railties (>= 4.0.0, < 6)
sass (~> 3.1)
sprockets (>= 2.8, < 4.0)
@@ -328,7 +322,7 @@ GEM
actionpack (>= 3.1)
railties (>= 3.1)
slim (~> 3.0)
sprockets (3.7.1)
sprockets (3.7.2)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.2.1)
@@ -342,7 +336,7 @@ GEM
thor (0.20.0)
thread_safe (0.3.6)
tilt (2.0.8)
tzinfo (1.2.3)
tzinfo (1.2.5)
thread_safe (~> 0.1)
uglifier (3.2.0)
execjs (>= 0.3.0, < 3)
@@ -361,8 +355,6 @@ PLATFORMS
DEPENDENCIES
aws-sdk (< 3.0)
better_errors
binding_of_caller
bootstrap-sass (~> 3.3.5)
byebug
capybara
@@ -382,7 +374,6 @@ DEPENDENCIES
mongoid (~> 5.0.0)
mongoid-paperclip
mongoid-rspec (= 3.0.0)
mongoid-sadstory
mongoid_paranoia
paperclip-i18n
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

+21 -25
View File
@@ -22,7 +22,7 @@
@import "donations"
@import "nav"
*:focus
*:focus
outline: 0
-webkit-box-shadow: inset 0 2px 2px rgba(0, 0, 0, 0.075), 0 0 8px red
box-shadow: inset 0 2px 2px rgba(0, 0, 0, 0.075), 0 0 8px red
@@ -38,10 +38,6 @@
.alert-notice
@extend .alert-info
.form-inline > *
margin: 5px
body.admin
background: repeating-linear-gradient(45deg, yellow, yellow 50px, black 50px, black 100px)
@@ -55,7 +51,7 @@ body
padding: 20px
margin-top: 10px
background: #FFF
.anouncement
margin-top: 10px
@@ -68,38 +64,38 @@ body
h1
font-size: 20px
margin-top: 35px
.navbar
.container
padding-left: 0px
header > .row
margin-bottom: 12px
main > h1
margin-top: 0px
ul#topnav
font-size: 1.2em
li
text-transform: uppercase
ul
li
li
text-transform: none
li.active
border-bottom: 1px solid #66903F
.lead
font-weight: normal
#new_supporter
label.required
abbr
display: none
#counter
background-color: $brand-success
margin-top: 24px
@@ -107,7 +103,7 @@ body
border: 1px solid $brand-success
border-radius: 5px
color: white
.counter_char
background-color: white
width: 20px
@@ -118,7 +114,7 @@ body
display: inline-block
text-align: center
color: $brand-success
.text-success
color: $brand-success
@@ -126,18 +122,18 @@ body
display: block
float: left
margin: 12px
.table-inherit
width: inherit
footer
footer
h2
margin: 0px
font-size: $font-size-base
ol
ol
padding-left: 1em
.donation_button
height: 50px
background: $brand-success
@@ -153,10 +149,10 @@ body
left: -47px
box-shadow: inset 0px 0px 0px 4px rgba(255, 255, 255, 0.34)
a
a
color: #FFF
.row.fix
.row.fix
display: flex
flex-wrap: wrap
width: 100%
+8 -1
View File
@@ -14,4 +14,11 @@
font-size: 24px
margin: 15px
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
end
def only_admin
return true if current_supporter && current_supporter.admin?
raise ActionController::RoutingError, 'Not Found'
end
protected
def configure_permitted_parameters
+4 -4
View File
@@ -7,15 +7,15 @@ class ChargesController < ApplicationController
begin
@amount = Float(@amount).round(2)
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
return
end
@amount = (@amount * 100).to_i # Must be an integer!
if @amount < 500
flash[:error] = 'Ihre Spende muss mindestens 5.- CHF betragen.'
if @amount < 1000
flash[:danger] = 'Ihre Spende muss mindestens 10.- CHF betragen.'
redirect_to donation_path
return
end
@@ -23,7 +23,7 @@ class ChargesController < ApplicationController
Stripe::Charge.create(amount: @amount, currency: 'CHF', source: params[:stripeToken], description: 'Initiativspende')
rescue Stripe::CardError => e
flash[:error] = e.message
flash[:danger] = e.message
redirect_to donation_path
end
end
+5
View File
@@ -57,4 +57,9 @@ class GreendaysController < ApplicationController
def greenday_params
params.require(:greenday).permit(:title, :address, :homepage, :description, :logo, :delete_logo)
end
def only_admin
return true if current_supporter && current_supporter.admin?
raise ActionController::RoutingError, 'Not Found'
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.password = random_password = SecureRandom.hex(5)
if !input_to_fast? && @supporter.save
SupporterMailer.welcome_email(@supporter, random_password).deliver_now
# SupporterMailer.welcome_email(@supporter, random_password).deliver_now
sendy_registraion
redirect_to thanks_path
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
+14 -16
View File
@@ -1,7 +1,7 @@
doctype html
doctype html
html lang="#{I18n.locale}"
head
title
title
- flash.each do |type, message|
= message
| #CH420 - #{content_for(:title)}
@@ -31,7 +31,7 @@ html lang="#{I18n.locale}"
meta content="#ffffff" name="theme-color" /
meta property="og:title" content="#{content_for(:title)}"
meta property="og:description" content="#{t('shared.description')}"
meta property="og:description" content="#{t('shared.description')}"
meta property="og:image" content="#{image_url('ch420_logo.png')}"
meta name="twitter:title" content="#{content_for(:title)}"
@@ -41,7 +41,6 @@ html lang="#{I18n.locale}"
meta name="twitter:image:alt" content="#{t('shared.header.logo')}"
body class="#{'admin' if controller.admin_area}"
= render 'donation_button'
javascript:
(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),
@@ -52,9 +51,10 @@ html lang="#{I18n.locale}"
ga('send', 'pageview');
.container.anouncement
/.text-center.lead.alert.alert-success
a href="https://wemakeit.com/projects/cannabislegalisierungs-crowd" class="text-success"
= t('shared.crowdfunding')
| Für das Projekt Initiative ist Ende Januar ein neuer Träger­verein gegründet worden.
br
| Weitere Informationen dazu werden folgen.
nav.languages.pull-right
h2.sr-only =t('shared.lang')
a href='/' lang='de'
@@ -65,7 +65,7 @@ html lang="#{I18n.locale}"
| &nbsp; | &nbsp;
a href='/fr' lang='fr'
| Français
.container.content
= render 'shared/flashes'
= render 'shared/header'
@@ -76,13 +76,11 @@ html lang="#{I18n.locale}"
main= yield
hr
footer.row
.col-xs-12.col-sm-6
= render 'core_statements'
.col-xs-12.col-sm-4
= render 'contact'
.col-xs-12.col-sm-2
= render 'address'
/.col-xs-12.col-sm-6
/= render 'core_statements'
.col-xs-12
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.
javascript:
I18n.defaultLocale = "#{I18n.default_locale}";
I18n.locale = "#{I18n.locale}";
I18n.locale = "#{I18n.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!
+29 -46
View File
@@ -14,72 +14,54 @@ javascript:
$('form').submit();
}
});
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
= form_tag charges_path do
= hidden_field_tag(:stripeToken)
- if flash[:error].present?
#error_explanation.text-danger
= flash[:error]
#error_explanation.text-danger.hidden
= flash[:error] if flash[:error].present?
.row
.col-xs12.col-md-5
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(100)" 100 .-
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
.form-group
strong oder einen eigenen Betrag
.form-group
.input-group
.input-group-addon CHF
= text_field_tag(:amount, 50 , class: 'form-control')
.form-group
= text_field_tag(:amount, 100 , class: 'form-control')
.form-group
button#donateButton.btn.btn-success Spenden übermitteln
h2 Mit Bitcoin und Bitcoin Cash spenden
h2 Mit Bitcoin, Bitcoin Cash oder Ethereum spenden
.row
.col-md-6.col-xs-12
p
p
= image_tag '1LaYbTiCjhrUhxrQ9D5BQUfxPmRqJ7Q3gG.png', alt: 'Bitcoin Adresse: 1LaYbTiCjhrUhxrQ9D5BQUfxPmRqJ7Q3gG', width: '150', class: 'pull-right'
div
| Gerne nehmen wir auch Spenden via Bitcoin unter folgender Adresse entgegen:
br
strong 1LaYbTiCjhrUhxrQ9D5BQUfxPmRqJ7Q3gG
.col-md-6.col-xs-12
p
= image_tag '1LVGcneFcYqCkhDFNsnhWb6x7cCHHxakg9.png', alt: 'Bitcoin Cash Adresse: 1LVGcneFcYqCkhDFNsnhWb6x7cCHHxakg9', width: '150', class: 'pull-right'
div
| Oder Bitcoin Cash unter folgender Adresse:
span.crypto_address 1LaYbTiCjhrUhxrQ9D5BQUfxPmRqJ7Q3gG
br
strong 1LVGcneFcYqCkhDFNsnhWb6x7cCHHxakg9
| oder Bitcoin Cash:
br
i.crypto_address 1LVGcneFcYqCkhDFNsnhWb6x7cCHHxakg9
.col-md-6.col-xs-12
p
= image_tag 'ethereum_address.png', alt: 'Ethereum Adresse: 0x8747d7F53FdaCD01bb269757E2bdd885B3033A45', width: '150', class: 'pull-right crypto_address'
div
| Gerne nehmen wir auch Spenden via Ethereum unter folgender Adresse entgegen:
br
span.crypto_address 0x8747d7F53FdaCD01bb269757E2bdd885B3033A45
.clearfix
h2 Per Überweisung spenden
@@ -87,19 +69,18 @@ h2 Per Überweisung spenden
.col-md-7.col-xs-12
dl.dl-horizontal
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:
dd CH02 0900 0000 8709 1354 3
dd CH02 0900 0000 8709 1354 3
dt Zahlungszweck:
dd Spende Initiative
.col-md-5.col-xs-12
= link_to asset_path('Einzahlungsschein_Spende_Initiative.pdf') do
= image_tag('Einzahlungsschein_Spende_Initiative.jpg', class:'img-responsive', alt: 'Einzahlungsschein Spende initiative')
p
b Wir würden uns freuen, wenn ihr das macht und uns finanziell unter die Arme greift.
p Danke, dein Verein Legalize it!
javascript:
@@ -121,10 +102,12 @@ javascript:
amount = parseFloat(amount);
if (isNaN(amount)) {
$('#error_explanation').toggleClass('hidden')
$('#error_explanation').html('<p>Bitte geben sie einen Betrag in CHF ein.</p>');
}
else if (amount < 5.00) {
$('#error_explanation').html('<p>Ihre Spende muss mindestens 5.- CHF betragen.</p>');
else if (amount < 10.00) {
$('#error_explanation').toggleClass('hidden')
$('#error_explanation').html('<p>Ihre Spende muss mindestens 10.- CHF betragen.</p>');
}
else {
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'
+2 -41
View File
@@ -1,43 +1,4 @@
h1
= title t('.title')
| Du bist nun ein Teil der Bewegung!
h2 Wie sieht das weitere Vorgehen aus?
h1 = title t('.title')
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
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
+2 -4
View File
@@ -1,9 +1,7 @@
header
.row
.col-md-1.col-xs-4
= image_tag('ch420_logo.png', class:'img-responsive pagelogo', alt: t('.logo'))
.col-md-7.col-xs-8
.col-xs-8
h1
= t('.title_html')
.col-xs-12.col-md-4.hidden-xs.hidden-sm
= render 'shared/counter'
= render 'shared/counter'
+62 -58
View File
@@ -1,61 +1,65 @@
= simple_form_for @supporter do |f|
= f.input :first_name, placeholder: t('.placeholders.first_name')
= f.input :last_name, placeholder: t('.placeholders.last_name')
= f.input :street, placeholder: t('.placeholders.street')
= f.input :city, placeholder: t('.placeholders.city')
= f.input :zip, placeholder: t('.placeholders.zip')
= f.input :email, placeholder: t('.placeholders.email')
= f.input :tel, placeholder: '+41 (0) xxxx'
= f.input :support, as: :radio_buttons, collection: t('support_type').map{ |x| [x.first, raw(x.last)]}, label_method: :last, value_method: :first
= f.input :li_membership, as: :boolean
= f.input :age_category, as: :radio_buttons, collection: t('age_category'), label_method: :last, value_method: :first
= f.input :comments, as: :text
.form-group
= f.submit value: t('.submit'), class: 'btn btn-success'
.form-group
= link_to t('.terms_and_conditions'), terms_and_conditions_path, class: 'small'
- 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 :last_name, placeholder: t('.placeholders.last_name')
= f.input :street, placeholder: t('.placeholders.street')
= f.input :city, placeholder: t('.placeholders.city')
= f.input :zip, placeholder: t('.placeholders.zip')
= f.input :email, placeholder: t('.placeholders.email')
= f.input :tel, placeholder: '+41 (0) xxxx'
= f.input :support, as: :radio_buttons, collection: t('support_type').map{ |x| [x.first, raw(x.last)]}, label_method: :last, value_method: :first
= f.input :li_membership, as: :boolean
= f.input :age_category, as: :radio_buttons, collection: t('age_category'), label_method: :last, value_method: :first
= f.input :comments, as: :text
.form-group
= f.submit value: t('.submit'), class: 'btn btn-success'
.form-group
= link_to t('.terms_and_conditions'), terms_and_conditions_path, class: 'small'
javascript:
var cities = new Bloodhound({
datumTokenizer: Bloodhound.tokenizers.whitespace,
queryTokenizer: Bloodhound.tokenizers.whitespace,
remote: {
url: '/cities_autocomplete.json?query=%QUERY',
wildcard: '%QUERY',
}
});
var suggestion_template = function (data) {
return '<p>' + data.plz + ' - ' + data.city + '</p>';
}
$('#supporter_city').typeahead({
minLength: 2,
},{
limit: 20,
display: 'city',
templates: {
suggestion: function (data) {
return suggestion_template(data);
}
},
source: cities
}).on('typeahead:selected', function(event, datum) {
$("#supporter_zip").val(datum.plz);
});
$('#supporter_zip').typeahead({
minLength: 2,
},{
limit: 20,
display: 'plz',
templates: {
suggestion: function (data) {
return suggestion_template(data);
javascript:
var cities = new Bloodhound({
datumTokenizer: Bloodhound.tokenizers.whitespace,
queryTokenizer: Bloodhound.tokenizers.whitespace,
remote: {
url: '/cities_autocomplete.json?query=%QUERY',
wildcard: '%QUERY',
}
});
var suggestion_template = function (data) {
return '<p>' + data.plz + ' - ' + data.city + '</p>';
}
},
source: cities
}).on('typeahead:selected', function(event, datum) {
$("#supporter_city").val(datum.city);
});
$('#supporter_city').typeahead({
minLength: 2,
},{
limit: 20,
display: 'city',
templates: {
suggestion: function (data) {
return suggestion_template(data);
}
},
source: cities
}).on('typeahead:selected', function(event, datum) {
$("#supporter_zip").val(datum.plz);
});
$('#supporter_zip').typeahead({
minLength: 2,
},{
limit: 20,
display: 'plz',
templates: {
suggestion: function (data) {
return suggestion_template(data);
}
},
source: cities
}).on('typeahead:selected', function(event, datum) {
$("#supporter_city").val(datum.city);
});
-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.
+5 -14
View File
@@ -1,11 +1,11 @@
- if supporter_signed_in?
h1.sr-only = title t('.title', name: current_supporter.first_name)
.row
.col-xs-12.col-md-7
.col-xs-12
.panel.panel-default
.panel-heading
h2.panel-title = t '.my_data'
.panel-body
.panel-body
dl.dl-horizontal
dt = Supporter.human_attribute_name(:email)
dd = current_supporter.email
@@ -25,20 +25,11 @@
dd = t("languages.#{current_supporter.language}")
dt = Supporter.human_attribute_name(:tel)
dd = current_supporter.tel
p
= link_to t('.edit'), edit_supporter_registration_path(), class: 'pull-right'
= render 'publicity'
aside.col-md-5.col-xs-12
= render 'right_side'
- else
- title(t('shared.header.title_html'))
.row
.col-xs-12.col-md-7
h2.sr-only = t('.form')
= render 'form'
aside.col-md-5.col-xs-12
= render 'right_side'
= render 'form'
+6 -1
View File
@@ -1,7 +1,6 @@
---
title: '#CH420 Statistiken Onlineforumlar'
author: "Markus Graf"
date: "23. April 2016"
output: html_document
---
@@ -28,4 +27,10 @@ pielabels<- paste(percentlabels, "%", sep="")
cols <- rainbow(4)
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)
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 -1
View File
@@ -52,5 +52,5 @@ Rails.application.configure do
access_key_id: ENV["S3_ACCESS_KEY"],
secret_access_key: ENV["S3_ACCESS_SECRET"]
}
}
}
end
+14 -32
View File
@@ -19,38 +19,34 @@ de:
numbers: Zahlen
statements: Statements
collection_concept: Wie macht man eine Volksinitiative?
network: Netzwerk
signature_collections: Unterschriftensammlung
lang: Sprache
are_you_sure: Bist du sicher?
edit: Bearbeiten
show: Anzeigen
destroy: Löschen
save: Speichern
description: Volksinitiative zur Legalisierung von Cannabis in der Schweiz.
counter:
supporters: "Unterstützer:"
amount_of_supporters: Zurzeit haben wir %{amount} Unterstützer.
amount_of_supporters: Zurzeit haben wir %{amount} Unterstützer.
input_error: Deine Eingaben konnte nicht gespeichert werden. Überprüfe deine Eingaben.
donation: Deine Spende
welcome_email:
subject: Besten Dank für deine Unterstützung!
support_type:
signer: Ich würde eine Volksinitiative für die <span class="text-success">Legalisierung von Cannabis</span> unterschreiben.
supporter: Ich würde eine Volksinitiative für die <span class="text-success">Legalisierung von Cannabis</span> unterschreiben und helfe aktiv Unterschriften in meiner Umgebung zu sammeln.
# activist: Ich unterschreibe eine Volksinitiative für die <span class="text-success">Legalisierung von Cannabis</span> und beteilige mich bei der Planung und Koordination einer Volksinitiative.
# nonvoting_supporter: Ich bin nicht stimmberechtigt, helfe aber aktiv Unterschriften in meiner Umgebung zu sammeln um <span class="text-success">Cannabis zu legalisierung</span>.
age_category:
underage: Ich bin jünger als 18 Jahre alt
young: Ich bin 18 bis 30 Jahre alt
middle: Ich bin 30 bis 64 Jahre alt
retired: Ich bin über 64 Jahre alt
publicity_states:
pending: Die Veröffentlichung wurde noch nicht genehmigt
approved: Das Statement wurde Veröffentlicht
@@ -60,7 +56,7 @@ de:
de: Deutsch
fr: Français
it: Italiano
supporters:
form:
form: Formular
@@ -80,15 +76,15 @@ de:
renew: Statement neu einreichen
delete: Statement löschen
create_publicity: Deine Meinung zählt, darum bitten wir dir hier die Möglichkeit öffentlich deine Meinung zur Cannabis-Initiative kundzutun. Gib ein Starkes Statement ab und zeig dein Gesicht! Meine Unterstützung öffentlich kundtun ...
create:
timeout: Ihre Eingabe war zu schnell.
new:
title: Hallo %{name}
edit: Meine Daten bearbeiten
my_data: Meine Daten
publicities:
form:
title: Meine Meinung zur Cannabis-Initiative veröffentlichen
@@ -96,7 +92,7 @@ de:
organisation_placeholder: Parteizugehörigkeit, Verband oder sonstige Organisationen
avatar: Lade ein Bild von dir Hoch
save: Zur Überprüfung einsenden
create:
success: Besten Dank die Daten werden überprüft.
update:
@@ -104,22 +100,16 @@ de:
pages:
show:
not_found: Die Seite konnte nicht gefunden werden.
not_found: Die Seite konnte nicht gefunden werden.
thanks:
title: Besten Dank für deine Unterstützung!
statements:
title: Statements von unseren Unterstützern
submit_your_own_statement: Veröffentliche dein eigenes Statement...
read_more: das ganze Statement lesen.
network:
signature_collections:
index:
new: Neue Sammlung erfasssen
title: Unterschriftensammlungen
search: Suche
location: Ort
routes:
initiative_text: initiativtext
arguments: argumentarium
@@ -130,8 +120,6 @@ de:
statementes: statements
collection_concept: Sammelkonzept
greendays: greensaturday
network: netzwerk
signature_collections: unterschriftensammlung
mongoid:
models:
@@ -158,10 +146,4 @@ de:
state: Status
organisation: Organisation
statement: Statement
avatar: Bild
network/signature_collection:
location_name: Ort
location_zip: Postleitzahl
location_address: Adresse
event_date_start: Startzeit
event_date_end: Endzeit
avatar: Bild
-4
View File
@@ -24,8 +24,6 @@ fr:
statements: Déclarations
collection_concept: Comment faire une initiative populaire? (en allemand)
my_account: Mon compte
network: Réseau
signature_collections: Collection des signatures
lang: Langue
are_you_sure: Tu es sûre?
@@ -119,8 +117,6 @@ fr:
statements: declarations
collection_concept: plan_de_collecte
greendays: greensaturday
network: reseau
signature_collections: collection_signature
mongoid:
models:
+1 -5
View File
@@ -21,9 +21,7 @@ it:
statements: Dichiarazioni
collection_concept: Come fare un iniziativa popolare? (in tedesco)
my_account: Il mio account
network: Reticolato
signature_collections: collezione di firme
counter:
supporters: "Sostenitore:"
amount_of_supporters: Al momento abbiamo %{amount} sostenitori.
@@ -123,8 +121,6 @@ it:
statements: dichiarazioni
collection_concept: sistema_di_raccolta
greendays: greensaturday
network: reticolato
signature_collections: collezione_firme
mongoid:
attributes:
+12 -29
View File
@@ -6,7 +6,7 @@ SimpleNavigation::Configuration.run do |navigation|
# The renderer can also be specified as option in the render_navigation call.
# navigation.renderer = Your::Custom::Renderer
# Specify the class that will be applied to active navigation items. Defaults to 'selected'
# Specify the class that will be applied to active navigation items. Defaults to 'selected'
#navigation.selected_class = 'selected'
# Specify the class that will be applied to the current leaf of
@@ -28,12 +28,12 @@ SimpleNavigation::Configuration.run do |navigation|
# Specify if the auto highlight feature is turned on (globally, for the whole navigation). Defaults to true
#navigation.auto_highlight = true
# Specifies whether auto highlight should ignore query params and/or anchors when
# comparing the navigation items with the current URL. Defaults to true
# Specifies whether auto highlight should ignore query params and/or anchors when
# comparing the navigation items with the current URL. Defaults to true
#navigation.ignore_query_params_on_auto_highlight = true
#navigation.ignore_anchors_on_auto_highlight = true
# If this option is set to true, all item names will be considered as safe (passed through html_safe). Defaults to false.
#navigation.consider_item_names_as_safe = false
@@ -56,41 +56,24 @@ SimpleNavigation::Configuration.run do |navigation|
# when the item should be highlighted, you can set a regexp which is matched
# 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?
primary.item :home, I18n.t('.shared.topnavigation.support'), "/#{I18n.locale}"
end
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'}
# primary.item :initiative, I18n.t('.shared.topnavigation.initiative'), initiative_text_path
primary.item :archivb, "Archiv", '/pages/archiv'
if supporter_signed_in?
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 :sign_out, I18n.t('.shared.topnavigation.sign_out'), destroy_supporter_session_path, link_html: { 'data-method' => :delete }
end
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
end
end
+5 -17
View File
@@ -1,7 +1,6 @@
Rails.application.routes.draw do
devise_for :supporters
root to: 'supporters#new'
root to: 'supporters#new'
get "/pages/:page" => "pages#show"
@@ -12,21 +11,10 @@ Rails.application.routes.draw do
end
localized do
get 'network', to: 'pages#show', as: :network, page: 'network'
namespace :network do
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'
#resources :greendays
#get '/initiative_text', to: 'pages#show', as: :initiative_text, page: 'initiative_text'
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 '/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'
#get '/donation', to: 'pages#show', as: :donation, page: 'donation'
end
get '/cities_autocomplete', to: 'cities_autocomplete#index', as: :cities_autocomplete
@@ -35,7 +23,7 @@ Rails.application.routes.draw do
resources :supporters, only: [:new, :create]
resource :publicity
get '/thanks', to: 'pages#thanks', as: :thanks
resources :charges
resources :charges
end
mount RailsAdmin::Engine => '/admin', as: 'rails_admin'
-8
View File
@@ -5,11 +5,3 @@
#
# cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
# 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'
RSpec.describe "Greendays", type: :request do
RSpec.describe "Greendays", pending: true, type: :request do
describe "GET /greendays" do
it "works! (now write some real specs)" do
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'
RSpec.describe "greendays/edit", type: :view do
RSpec.describe "greendays/edit", pending: true, type: :view do
before(:each) do
@greenday = assign(:greenday, Greenday.create!(
:title => "MyString",
+1 -1
View File
@@ -1,6 +1,6 @@
require 'rails_helper'
RSpec.describe 'greendays/index' do
RSpec.describe 'greendays/index', pending: true do
before(:each) do
assign(:greendays, [
Greenday.create!(
+1 -1
View File
@@ -1,6 +1,6 @@
require 'rails_helper'
RSpec.describe "greendays/new", type: :view do
RSpec.describe "greendays/new", pending: true, type: :view do
before(:each) do
assign(:greenday, Greenday.new(
: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