tkh_content 0.1.7 → 0.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
| 
         @@ -15,13 +15,11 @@ class PagesController < ApplicationController 
     | 
|
| 
       15 
15 
     | 
    
         | 
| 
       16 
16 
     | 
    
         
             
              def new
         
     | 
| 
       17 
17 
     | 
    
         
             
                @page = Page.new
         
     | 
| 
       18 
     | 
    
         
            -
                page_autocomplete_items
         
     | 
| 
       19 
18 
     | 
    
         
             
                switch_to_admin_layout
         
     | 
| 
       20 
19 
     | 
    
         
             
              end
         
     | 
| 
       21 
20 
     | 
    
         | 
| 
       22 
21 
     | 
    
         
             
              def edit
         
     | 
| 
       23 
22 
     | 
    
         
             
                @page = Page.find(params[:id])
         
     | 
| 
       24 
     | 
    
         
            -
                page_autocomplete_items
         
     | 
| 
       25 
23 
     | 
    
         
             
                switch_to_admin_layout
         
     | 
| 
       26 
24 
     | 
    
         
             
              end
         
     | 
| 
       27 
25 
     | 
    
         | 
| 
         @@ -76,10 +74,4 @@ class PagesController < ApplicationController 
     | 
|
| 
       76 
74 
     | 
    
         
             
                redirect_to pages_path notice: "The blog status of the page has been changed"
         
     | 
| 
       77 
75 
     | 
    
         
             
              end
         
     | 
| 
       78 
76 
     | 
    
         | 
| 
       79 
     | 
    
         
            -
              private
         
     | 
| 
       80 
     | 
    
         
            -
              
         
     | 
| 
       81 
     | 
    
         
            -
              def page_autocomplete_items
         
     | 
| 
       82 
     | 
    
         
            -
                @autocomplete_items = Page.published.not_for_blog.by_title.map(&:title)
         
     | 
| 
       83 
     | 
    
         
            -
              end
         
     | 
| 
       84 
     | 
    
         
            -
              
         
     | 
| 
       85 
77 
     | 
    
         
             
            end
         
     | 
| 
         @@ -2,18 +2,17 @@ 
     | 
|
| 
       2 
2 
     | 
    
         
             
            	<%= f.error_notification %>
         
     | 
| 
       3 
3 
     | 
    
         | 
| 
       4 
4 
     | 
    
         
             
              <div class="form-inputs">
         
     | 
| 
       5 
     | 
    
         
            -
            		<%= f.input :title, hint: 'nice and descriptive'  
     | 
| 
       6 
     | 
    
         
            -
            		<%= f.input :for_blog  
     | 
| 
      
 5 
     | 
    
         
            +
            		<%= f.input :title, hint: 'nice and descriptive' %>
         
     | 
| 
      
 6 
     | 
    
         
            +
            		<%= f.input :for_blog %>
         
     | 
| 
       7 
7 
     | 
    
         
             
            		<%= f.input :tag_list, hint: 'space separated' %>
         
     | 
| 
       8 
     | 
    
         
            -
            		<%= f.input :short_title, hint: 'ideally one word only, used for the menu'  
     | 
| 
       9 
     | 
    
         
            -
            		<%# = javascript_tag "var autocomplete_items = #{ @autocomplete_items.to_json };" %>
         
     | 
| 
      
 8 
     | 
    
         
            +
            		<%= f.input :short_title, hint: 'ideally one word only, used for the menu' %>
         
     | 
| 
       10 
9 
     | 
    
         
             
            		<%= f.input :parent_page_title,
         
     | 
| 
       11 
10 
     | 
    
         
             
            								as: :string,
         
     | 
| 
       12 
11 
     | 
    
         
             
            								label: 'parent page title',
         
     | 
| 
       13 
12 
     | 
    
         
             
            								:input_html => { class: 'typeahead',
         
     | 
| 
       14 
13 
     | 
    
         
             
            																:data => { 	provide: 'typeahead',
         
     | 
| 
       15 
     | 
    
         
            -
            																	 					source:  
     | 
| 
       16 
     | 
    
         
            -
            																	}  
     | 
| 
      
 14 
     | 
    
         
            +
            																	 					source: Page.not_for_blog.by_title.map(&:title).to_json } 
         
     | 
| 
      
 15 
     | 
    
         
            +
            																	} %>
         
     | 
| 
       17 
16 
     | 
    
         
             
            	  <%= f.input :description, :input_html => { :rows => 3 } %>
         
     | 
| 
       18 
17 
     | 
    
         
             
            		<%= f.input :body, :input_html => { :rows => 25, :id => 'editable' } %>
         
     | 
| 
       19 
18 
     | 
    
         
             
            	</div>
         
     | 
    
        data/lib/tkh_content/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: tkh_content
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0.1. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.1.8
         
     | 
| 
       5 
5 
     | 
    
         
             
              prerelease: 
         
     | 
| 
       6 
6 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       7 
7 
     | 
    
         
             
            authors:
         
     | 
| 
         @@ -162,7 +162,6 @@ executables: [] 
     | 
|
| 
       162 
162 
     | 
    
         
             
            extensions: []
         
     | 
| 
       163 
163 
     | 
    
         
             
            extra_rdoc_files: []
         
     | 
| 
       164 
164 
     | 
    
         
             
            files:
         
     | 
| 
       165 
     | 
    
         
            -
            - app/assets/javascripts/page.js.coffee
         
     | 
| 
       166 
165 
     | 
    
         
             
            - app/controllers/blog_controller.rb
         
     | 
| 
       167 
166 
     | 
    
         
             
            - app/controllers/pages_controller.rb
         
     | 
| 
       168 
167 
     | 
    
         
             
            - app/helpers/blog_helper.rb
         
     | 
| 
         @@ -242,7 +241,7 @@ required_ruby_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       242 
241 
     | 
    
         
             
                  version: '0'
         
     | 
| 
       243 
242 
     | 
    
         
             
                  segments:
         
     | 
| 
       244 
243 
     | 
    
         
             
                  - 0
         
     | 
| 
       245 
     | 
    
         
            -
                  hash: - 
     | 
| 
      
 244 
     | 
    
         
            +
                  hash: -3856383533934555499
         
     | 
| 
       246 
245 
     | 
    
         
             
            required_rubygems_version: !ruby/object:Gem::Requirement
         
     | 
| 
       247 
246 
     | 
    
         
             
              none: false
         
     | 
| 
       248 
247 
     | 
    
         
             
              requirements:
         
     | 
| 
         @@ -251,7 +250,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       251 
250 
     | 
    
         
             
                  version: '0'
         
     | 
| 
       252 
251 
     | 
    
         
             
                  segments:
         
     | 
| 
       253 
252 
     | 
    
         
             
                  - 0
         
     | 
| 
       254 
     | 
    
         
            -
                  hash: - 
     | 
| 
      
 253 
     | 
    
         
            +
                  hash: -3856383533934555499
         
     | 
| 
       255 
254 
     | 
    
         
             
            requirements: []
         
     | 
| 
       256 
255 
     | 
    
         
             
            rubyforge_project: 
         
     | 
| 
       257 
256 
     | 
    
         
             
            rubygems_version: 1.8.23
         
     |