dhatu 0.1.23 → 0.1.24

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 24065cc8a1cebfc4fdf42546f5a1f2c9b7be6fa1e04ee9f58ff61d7f913ba9c8
4
- data.tar.gz: 8914e1a60b9d33a86dfbc38a1618c61fff0cc9fee61e7aa4ea3d95a8699f5e4e
3
+ metadata.gz: 0062d1f5401183ec441d6b9c1e8ee9f8f3dfc98d12a56c4b9f2de55264526574
4
+ data.tar.gz: 7296b4b1ee4e9164c166ea38d339a07c8d86107152aa527e365a4183758797dd
5
5
  SHA512:
6
- metadata.gz: ec26f5027eabf1d3c5b72a063c7ea46a8d3d51728377e2ede4ad96b4bb4ff4bdbef3ef9001cdcd7609cfeeadda0de413b2c1d2a25d6fd9b383512e4a6d42ce50
7
- data.tar.gz: e823a72be6dd1ef8b2d4b6966bcbd949aa86b31045155027bafebd2cac985725fd2a6c95d16fe4796f693c42af76eb3d89dbd9bb4c200857fddd57f9ed0dbca6
6
+ metadata.gz: f443caeb5d1cb12bc0db74a25af8a2708c278d0d9537d89629c48f86500a6f173a623ae35fc01ebc914ab73fa39026e728a8688b55480f2d1340e43eb49c498c
7
+ data.tar.gz: e5717a63115cb3bf926d887106ef74e66b7818c037a558a4cdd5815deb83c7b24dfbe63648214792807a221bfbdbde629b3a7b4f103f5c09bd966f00f81196de
@@ -64,7 +64,7 @@ class Dhatu::BlogPost < Dhatu::ApplicationRecord
64
64
 
65
65
  blog_post.category = category
66
66
 
67
- blog_post.featured = ["true", "t","1","yes","y"].include?(hsh[:featured].to_s.strip)
67
+ blog_post.featured = ["true", "t","1","yes","y"].include?(hsh[:featured].to_s.downcase.strip)
68
68
  blog_post.status = hsh[:status].to_s.strip.blank? ? PUBLISHED : hsh[:status].to_s.strip
69
69
 
70
70
  if blog_post.valid?
@@ -85,8 +85,8 @@ class Dhatu::Branch < Dhatu::ApplicationRecord
85
85
  branch.blog = hsh[:blog].to_s.strip
86
86
  branch.status = hsh[:status].to_s.strip.blank? ? PUBLISHED : hsh[:status].to_s.strip
87
87
 
88
- branch.featured = ["true", "t","1","yes","y"].include?(hsh[:featured].to_s.strip)
89
- branch.main_branch = ["true", "t","1","yes","y"].include?(hsh[:main_branch].to_s.strip)
88
+ branch.featured = ["true", "t","1","yes","y"].include?(hsh[:featured].to_s.downcase.strip)
89
+ branch.main_branch = ["true", "t","1","yes","y"].include?(hsh[:main_branch].to_s.downcase.strip)
90
90
 
91
91
  if branch.valid?
92
92
  begin
@@ -43,15 +43,15 @@ class Dhatu::Promotion < Dhatu::ApplicationRecord
43
43
  promotion.code = hsh[:code].to_s.strip
44
44
  promotion.short_description = hsh[:short_description].to_s.strip
45
45
 
46
- promotion.display_name = ["true", "t","1","yes","y"].include?(hsh[:display_name].to_s.strip)
47
- promotion.display_email = ["true", "t","1","yes","y"].include?(hsh[:display_email].to_s.strip)
48
- promotion.display_phone = ["true", "t","1","yes","y"].include?(hsh[:display_phone].to_s.strip)
46
+ promotion.display_name = ["true", "t","1","yes","y"].include?(hsh[:display_name].to_s.downcase.strip)
47
+ promotion.display_email = ["true", "t","1","yes","y"].include?(hsh[:display_email].to_s.downcase.strip)
48
+ promotion.display_phone = ["true", "t","1","yes","y"].include?(hsh[:display_phone].to_s.downcase.strip)
49
49
 
