dhatu 0.1.20 → 0.1.21

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: ca0bd76d3e2830b603f692a4758bd8757984cceca3caf8f2e5c366340bc5a400
4
- data.tar.gz: 60bfc25d39b31268ebf620dbe180337401f913912aeca547ab387aafcb0582e4
3
+ metadata.gz: 8ddb029052576acf7f32bf17bddf043a31b6e114fb95d5db605d63d129062060
4
+ data.tar.gz: 3462c0df2c6dabe814fd88b2d51762d09f1889144082a083aaecd960b8997fdb
5
5
  SHA512:
6
- metadata.gz: 1cd21dba9cb6ade7f8dffe115ae9e0ca6a66c6e71181a3d51818bf0dec7732010d2d0190815da29bf5892c5ae0125c3e6f32648338167191a8e62fe674e9a72d
7
- data.tar.gz: 34b075a08759dab72493ecae37194bda0392e1eb4e14ed93a7b890610d4acd314ac541979c536932adbdde9ea855d4f06f9f3ec6fc9e6503c3ee5581e0cd4e1f
6
+ metadata.gz: 6e23be76aa0dedf217ee206ba6dddfdcc947003b9fda28fb061633d76df2f186519ddba7f38c7d34b84fa65dc53fbd65fc436ee48248c465718d520d17598e72
7
+ data.tar.gz: 99161a05fc7149d8bfe38eea00acdaa82bb6c451a8342c0490f484439b9350c996c68a2e8ab778b80dde3aa6917fb1db97b98244f3f69f3eaca08c963e30e4f3
@@ -42,8 +42,6 @@
42
42
  <%= theme_button('Add a Category', 'plus', new_category_path(parent_id: @current_category.try(:id), category_type: @feature.try(:name), ft: @feature.try(:id)), classes: "pull-left mr-10", btn_type: "success") %>
43
43
  <% end %>
44
44
 
45
- <%# binding.pry %>
46
-
47
45
  <%= theme_button('Refresh', 'refresh', categories_path(parent_id: @current_category.try(:id), category_type: @feature.try(:name), ft: @feature.try(:id)), classes: "pull-left mr-10", btn_type: "white") %>
48
46
 
49
47
  </div>
@@ -95,25 +93,30 @@
95
93
 
96
94
  <div style="text-align: center;border: 1px solid #f1f1f1;padding:10px;margin-bottom:15px;">
97
95
  <div style="height:200px;">
98
- <i class="<%= Feature::FEATURE_ICONS[category.category_type] %>" style="font-size:60px;padding:20px;"></i><br>
96
+ <% if category.category_image %>
97
+ <%= display_image(category, "category_image.image.small.url", class: "img-inline", alt: category.display_name, width: "100", height: "100", class: "p-20") %>
98
+ <% else %>
99
+ <i class="<%= Feature::FEATURE_ICONS[category.category_type] %>" style="font-size:60px;padding:20px;"></i>
100
+ <% end %><br>
101
+ <% category_name = truncate(category.display_name, length: 20) %>
99
102
  <% if category.end_node? %>
100
- <%= content_tag :span, category.display_name, style: ";font-size:14px;" %><br>
103
+ <%= content_tag :span, category_name, style: ";font-size:14px;" %><br>
101
104
  <%= content_tag :span, category.display_category_type, style: "color: #ffba00;" %><br>
102
105
  <%= display_publishable_status(category) %>
103
106
  <% else %>
104
- <%= link_to raw("<i class=\"fa fa-caret-right\"></i> #{category.display_name}"), categories_path(parent_id: category.id, category_type: @category_type), remote: true, style: "font-weight:bold;font-size:14px;" %><br>
107
+ <%= link_to raw("<i class=\"fa fa-caret-right\"></i> #{category_name}"), categories_path(parent_id: category.id, category_type: @category_type), remote: true, style: "font-weight:bold;font-size:14px;" %><br>
105
108
  <%= content_tag :span, category.display_category_type, style: "color: #cc3f44;" %><br>
106
109
  <%= display_publishable_status(category) %>
107
110
  <% end %><br>
108
111
  </div>
109
112
  <% if display_manage_links? %>
110
- <div style="width: 90%;border: 1px solid #e0e0e0;margin:5%;">
113
+ <div style="width: 90%;border: 0px solid #e0e0e0;margin:5%;">
111
114
  <%#= display_publishable_links(category) %>
112
- <%= link_to raw("<i class=\"fa-eye mr-5\"></i>"), category_path(category), :remote=>true, style: "color:#373e4a" %>
115
+ <%= link_to raw("<i class=\"fa-eye mr-5\"></i> View Details"), category_path(category), :remote=>true, style: "color:#373e4a" %><br>
113
116
  <% if @current_user.has_create_permission?(Dhatu::Category) %>
114
- <%= link_to raw("<i class='fa-plus mr-5'></i>"), new_category_path(parent_id: category.try(:id),category_type: category.category_type, ft: @feature.try(:id)), class: "", remote: true, style: "color: #8dc63f" %>
115
- <% end %>
116
- <%= display_manage_links(category, @current_user, edit_text: "", delete_text: "") %>
117
+ <%= link_to raw("<i class='fa-plus mr-5'></i> Sub Category"), new_category_path(parent_id: category.try(:id),category_type: category.category_type, ft: @feature.try(:id)), class: "", remote: true, style: "color: #8dc63f" %>
118
+ <% end %><br>
119
+ <%= display_manage_links(category, @current_user, edit_text: "Edit Category", delete_text: "Edit Category") %>
117
120
  </div>
118
121
  <% end %>
119
122
  </div>
@@ -181,7 +181,11 @@
181
181
  <!-- Admin Dashboard -->
182
182
  <% if @current_user.super_admin? || @current_user.has_role?("Site Admin") %>
183
183
  <li class="<%= nav_active?('admin/dashboard') ? 'active' : '' %>">
184
- <%= link_to raw("<i class=\"linecons-desktop\"></i> <span class='title'>Dashboard</span>"), dhatu.dashboard_path %>
184
+ <% begin %>
185
+ <%= link_to raw("<i class=\"linecons-desktop\"></i> <span class='title'>Dashboard</span>"), main_app.dashboard_path %>
186
+ <% rescue %>
187
+ <%= link_to raw("<i class=\"linecons-desktop\"></i> <span class='title'>Dashboard</span>"), dhatu.dashboard_path %>
188
+ <% end %>
185
189
  </li>
186
190
  <% else %>
187
191
  <li class="<%= nav_active?('profile/dashboard') ? 'active' : '' %>">
@@ -1,3 +1,3 @@
1
1
  module Dhatu
2
- VERSION = '0.1.20'
2
+ VERSION = '0.1.21'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dhatu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.20
4
+ version: 0.1.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - kpvarma