shoestrap 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,10 @@
1
1
  #Changelog
2
2
 
3
+ ## 0.0.3
4
+
5
+ * add simple_form locale (only :de)
6
+ * use simple-navigation for cms navbar
7
+
3
8
  ## 0.0.2
4
9
 
5
10
  * add cms generator and integrate with kuhsaft
@@ -30,8 +30,8 @@ module Shoestrap
30
30
  end
31
31
 
32
32
  def generate_nav_link
33
- inject_into_file 'app/views/kuhsaft/cms/admin/_main_navigation.html.haml', :after => 'kuhsaft.cms_pages_path' do
34
- "\n %li\n = link_to t(\'cms.#{real_table_name}\'), #{plural_table_name}_path"
33
+ inject_into_file 'config/cms_navigation.rb', :before => 'primary.dom_class = \'nav\'' do
34
+ "primary.item :#{real_table_name}, t('cms.#{real_table_name}'), #{plural_table_name}_path\n "
35
35
  end
36
36
  end
37
37
 
@@ -39,6 +39,7 @@ module Shoestrap
39
39
  copy_file 'bootstrap_and_overrides.css.sass', 'app/assets/stylesheets/bootstrap_and_overrides.css.sass'
40
40
  generate 'simple_form:install --bootstrap'
41
41
  remove_file 'lib/templates/haml/scaffold/_form.html.haml'
42
+ remove_file 'config/locales/simple_form.en.yml'
42
43
 
43
44
  inject_into_file 'config/application.rb', :after => "config.assets.version = '1.0'" do
44
45
  <<-eos.gsub(/^ {6}/, '').chomp
@@ -89,6 +90,7 @@ module Shoestrap
89
90
  rake 'kuhsaft:install:migrations'
90
91
  route 'mount Kuhsaft::Engine => "/"'
91
92
  copy_file 'kuhsaft.css.sass', 'app/assets/stylesheets/kuhsaft.css.sass'
93
+ copy_file 'cms_navigation.rb', 'config/cms_navigation.rb'
92
94
  inject_into_file 'app/assets/javascripts/application.js', "\n//= require 'kuhsaft/application'\n", :before => '//= require_tree .'
93
95
  empty_directory 'app/views/kuhsaft/cms/admin/'
94
96
  template '_main_navigation.html.haml.erb', 'app/views/kuhsaft/cms/admin/_main_navigation.html.haml'
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "shoestrap"
6
- s.version = '0.0.2'
6
+ s.version = '0.0.3'
7
7
  s.platform = Gem::Platform::RUBY
8
8
  s.authors = ["Immanuel Häussermann", "Felipe Kaufmann", "Phil Schilter", "Noëlle Rosenberg"]
9
9
  s.email = "info@screenconcept.ch"
@@ -18,6 +18,7 @@ gem 'haml'
18
18
  gem 'haml-rails'
19
19
  gem 'bootstrap-sass'
20
20
  gem 'simple_form'
21
+ gem 'simple-navigation'
21
22
  gem 'mail'
22
23
  gem 'fabrication'
23
24
  gem 'shoestrap'
@@ -1,7 +1,5 @@
1
1
  = link_to '<%= app_name %>', '#', :class => 'brand'
2
2
  %p.navbar-text.pull-right
3
3
  = link_to t('.logout'), kuhsaft.destroy_cms_admin_session_path, :method => :delete
4
- %ul.nav
5
- %li
6
- = link_to Kuhsaft::Page.model_name.human(:count => 2), kuhsaft.cms_pages_path
4
+ = render_navigation(:context => :cms)
7
5
 
@@ -0,0 +1,9 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Configures your navigation
3
+ SimpleNavigation::Configuration.run do |navigation|
4
+ navigation.items do |primary|
5
+ primary.item :pages, Kuhsaft::Page.model_name.human(:count => 2), kuhsaft.cms_pages_path
6
+ primary.dom_class = 'nav'
7
+ end
8
+ end
9
+
@@ -6,3 +6,29 @@ de:
6
6
  show: Anzeigen
7
7
  back: Zurück
8
8
  new: Neue
9
+
10
+ simple_form:
11
+ "yes": 'Ja'
12
+ "no": 'Nein'
13
+ required:
14
+ text: 'pflichtfeld'
15
+ mark: '*'
16
+ # You can uncomment the line below if you need to overwrite the whole required html.
17
+ # When using html, text and mark won't be used.
18
+ # html: '<abbr title="required">*</abbr>'
19
+ error_notification:
20
+ default_message: "Bitte beachten sie untenstehende Fehlermeldungen:"
21
+ # Labels and hints examples
22
+ # labels:
23
+ # defaults:
24
+ # password: 'Password'
25
+ # user:
26
+ # new:
27
+ # email: 'E-mail to sign in.'
28
+ # edit:
29
+ # email: 'E-mail.'
30
+ # hints:
31
+ # defaults:
32
+ # username: 'User name to sign in.'
33
+ # password: 'No special characters, please.'
34
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shoestrap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2013-01-23 00:00:00.000000000 Z
15
+ date: 2013-01-24 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: rspec
@@ -93,6 +93,7 @@ files:
93
93
  - templates/_main_navigation.html.haml.erb
94
94
  - templates/application.html.haml
95
95
  - templates/bootstrap_and_overrides.css.sass
96
+ - templates/cms_navigation.rb
96
97
  - templates/development_mail_interceptor.rb
97
98
  - templates/haml/scaffold/_form.html.haml
98
99
  - templates/haml/scaffold/edit.html.haml