how_to 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -1,6 +1,8 @@
1
1
  = HowTo
2
2
 
3
- Rails engine that makes managing faq/manual easy and simple.
3
+ Rails engine that makes managing faq/manual easy and simple. Multilingual CMS for managing faq, question/answer, manual etc.
4
+
5
+
4
6
 
5
7
  ===Usage
6
8
  ======Include the gem in your Gemfile and bundle to install the gem.
@@ -10,12 +12,31 @@ Rails engine that makes managing faq/manual easy and simple.
10
12
  ===== Install the migrations
11
13
  rake how_to:install:migrations
12
14
 
15
+ ===== Mount in your application's route
16
+ mount HowTo::Engine => "/how_to"
13
17
 
14
18
  ===== You can also get the configuration file and overrides by running the config generator.
15
19
  rails g how_to:config
16
20
 
17
21
  Details are documented in config file, so please read the config file carefully.
18
22
 
23
+ ====== rake db:migrate and visit mounted location, e.g.
24
+
25
+ localhost:3000/how_to
26
+
27
+ You should see the public page. You should also see two links on head section named sections and contents. if you override the authorization methods (described in later section) make sure you have permissions to access those pages.
28
+
29
+ ===Modules
30
+ Two models are there.
31
+
32
+ ==== Section
33
+ You can have multilevel section. You can consider this as category. Sections are hierarchical, but only leaves are eligible to have contents
34
+
35
+
36
+ ==== Content
37
+ You can create content as question/answer or faq under a specific section. If you love rich text editor for content then see the last section of Readme.
38
+
39
+
19
40
  ===== Sample helper methods you may need to define them in your application controller
20
41
 
21
42
  def authorize_to_manage_how_to! #you can set the method name in config file
@@ -25,4 +25,36 @@
25
25
  -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.15);
26
26
  -moz-box-shadow: 0 1px 2px rgba(0,0,0,.15);
27
27
  box-shadow: 0 1px 2px rgba(0,0,0,.15);
28
+ }
29
+
30
+ .text_field_overide {
31
+ outline: 0px !important;
32
+ border: 1px solid #cccccc !important;
33
+ background-color: white;
34
+ height: 20px !important;
35
+ width: 700px;
36
+ padding: 4px 6px;
37
+ margin-bottom: 10px;
38
+ font-size: 14px;
39
+ line-height: 20px;
40
+ color: #555555;
41
+ -webkit-border-radius: 4px;
42
+ -moz-border-radius: 4px;
43
+ border-radius: 4px;
44
+ vertical-align: middle;
45
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
46
+ -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
47
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
48
+ -webkit-transition: border linear 0.2s, box-shadow linear 0.2s;
49
+ -moz-transition: border linear 0.2s, box-shadow linear 0.2s;
50
+ -o-transition: border linear 0.2s, box-shadow linear 0.2s;
51
+ transition: border linear 0.2s, box-shadow linear 0.2s;
52
+ }
53
+
54
+ .text_title {
55
+ height: 20px !important;
56
+ }
57
+
58
+ .text_description {
59
+ height: 80px !important;
28
60
  }
@@ -39,12 +39,12 @@
39
39
  <%= f.label :title, "Title for #{locale}", :class => 'control-label' %>
40
40
  <div class="controls">
41
41
  <% if HowTo.config.rich_text_enabled %>
42
- <div target_id="<%= "content_i18n_#{locale.to_s}_title" %>" contenteditable="true" data-mercury="full">
42
+ <div target_id="<%= "content_i18n_#{locale.to_s}_title" %>" contenteditable="true" data-mercury="full" class="text_field_overide text_title">
43
43
  <%= raw f.object.send("i18n_#{locale.to_s}_title".to_sym) %>
44
44
  </div>
45
45
  <%= f.hidden_field "i18n_#{locale.to_s}_title", :class => 'text_field' %>
46
46
  <% else %>
47
- <%= f.text_field "i18n_#{locale.to_s}_title", :class => 'text_field' %>
47
+ <%= f.text_field "i18n_#{locale.to_s}_title", :class => 'text_field text_field_overide text_title' %>
48
48
  <% end %>
49
49
  </div>
50
50
  </div>
@@ -55,13 +55,13 @@
55
55
  <%= f.label :description, "Description for #{locale}", :class => 'control-label' %>
56
56
  <div class="controls">
57
57
  <% if HowTo.config.rich_text_enabled %>
58
- <div target_id="<%= "content_i18n_#{locale.to_s}_description" %>" contenteditable="true" data-mercury="full">
58
+ <div target_id="<%= "content_i18n_#{locale.to_s}_description" %>" contenteditable="true" data-mercury="full" class="text_field_overide text_description">
59
59
  <%= raw f.object.send("i18n_#{locale.to_s}_description".to_sym) %>
60
60
  </div>
61
61
 
62
62
  <%= f.hidden_field "i18n_#{locale.to_s}_description", :class => 'text_field' %>
63
63
  <% else %>
64
- <%= f.text_area "i18n_#{locale.to_s}_description", :class => 'text_field' %>
64
+ <%= f.text_area "i18n_#{locale.to_s}_description", :class => 'text_field text_field_overide text_description' %>
65
65
  <% end %>
66
66
  </div>
67
67
  </div>
@@ -1,3 +1,3 @@
1
1
  module HowTo
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -106644,3 +106644,4 @@ Served asset /how_to/chosen.jquery.min.js - 304 Not Modified (0ms)
106644
106644
 
106645
106645
  Started GET "/assets/how_to/application.js?body=1" for 127.0.0.1 at 2013-06-04 15:42:45 +0600
106646
106646
  Served asset /how_to/application.js - 304 Not Modified (0ms)
106647
+ Connecting to database specified by database.yml
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: how_to
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:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-06-04 00:00:00.000000000 Z
12
+ date: 2013-06-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails