cmstyle 0.0.17 → 0.0.18
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/cmstyle/navigation_helpers.rb +2 -2
- data/lib/cmstyle/version.rb +1 -1
- data/lib/tasks/setup.rake +32 -0
- metadata +34 -35
@@ -73,7 +73,7 @@ module CMStyle
|
|
73
73
|
buffer = "<div class=\"navbar navbar-fixed-top\">\n"
|
74
74
|
buffer << " <div class=\"navbar-inner\">\n"
|
75
75
|
buffer << " <div class=\"container-fluid\">\n"
|
76
|
-
buffer << " <a href=\"
|
76
|
+
buffer << " <a href=\"#{root_path}\" class=\"brand\" style=\"font-weight:400;\">#{APPLICATION_NAME}</a>\n"
|
77
77
|
buffer << " <button type=\"button\" class=\"btn btn-navbar\" data-toggle=\"collapse\" data-target=\".nav-collapse\">\n"
|
78
78
|
buffer << " <span class=\"icon-bar\"></span>\n"
|
79
79
|
buffer << " <span class=\"icon-bar\"></span>\n"
|
@@ -123,7 +123,7 @@ module CMStyle
|
|
123
123
|
# build navigation (tabs, pills)
|
124
124
|
#
|
125
125
|
# <b>mandatory arguments</b>
|
126
|
-
# * definiton_array => array of hash entries of the form {:id => :first, :titel => 'nav1', :href => '#', :tooltip => 'This is nav1 tooltip', :class => nil , :icon => 'icon-user', :sub => {} }
|
126
|
+
# * definiton_array => array of hash entries of the form {:id => :first, :titel => 'nav1', :href => '#', :tooltip => 'This is nav1 tooltip', :class => nil , :icon => 'icon-user', :sub => [{},{}] }
|
127
127
|
# <b>optional arguments</b>
|
128
128
|
# * active_id => id of active navigation entry which should be highlighted
|
129
129
|
# * class => "nav nav-tabs" for tabbed navigation or "nav nav-pills" for pilled navigation
|
data/lib/cmstyle/version.rb
CHANGED
@@ -0,0 +1,32 @@
|
|
1
|
+
namespace :cmstyle do
|
2
|
+
desc "Setup CmStyle"
|
3
|
+
task :setup do
|
4
|
+
|
5
|
+
puts "Setting up CmStyle for your Project..."
|
6
|
+
|
7
|
+
#source paths
|
8
|
+
source_view_files = Dir.glob(Gem.loaded_specs["cmstyle"].full_gem_path + "/lib/app/views/layouts/*")
|
9
|
+
source_image_files = Dir.glob(Gem.loaded_specs["cmstyle"].full_gem_path + "/lib/app/assets/images/*")
|
10
|
+
|
11
|
+
source_application_js = Gem.loaded_specs["cmstyle"].full_gem_path + "/lib/app/assets/javascripts/application.js"
|
12
|
+
source_application_css = Gem.loaded_specs["cmstyle"].full_gem_path + "/lib/app/assets/stylesheets/application.css"
|
13
|
+
|
14
|
+
#target paths
|
15
|
+
target_view_path = Rails.root + "app/views/layouts/"
|
16
|
+
target_js_path = Rails.root + "app/assets/javascripts/"
|
17
|
+
target_css_path = Rails.root + "app/assets/stylesheets/"
|
18
|
+
target_image_path = Rails.root + "app/assets/images/"
|
19
|
+
|
20
|
+
puts "Copying layout view files to app/views/layouts"
|
21
|
+
FileUtils.cp_r source_view_files, target_view_path
|
22
|
+
puts "Copying application.js to app/assets/javascripts"
|
23
|
+
FileUtils.cp_r source_application_js, target_js_path
|
24
|
+
puts "Copying application.css to app/assets/stylesheets"
|
25
|
+
FileUtils.cp_r source_application_css, target_css_path
|
26
|
+
puts "Copying images to app/assets/images"
|
27
|
+
FileUtils.cp_r source_image_files, target_image_path
|
28
|
+
puts "Done."
|
29
|
+
puts ""
|
30
|
+
puts "NOTE: don't forget to add APPLICATION_MENU, APPLICATION_NAME and APPLICATION_DATABASE to application.rb initializer to get the header and footer working properly."
|
31
|
+
end
|
32
|
+
end
|
metadata
CHANGED
@@ -1,38 +1,40 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: cmstyle
|
3
|
-
version: !ruby/object:Gem::Version
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.18
|
4
5
|
prerelease:
|
5
|
-
version: 0.0.17
|
6
6
|
platform: ruby
|
7
|
-
authors:
|
7
|
+
authors:
|
8
8
|
- Thomas Steiner
|
9
|
+
- Patrick Kaddu
|
9
10
|
autorequire:
|
10
11
|
bindir: bin
|
11
12
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
- !ruby/object:Gem::Dependency
|
13
|
+
date: 2013-01-17 00:00:00.000000000 Z
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
16
|
name: json
|
17
|
-
|
18
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
17
|
+
requirement: !ruby/object:Gem::Requirement
|
19
18
|
none: false
|
20
|
-
requirements:
|
21
|
-
- -
|
22
|
-
- !ruby/object:Gem::Version
|
23
|
-
version:
|
19
|
+
requirements:
|
20
|
+
- - ! '>='
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '0'
|
24
23
|
type: :development
|
25
|
-
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
none: false
|
27
|
+
requirements:
|
28
|
+
- - ! '>='
|
29
|
+
- !ruby/object:Gem::Version
|
30
|
+
version: '0'
|
26
31
|
description: CM specific styles
|
27
|
-
email:
|
32
|
+
email:
|
28
33
|
- thomas.steiner@ikey.ch
|
29
34
|
executables: []
|
30
|
-
|
31
35
|
extensions: []
|
32
|
-
|
33
36
|
extra_rdoc_files: []
|
34
|
-
|
35
|
-
files:
|
37
|
+
files:
|
36
38
|
- lib/app/assets/images/cm_app.ico
|
37
39
|
- lib/app/assets/images/cm_app.png
|
38
40
|
- lib/app/assets/images/cm_app_30x30.png
|
@@ -56,32 +58,29 @@ files:
|
|
56
58
|
- lib/cmstyle.rb
|
57
59
|
- lib/tasks/cleanup.rake
|
58
60
|
- lib/tasks/install.rake
|
61
|
+
- lib/tasks/setup.rake
|
59
62
|
homepage: http://github.com/thomis/cmstyle
|
60
63
|
licenses: []
|
61
|
-
|
62
64
|
post_install_message:
|
63
65
|
rdoc_options: []
|
64
|
-
|
65
|
-
require_paths:
|
66
|
+
require_paths:
|
66
67
|
- lib
|
67
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
68
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
68
69
|
none: false
|
69
|
-
requirements:
|
70
|
-
- -
|
71
|
-
- !ruby/object:Gem::Version
|
72
|
-
version:
|
73
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
70
|
+
requirements:
|
71
|
+
- - ! '>='
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
version: '0'
|
74
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
74
75
|
none: false
|
75
|
-
requirements:
|
76
|
-
- -
|
77
|
-
- !ruby/object:Gem::Version
|
78
|
-
version:
|
76
|
+
requirements:
|
77
|
+
- - ! '>='
|
78
|
+
- !ruby/object:Gem::Version
|
79
|
+
version: '0'
|
79
80
|
requirements: []
|
80
|
-
|
81
81
|
rubyforge_project:
|
82
82
|
rubygems_version: 1.8.24
|
83
83
|
signing_key:
|
84
84
|
specification_version: 3
|
85
85
|
summary: CM specific styles
|
86
86
|
test_files: []
|
87
|
-
|