50
- promotion.name_mandatory = ["true", "t","1","yes","y"].include?(hsh[:name_mandatory].to_s.strip)
51
- promotion.email_mandatory = ["true", "t","1","yes","y"].include?(hsh[:email_mandatory].to_s.strip)
52
- promotion.phone_mandatory = ["true", "t","1","yes","y"].include?(hsh[:phone_mandatory].to_s.strip)
50
+ promotion.name_mandatory = ["true", "t","1","yes","y"].include?(hsh[:name_mandatory].to_s.downcase.strip)
51
+ promotion.email_mandatory = ["true", "t","1","yes","y"].include?(hsh[:email_mandatory].to_s.downcase.strip)
52
+ promotion.phone_mandatory = ["true", "t","1","yes","y"].include?(hsh[:phone_mandatory].to_s.downcase.strip)
53
53
 
54
- promotion.featured = ["true", "t","1","yes","y"].include?(hsh[:featured].to_s.strip)
54
+ promotion.featured = ["true", "t","1","yes","y"].include?(hsh[:featured].to_s.downcase.strip)
55
55
  promotion.status = hsh[:status].to_s.strip.blank? ? PUBLISHED : hsh[:status].to_s.strip
56
56
  promotion.priority = hsh[:priority].to_s.strip.blank? ? 1000 : hsh[:priority].to_s.strip
57
57
 
@@ -88,7 +88,7 @@ class Dhatu::Section < Dhatu::ApplicationRecord
88
88
  end
89
89
 
90
90
  def display_name
91
- "#{title_was}"
91
+ "#{name_was}"
92
92
  end
93
93
 
94
94
  # Permission Methods
@@ -5,19 +5,19 @@ class CategoryImageUploader < ImageUploader
5
5
  end
6
6
 
7
7
  version :large do
8
- process :resize_to_fill => [400, 400]
8
+ process :resize_to_fill => [800, 800]
9
9
  end
10
10
 
11
11
  version :medium do
12
- process :resize_to_fill => [200, 200]
12
+ process :resize_to_fill => [400, 400]
13
13
  end
14
14
 
15
15
  version :small do
16
- process :resize_to_fill => [100, 100]
16
+ process :resize_to_fill => [200, 200]
17
17
  end
18
18
 
19
19
  version :tiny do
20
- process :resize_to_fill => [40, 40]
20
+ process :resize_to_fill => [100, 100]
21
21
  end
22
22
 
23
23
  end
@@ -119,6 +119,12 @@
119
119
  </div>
120
120
  </div>
121
121
 
122
+ <!-- Display Meta Tags -->
123
+ <% if @current_user.has_read_permission?(Dhatu::MetaTag) %>
124
+ <%= clear_tag(40) %>
125
+ <%= render :partial=>"dhatu/meta_tags/list", locals: {meta_taggable: @blog_post } %>
126
+ <% end %>
127
+
122
128
  <%= link_to "Close", "#", onclick: "closeLargeModal();", class: "btn btn-primary pull-right" %>
123
129
 
124
130
  <%= clear_tag %>
@@ -66,7 +66,6 @@
66
66
 
67
67
  <div><strong class="fs-18">Category Image</strong></div>
68
68
  <hr>
69
-
70
69
  <div class="row">
71
70
  <div class="col-md-6 col-sm-12 col-xs-12" style="border-right:1px solid #f1f1f1;">
72
71
  <% if display_edit_links? %>
@@ -87,27 +87,10 @@
87
87
  </div>
88
88
  <%= render :partial=>"kuppayam/images/multiple_images", locals: { images: @event.gallery_images } %>
89
89
 
90
+ <!-- Display Meta Tags -->
90
91
  <% if @current_user.has_read_permission?(Dhatu::MetaTag) %>
91
92
  <%= clear_tag(40) %>
92
- <div><strong class="fs-18">Meta Tags</strong></div>
93
- <hr>
94
- <div id="div_meta_tags_action_buttons">
95
- <div class="row">
96
- <div class="col-md-6">
97
- <%= theme_button('Add a Meta Tag', 'plus', new_meta_tag_path(meta_taggable_id: @event.id, meta_taggable_type: @event.class.name), classes: "pull-left mr-10", btn_type: "success") if @current_user.has_create_permission?(Dhatu::MetaTag) %>
98
-
99
- <%= theme_button('Refresh', 'refresh', meta_tags_path(meta_taggable_id: @event.id, meta_taggable_type: @event.class.name), classes: "pull-left mr-10", btn_type: "white") %>
100
- </div>
101
- <div class="col-md-6">
102
- <%= search_form_kuppayam(User, meta_tags_path(meta_taggable_id: @event.id, meta_taggable_type: @event.class.name), text: "") %>
103
- </div>
104
- </div>
105
- </div>
106
- <%= clear_tag(10) %>
107
- <div id="div_meta_tag_index">
108
- <% meta_tags = @event.meta_tags.page(@current_page).per(@per_page) %>
109
- <%= render :partial=>"dhatu/meta_tags/index", locals: {meta_tags: meta_tags, meta_taggable: @event } %>
110
- </div>
93
+ <%= render :partial=>"dhatu/meta_tags/list", locals: {meta_taggable: @event } %>
111
94
  <% end %>
112
95
 
113
96
  <% if @current_user.super_admin? %>
@@ -13,7 +13,7 @@
13
13
  </thead>
14
14
 
15
15
  <tbody>
16
- <% meta_tags.each_with_index do |meta_tag, i| %>
16
+ <% meta_taggable.meta_tags.each_with_index do |meta_tag, i| %>
17
17
  <tr id="tr_meta_tag_<%= meta_tag.id %>">
18
18
 
19
19
  <th scope="row" style="" class="hidden-sm hidden-xs">
@@ -0,0 +1,22 @@
1
+ <div><strong class="fs-18">Meta Tags</strong></div>
2
+ <hr>
3
+ <div class="alert alert-default">
4
+ <strong>Meta Tags</strong> are html tags used in HTML and XHTML documents to provide structured metadata about a Web page. <br>
5
+ They are part of a web page's head section. Multiple Meta elements with different attributes can be used on the same page.
6
+ </div>
7
+ <div id="div_meta_tags_action_buttons">
8
+ <div class="row">
9
+ <div class="col-md-6">
10
+ <%= theme_button('Add a Meta Tag', 'plus', new_meta_tag_path(meta_taggable_id: meta_taggable.id, meta_taggable_type: meta_taggable.class.name), classes: "pull-left mr-10", btn_type: "success") if @current_user.has_create_permission?(Dhatu::MetaTag) %>
11
+
12
+ <%= theme_button('Refresh', 'refresh', meta_tags_path(meta_taggable_id: meta_taggable.id, meta_taggable_type: meta_taggable.class.name), classes: "pull-left mr-10", btn_type: "white") %>
13
+ </div>
14
+ <div class="col-md-6">
15
+ <%= search_form_kuppayam(User, meta_tags_path(meta_taggable_id: meta_taggable.id, meta_taggable_type: meta_taggable.class.name), text: "") %>
16
+ </div>
17
+ </div>
18
+ </div>
19
+ <%= clear_tag(10) %>
20
+ <div id="div_meta_tag_index">
21
+ <%= render :partial=>"dhatu/meta_tags/index", locals: { meta_taggable: meta_taggable } %>
22
+ </div>
@@ -64,27 +64,10 @@
64
64
  </div>
65
65
  </div>
66
66
 
67
+ <!-- Display Meta Tags -->
67
68
  <% if @current_user.has_read_permission?(Dhatu::MetaTag) %>
68
69
  <%= clear_tag(40) %>
69
- <div><strong class="fs-18">Meta Tags</strong></div>
70
- <hr>
71
- <div id="div_meta_tags_action_buttons">
72
- <div class="row">
73
- <div class="col-md-6">
74
- <%= theme_button('Add a Meta Tag', 'plus', new_meta_tag_path(meta_taggable_id: @offer.id, meta_taggable_type: @offer.class.name), classes: "pull-left mr-10", btn_type: "success") if @current_user.has_create_permission?(Dhatu::MetaTag) %>
75
-
76
- <%= theme_button('Refresh', 'refresh', meta_tags_path(meta_taggable_id: @offer.id, meta_taggable_type: @offer.class.name), classes: "pull-left mr-10", btn_type: "white") %>
77
- </div>
78
- <div class="col-md-6">
79
- <%= search_form_kuppayam(User, meta_tags_path(meta_taggable_id: @offer.id, meta_taggable_type: @offer.class.name), text: "") %>
80
- </div>
81
- </div>
82
- </div>
83
- <%= clear_tag(10) %>
84
- <div id="div_meta_tag_index">
85
- <% meta_tags = @offer.meta_tags.page(@current_page).per(@per_page) %>
86
- <%= render :partial=>"dhatu/meta_tags/index", locals: {meta_tags: meta_tags, meta_taggable: @offer } %>
87
- </div>
70
+ <%= render :partial=>"dhatu/meta_tags/list", locals: {meta_taggable: @offer } %>
88
71
  <% end %>
89
72
 
90
73
  <% if @current_user.super_admin? %>
@@ -2,30 +2,14 @@
2
2
 
3
3
  <div class="row">
4
4
 
5
- <!-- <div class="col-md-3 col-sm-12 col-xs-12" style="border-right:1px solid #f1f1f1;"> -->
6
- <%# if display_edit_links? %>
7
- <%#= edit_image(@page,
8
- "cover_image.image.large.url",
9
- upload_image_link(@page, :cover_image, nil ),
10
- remove_image_link(@page, :cover_image, nil ),
11
- image_options: {assoc_name: :cover_image }) %>
12
- <%# else %>
13
- <%#= display_image(@page, "cover_image.image.large.url", class: "img-inline", alt: @page.display_name) %>
14
- <%# end %>
15
- <!-- </div> -->
16
-
17
5
  <div class="col-md-9 col-sm-12 col-xs-12" style="border-right:1px solid #f1f1f1;">
18
6
 
19
7
  <%= theme_panel_heading(@page.name) %>
20
-
21
8
  <%= theme_panel_sub_heading(@page.code, "#") if @page.code %>
22
-
23
9
  <%= clear_tag(10) %>
24
10
  <span class="mr-5 mt-5 badge badge-warning"><%= @page.feature.try(:name) %></span>
25
11
  <%= clear_tag(10) %>
26
-
27
12
  <%= display_publishable_status(@page) %>
28
-
29
13
  <%= clear_tag(10) %>
30
14
 
31
15
  </div>
@@ -40,30 +24,8 @@
40
24
  </div>
41
25
 
42
26
  <%= clear_tag(40) %>
43
-
44
- <div><strong class="fs-18">Meta Tags</strong></div>
45
- <hr>
46
- <% if @page.feature %>
47
- <div class="alert alert-default"><%= @page.feature.try(:display_name) %> module has a built in meta tag manager. Manage Meta Tags for this page there.</div>
48
- <% else %>
49
- <div id="div_meta_tags_action_buttons">
50
- <div class="row">
51
- <div class="col-md-6">
52
- <%= theme_button('Add a Meta Tag', 'plus', new_meta_tag_path(meta_taggable_id: @page.id, meta_taggable_type: @page.class.name), classes: "pull-left mr-10", btn_type: "success") if @current_user.has_create_permission?(Dhatu::MetaTag) %>
53
-
54
- <%= theme_button('Refresh', 'refresh', meta_tags_path(meta_taggable_id: @page.id, meta_taggable_type: @page.class.name), classes: "pull-left mr-10", btn_type: "white") %>
55
- </div>
56
- <div class="col-md-6">
57
- <%= search_form_kuppayam(User, meta_tags_path(meta_taggable_id: @page.id, meta_taggable_type: @page.class.name), text: "") %>
58
- </div>
59
- </div>
60
- </div>
61
- <%= clear_tag(10) %>
62
- <div id="div_meta_tag_index">
63
- <% meta_tags = @page.meta_tags.page(@current_page).per(@per_page) %>
64
- <%= render :partial=>"dhatu/meta_tags/index", locals: {meta_tags: meta_tags, meta_taggable: @page } %>
65
- </div>
66
- <% end %>
27
+ <!-- Display Meta Tags -->
28
+ <%= render :partial=>"dhatu/meta_tags/list", locals: {meta_taggable: @page } %>
67
29
 
68
30
  <% if @current_user.super_admin? %>
69
31
  <%= clear_tag(40) %>
@@ -92,6 +54,8 @@
92
54
  </div>
93
55
  <% end %>
94
56
 
57
+ <%= clear_tag(40) %>
58
+
95
59
  <%= link_to "Close", "#", onclick: "closeLargeModal();", class: "btn btn-primary pull-right" %>
96
60
 
97
61
  <%= clear_tag %>
@@ -78,27 +78,10 @@
78
78
  </div>
79
79
  <%= render :partial=>"kuppayam/images/multiple_images", locals: { images: @project.gallery_images } %>
80
80
 
81
+ <!-- Display Meta Tags -->
81
82
  <% if @current_user.has_read_permission?(Dhatu::MetaTag) %>
82
83
  <%= clear_tag(40) %>
83
- <div><strong class="fs-18">Meta Tags</strong></div>
84
- <hr>
85
- <div id="div_meta_tags_action_buttons">
86
- <div class="row">
87
- <div class="col-md-6">
88
- <%= theme_button('Add a Meta Tag', 'plus', new_meta_tag_path(meta_taggable_id: @project.id, meta_taggable_type: @project.class.name), classes: "pull-left mr-10", btn_type: "success") if @current_user.has_create_permission?(Dhatu::MetaTag) %>
89
-
90
- <%= theme_button('Refresh', 'refresh', meta_tags_path(meta_taggable_id: @project.id, meta_taggable_type: @project.class.name), classes: "pull-left mr-10", btn_type: "white") %>
91
- </div>
92
- <div class="col-md-6">
93
- <%= search_form_kuppayam(User, meta_tags_path(meta_taggable_id: @project.id, meta_taggable_type: @project.class.name), text: "") %>
94
- </div>
95
- </div>
96
- </div>
97
- <%= clear_tag(10) %>
98
- <div id="div_meta_tag_index">
99
- <% meta_tags = @project.meta_tags.page(@current_page).per(@per_page) %>
100
- <%= render :partial=>"dhatu/meta_tags/index", locals: {meta_tags: meta_tags, meta_taggable: @project } %>
101
- </div>
84
+ <%= render :partial=>"dhatu/meta_tags/list", locals: {meta_taggable: @project } %>
102
85
  <% end %>
103
86
 
104
87
  <% if @current_user.super_admin? %>
@@ -1,5 +1,6 @@
1
1
  <div id="div_section_show">
2
2
 
3
+ <% if @current_user.super_admin? %>
3
4
  <div class="row">
4
5
 
5
6
  <div class="col-md-9 col-sm-12 col-xs-12">
@@ -17,10 +18,11 @@
17
18
  <% end %>
18
19
 
19
20
  </div>
20
-
21
+
21
22
  <%= clear_tag(20) %>
22
23
  <div><strong class="fs-18">Section Texts</strong></div>
23
24
  <hr>
25
+ <% end %>
24
26
 
25
27
  <%= clear_tag(20) %>
26
28
 
@@ -197,7 +199,9 @@
197
199
  </div>
198
200
  <% end %>
199
201
 
200
- <%= link_to "Close", "#", onclick: "closeLargeModal();", class: "btn btn-primary pull-right" %>
202
+ <%= link_to "Close", "#", onclick: "closeLargeModal();", class: "btn btn-primary pull-right ml-10", style: "width:120px;" %>
203
+
204
+ <%= link_to "Edit", edit_section_path(@section), remote: true, class: "btn btn-success pull-right", style: "width:180px;" if display_manage_links? %>
201
205
 
202
206
  <%= clear_tag %>
203
207
 
@@ -78,27 +78,10 @@
78
78
  </div>
79
79
  <%= render :partial=>"kuppayam/images/multiple_images", locals: { images: @service.gallery_images } %>
80
80
 
81
+ <!-- Display Meta Tags -->
81
82
  <% if @current_user.has_read_permission?(Dhatu::MetaTag) %>
82
- <%= clear_tag(60) %>
83
- <div><strong class="fs-18">Meta Tags</strong></div>
84
- <hr>
85
- <div id="div_meta_tags_action_buttons">
86
- <div class="row">
87
- <div class="col-md-6">
88
- <%= theme_button('Add a Meta Tag', 'plus', new_meta_tag_path(meta_taggable_id: @service.id, meta_taggable_type: @service.class.name), classes: "pull-left mr-10", btn_type: "success") if @current_user.has_create_permission?(Dhatu::MetaTag) %>
89
-
90
- <%= theme_button('Refresh', 'refresh', meta_tags_path(meta_taggable_id: @service.id, meta_taggable_type: @service.class.name), classes: "pull-left mr-10", btn_type: "white") %>
91
- </div>
92
- <div class="col-md-6">
93
- <%= search_form_kuppayam(User, meta_tags_path(meta_taggable_id: @service.id, meta_taggable_type: @service.class.name), text: "") %>
94
- </div>
95
- </div>
96
- </div>
97
- <%= clear_tag(10) %>
98
- <div id="div_meta_tag_index">
99
- <% meta_tags = @service.meta_tags.page(@current_page).per(@per_page) %>
100
- <%= render :partial=>"dhatu/meta_tags/index", locals: {meta_tags: meta_tags, meta_taggable: @service } %>
101
- </div>
83
+ <%= clear_tag(40) %>
84
+ <%= render :partial=>"dhatu/meta_tags/list", locals: {meta_taggable: @service } %>
102
85
  <% end %>
103
86
 
104
87
  <% if @current_user.super_admin? %>
@@ -22,4 +22,5 @@ Dhatu::Promotion,published,FALSE,1
22
22
  Dhatu::PromotionAttribute,published,FALSE,1
23
23
  Dhatu::PromotionEnquiry,published,FALSE,1
24
24
  Dhatu::Service,published,TRUE,1
25
- Dhatu::Product,published,TRUE,1
25
+ Dhatu::Product,published,TRUE,1
26
+ Dhatu::Page,published,TRUE,1
@@ -1,3 +1,3 @@
1
1
  module Dhatu
2
- VERSION = '0.1.23'
2
+ VERSION = '0.1.24'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dhatu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.23
4
+ version: 0.1.24
5
5
  platform: ruby
6
6
  authors:
7
7
  - kpvarma
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-01-16 00:00:00.000000000 Z
11
+ date: 2018-01-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -489,6 +489,7 @@ files:
489
489
  - app/views/dhatu/events/index.html.erb
490
490
  - app/views/dhatu/meta_tags/_form.html.erb
491
491
  - app/views/dhatu/meta_tags/_index.html.erb
492
+ - app/views/dhatu/meta_tags/_list.html.erb
492
493
  - app/views/dhatu/meta_tags/_row.html.erb
493
494
  - app/views/dhatu/meta_tags/create.js.erb
494
495
  - app/views/dhatu/offers/_form.html.erb