dhatu 0.2.0 → 0.2.1

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.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/dhatu/blog_posts_controller.rb +1 -1
  3. data/app/controllers/dhatu/bookings_controller.rb +1 -1
  4. data/app/controllers/dhatu/branches_controller.rb +1 -1
  5. data/app/controllers/dhatu/categories_controller.rb +7 -6
  6. data/app/controllers/dhatu/events_controller.rb +1 -1
  7. data/app/controllers/dhatu/offers_controller.rb +1 -1
  8. data/app/controllers/dhatu/pages_controller.rb +1 -1
  9. data/app/controllers/dhatu/photo_albums_controller.rb +172 -0
  10. data/app/controllers/dhatu/prices_controller.rb +1 -1
  11. data/app/controllers/dhatu/projects_controller.rb +1 -1
  12. data/app/controllers/dhatu/promotion_enquiries_controller.rb +1 -1
  13. data/app/controllers/dhatu/promotions_controller.rb +1 -1
  14. data/app/controllers/dhatu/sections_controller.rb +2 -2
  15. data/app/controllers/dhatu/services_controller.rb +1 -1
  16. data/app/controllers/dhatu/team_members_controller.rb +1 -1
  17. data/app/controllers/dhatu/testimonials_controller.rb +1 -1
  18. data/app/models/dhatu/photo_album.rb +172 -0
  19. data/app/views/dhatu/categories/_header.html.erb +86 -0
  20. data/app/views/dhatu/categories/_index.html.erb +0 -91
  21. data/app/views/dhatu/categories/_row.html.erb +13 -8
  22. data/app/views/dhatu/categories/index.html.erb +6 -1
  23. data/app/views/dhatu/dashboard/_index.html.erb +6 -0
  24. data/app/views/dhatu/pages/_index.html.erb +4 -27
  25. data/app/views/dhatu/pages/_row.html.erb +3 -21
  26. data/app/views/dhatu/pages/index.html.erb +7 -6
  27. data/app/views/dhatu/photo_albums/_form.html.erb +38 -0
  28. data/app/views/dhatu/photo_albums/_header.html.erb +70 -0
  29. data/app/views/dhatu/photo_albums/_index.html.erb +44 -0
  30. data/app/views/dhatu/photo_albums/_row.html.erb +28 -0
  31. data/app/views/dhatu/photo_albums/_show.html.erb +145 -0
  32. data/app/views/dhatu/photo_albums/index.html.erb +34 -0
  33. data/app/views/dhatu/sections/_index.html.erb +29 -53
  34. data/app/views/dhatu/sections/_row.html.erb +9 -25
  35. data/app/views/dhatu/sections_old/_form.html.erb +171 -0
  36. data/app/views/dhatu/sections_old/_index.html.erb +53 -0
  37. data/app/views/dhatu/sections_old/_row.html.erb +26 -0
  38. data/app/views/dhatu/sections_old/_show.html.erb +208 -0
  39. data/app/views/dhatu/sections_old/index.html.erb +52 -0
  40. data/app/views/layouts/kuppayam/_sidebar.html.erb +6 -0
  41. data/config/routes.rb +9 -0
  42. data/db/migrate/20180101093437_create_photo_albums.rb +24 -0
  43. data/lib/dhatu/version.rb +1 -1
  44. data/spec/dummy/spec/factories/photo_album.rb +28 -0
  45. metadata +18 -4
  46. data/app/views/dhatu/categories/_index_list.html.erb +0 -118
  47. data/app/views/dhatu/categories/_row_list.html.erb +0 -34
@@ -0,0 +1,86 @@
1
+ <% if @current_category %>
2
+ <div class="col-md-12">
3
+ <h3 class="text-gray" style="text-align: center;">
4
+ <%= @current_category.display_name %> <br>
5
+ <small class="text-muted">Click on the name to view sub categories.</small>
6
+ </h3>
7
+ </div>
8
+ <% elsif @feature %>
9
+ <div class="col-md-12">
10
+ <h3 class="text-gray" style="text-align: center;">
11
+ Category Type: <%= @feature.display_name %> <br>
12
+ <small class="text-muted">Click on the name to view sub categories.</small>
13
+ </h3>
14
+ </div>
15
+ <% elsif @query %>
16
+ <div class="col-md-12">
17
+ <h3 class="text-gray" style="text-align: center;">
18
+ Search Results for '<%= @query %>'</small>
19
+ </h3>
20
+ </div>
21
+ <% end %>
22
+
23
+ <div class="col-md-12">
24
+ <div style="text-align: center;">
25
+ <%= link_to "(Change Category Type)", choose_category_type_path(ft: @feature.try(:id)), style: "color:#d42020;" %>
26
+ </div>
27
+ </div>
28
+ <%= clear_tag(40) %>
29
+
30
+ <div id="div_category_action_buttons" class="col-md-12">
31
+ <div class="row">
32
+ <div class="col-md-6">
33
+
34
+ <% if @current_category %>
35
+ <%= theme_button('Back', 'arrow-left', categories_path(parent_id: @current_category.try(:parent_id), ft: @feature.try(:id)), classes: "pull-left mr-10", btn_type: "white") %>
36
+ <% else %>
37
+ <%= theme_button('Back', 'arrow-left', choose_category_type_path(ft: 1), classes: "pull-left mr-10", btn_type: "white", remote: false) %>
38
+ <% end %>
39
+
40
+ <% if @current_user.has_create_permission?(Dhatu::Category) %>
41
+ <%= 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") %>
42
+ <% end %>
43
+
44
+ <%= 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") %>
45
+
46
+ </div>
47
+ <div class="col-md-6">
48
+ <%= search_form_kuppayam(Dhatu::Category, categories_path(parent_id: @current_category.try(:id), category_type: @feature.try(:name), ft: @feature.try(:id)), text: @filters[:query]) %>
49
+ </div>
50
+ </div>
51
+ </div>
52
+ <%= clear_tag(10) %>
53
+
54
+ <div class="col-md-12">
55
+ <div class="row">
56
+ <!-- <div class="col-md-12"> -->
57
+ <%# @filter_ui_settings.each do |filter_name, options| %>
58
+ <%# if options[:object_filter] == true %>
59
+ <%#= report_object_filter(filter_name, options) %>
60
+ <%# else %>
61
+ <%#= report_filter(filter_name, options) %>
62
+ <%# end %>
63
+ <%# end %>
64
+ <!-- </div> -->
65
+ <div class="col-md-12" id="div_category_breadcrumbs">
66
+ <% c_list = [] %>
67
+ <% c = @current_category %>
68
+ <% while c do %>
69
+ <% c_list << c %>
70
+ <% c = c.parent %>
71
+ <% end %>
72
+
73
+ <% if c_list.count >= 1 %>
74
+ <ol class="breadcrumb auto-hidden1 bc-3">
75
+ <% c_list.reverse.each do |c| %>
76
+ <% if c_list[0] == c %>
77
+ <li class="active"><strong><%= c.display_name %></strong></li>
78
+ <% else %>
79
+ <li><%= link_to c.display_name, categories_path(parent_id: c.id), remote: true, class: "collapsed" %></li>
80
+ <% end %>
81
+ <% end %>
82
+ </ol>
83
+ <% end %>
84
+ </div>
85
+ </div>
86
+ </div>
@@ -1,93 +1,3 @@
1
- <div class="row">
2
- <% if @current_category %>
3
- <div class="col-md-12">
4
- <h3 class="text-gray" style="text-align: center;">
5
- <%= @current_category.display_name %> <br>
6
- <small class="text-muted">Click on the name to view sub categories.</small>
7
- </h3>
8
- </div>
9
- <% elsif @feature %>
10
- <div class="col-md-12">
11
- <h3 class="text-gray" style="text-align: center;">
12
- Category Type: <%= @feature.display_name %> <br>
13
- <small class="text-muted">Click on the name to view sub categories.</small>
14
- </h3>
15
- </div>
16
- <% elsif @query %>
17
- <div class="col-md-12">
18
- <h3 class="text-gray" style="text-align: center;">
19
- Search Results for '<%= @query %>'</small>
20
- </h3>
21
- </div>
22
- <% end %>
23
-
24
- <div class="col-md-12">
25
- <div style="text-align: center;">
26
- <%= link_to "(Change Category Type)", choose_category_type_path(ft: @feature.try(:id)), style: "color:#d42020;" %>
27
- </div>
28
- </div>
29
- <%= clear_tag(40) %>
30
-
31
- <div id="div_category_action_buttons" class="col-md-12">
32
- <div class="row">
33
- <div class="col-md-6">
34
-
35
- <% if @current_category %>
36
- <%= theme_button('Back', 'arrow-left', categories_path(parent_id: @current_category.try(:parent_id), ft: @feature.try(:id)), classes: "pull-left mr-10", btn_type: "white") %>
37
- <% else %>
38
- <%= theme_button('Back', 'arrow-left', choose_category_type_path(ft: 1), classes: "pull-left mr-10", btn_type: "white", remote: false) %>
39
- <% end %>
40
-
41
- <% if @current_user.has_create_permission?(Dhatu::Category) %>
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
- <% end %>
44
-
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") %>
46
-
47
- </div>
48
- <div class="col-md-6">
49
- <%= search_form_kuppayam(Dhatu::Category, categories_path(parent_id: @current_category.try(:id), category_type: @feature.try(:name), ft: @feature.try(:id)), text: @filters[:query]) %>
50
- </div>
51
- </div>
52
- </div>
53
- <%= clear_tag(10) %>
54
-
55
- <div class="col-md-12">
56
- <div class="row">
57
- <!-- <div class="col-md-12"> -->
58
- <%# @filter_ui_settings.each do |filter_name, options| %>
59
- <%# if options[:object_filter] == true %>
60
- <%#= report_object_filter(filter_name, options) %>
61
- <%# else %>
62
- <%#= report_filter(filter_name, options) %>
63
- <%# end %>
64
- <%# end %>
65
- <!-- </div> -->
66
- <div class="col-md-12" id="div_category_breadcrumbs">
67
- <% c_list = [] %>
68
- <% c = @current_category %>
69
- <% while c do %>
70
- <% c_list << c %>
71
- <% c = c.parent %>
72
- <% end %>
73
-
74
- <% if c_list.count >= 1 %>
75
- <ol class="breadcrumb auto-hidden1 bc-3">
76
- <% c_list.reverse.each do |c| %>
77
- <% if c_list[0] == c %>
78
- <li class="active"><strong><%= c.display_name %></strong></li>
79
- <% else %>
80
- <li><%= link_to c.display_name, categories_path(parent_id: c.id), remote: true, class: "collapsed" %></li>
81
- <% end %>
82
- <% end %>
83
- </ol>
84
- <% end %>
85
- </div>
86
- </div>
87
- </div>
88
- </div>
89
-
90
- <div id="div_category_list" class="row mt-30">
91
1
  <% @categories.each_with_index do |category, i| %>
92
2
  <div id="div_category_<%= category.id %>" class="col-lg-2 col-md-3 col-sm-6 col-xs-6">
93
3
 
@@ -123,7 +33,6 @@
123
33
 
124
34
  </div>
125
35
  <% end %>
126
- </div>
127
36
 
128
37
  <%= clear_tag %>
129
38
 
@@ -2,25 +2,30 @@
2
2
 
3
3
  <div style="text-align: center;border: 1px solid #f1f1f1;padding:10px;margin-bottom:15px;">
4
4
  <div style="height:200px;">
5
- <i class="<%= Feature::FEATURE_ICONS[category.category_type] %>" style="font-size:60px;padding:20px;"></i><br>
5
+ <% if category.category_image %>
6
+ <%= display_image(category, "category_image.image.small.url", class: "img-inline", alt: category.display_name, width: "100", height: "100", class: "p-20") %>
7
+ <% else %>
8
+ <i class="<%= Feature::FEATURE_ICONS[category.category_type] %>" style="font-size:60px;padding:20px;"></i>
9
+ <% end %><br>
10
+ <% category_name = truncate(category.display_name, length: 20) %>
6
11
  <% if category.end_node? %>
7
- <%= content_tag :span, category.display_name, style: ";font-size:14px;" %><br>
12
+ <%= content_tag :span, category_name, style: ";font-size:14px;" %><br>
8
13
  <%= content_tag :span, category.display_category_type, style: "color: #ffba00;" %><br>
9
14
  <%= display_publishable_status(category) %>
10
15
  <% else %>
11
- <%= 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>
16
+ <%= 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>
12
17
  <%= content_tag :span, category.display_category_type, style: "color: #cc3f44;" %><br>
13
18
  <%= display_publishable_status(category) %>
14
19
  <% end %><br>
15
20
  </div>
16
21
  <% if display_manage_links? %>
17
- <div style="width: 90%;border: 1px solid #e0e0e0;margin:5%;">
22
+ <div style="width: 90%;border: 0px solid #e0e0e0;margin:5%;">
18
23
  <%#= display_publishable_links(category) %>
19
- <%= link_to raw("<i class=\"fa-eye mr-5\"></i>"), category_path(category), :remote=>true, style: "color:#373e4a" %>
24
+ <%= link_to raw("<i class=\"fa-eye mr-5\"></i> View Details"), category_path(category), :remote=>true, style: "color:#373e4a" %><br>
20
25
  <% if @current_user.has_create_permission?(Dhatu::Category) %>
21
- <%= 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" %>
22
- <% end %>
23
- <%= display_manage_links(category, @current_user, edit_text: "", delete_text: "") %>
26
+ <%= 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" %>
27
+ <% end %><br>
28
+ <%= display_manage_links(category, @current_user, edit_text: "Edit Category", delete_text: "Edit Category") %>
24
29
  </div>
25
30
  <% end %>
26
31
  </div>
@@ -7,7 +7,12 @@
7
7
  <div class="tab-pane active" id="v-home">
8
8
 
9
9
  <div id="div_category_index">
10
- <%= render :partial=>"dhatu/categories/index" %>
10
+ <div id="div_category_header" class="row">
11
+ <%= render :partial=>"dhatu/categories/header" %>
12
+ </div>
13
+ <div id="div_category_list" class="row mt-30">
14
+ <%= render :partial=>"dhatu/categories/index" %>
15
+ </div>
11
16
  </div>
12
17
  <%= clear_tag(10) %>
13
18
  </div>
@@ -24,6 +24,12 @@
24
24
  url: dhatu.services_url,
25
25
  has_permission: @current_user.has_read_permission?(Dhatu::Service)
26
26
  },
27
+ photo_albums: {
28
+ text: "Photo Gallery",
29
+ icon_class: "fa-image",
30
+ url: dhatu.photo_albums_url,
31
+ has_permission: @current_user.has_read_permission?(Dhatu::PhotoAlbum)
32
+ },
27
33
  prices: {
28
34
  text: "Prices",
29
35
  icon_class: "fa-dollar",
@@ -11,27 +11,6 @@
11
11
  <%= link_to raw("<i class='fa-file mr-10'></i>#{page.name}"), page_path(page), remote: true, style: "font-size: 20px;font-weight:800;" %>
12
12
  <% end %>
13
13
  <span class="ml-10" style="font-size:16px;"><%= display_publishable_status(page) if @current_user.super_admin? %></span>
14
-
15
- <%= clear_tag(20) %>
16
- <% if @current_user.super_admin? %>
17
- <% sections = page.sections %>
18
- <% else %>
19
- <% sections = page.sections.published %>
20
- <% end %>
21
-
22
- <% sections.order("priority ASC, created_at DESC").each do |section| %>
23
- <div class="row ml-30 mb-5">
24
- <span class="pull-left">
25
- <%= link_to raw("<i class='fa-reorder mr-10'></i>#{section.name}"), section_path(section), remote: true, style: "font-size: 18px;;color:#4b4b4b;margin-right:20px;" %>
26
- </span>
27
- <span class="action-links">
28
- <%= display_manage_links(section, @current_user) %>
29
- <%= display_publishable_links(section) if @current_user.super_admin? %>
30
- </span>
31
- <%= clear_tag %>
32
- </div>
33
- <% end %>
34
-
35
14
  </div>
36
15
  <% if @current_user.super_admin? %>
37
16
  <div class="col-md-4 action-links">
@@ -45,12 +24,10 @@
45
24
  <% end %>
46
25
  </div>
47
26
 
48
- <% if page.feature %>
49
- <%#= theme_button("Manage #{page.feature.display_name}", 'list', dhatu.new_section_path(page_id: page), classes: "btn btn-success btn-xs ml-30 mb-5", btn_type: "success") if @current_user.super_admin? %>
50
- <p class="ml-30"> Go to <%= page.feature.display_name %> section to edit the contents on this page. </p>
51
- <% else %>
52
- <%= theme_button('Add a Section', 'plus', dhatu.new_section_path(page_id: page), classes: "btn btn-success btn-xs ml-30 mb-5", btn_type: "success") if @current_user.super_admin? %>
53
- <% end %>
27
+ <%= clear_tag(20) %>
28
+ <div id="div_section_list">
29
+ <%= render partial: "dhatu/sections/index", locals: {page: page} %>
30
+ </div>
54
31
 
55
32
  </div>
56
33
 
@@ -9,26 +9,6 @@
9
9
  <%= link_to raw("<i class='fa-file mr-10'></i>#{page.name}"), page_path(page), remote: true, style: "font-size: 20px;font-weight:800;" %>
10
10
  <% end %>
11
11
  <span class="ml-10" style="font-size:16px;"><%= display_publishable_status(page) if @current_user.super_admin? %></span>
12
-
13
- <%= clear_tag(20) %>
14
- <% if @current_user.super_admin? %>
15
- <% sections = page.sections %>
16
- <% else %>
17
- <% sections = page.sections.published %>
18
- <% end %>
19
- <% sections.order("priority ASC, created_at DESC").each do |section| %>
20
- <div class="row ml-30 mb-5">
21
- <span class="pull-left">
22
- <%= link_to raw("<i class='fa-reorder mr-10'></i>#{section.title}"), section_path(section), remote: true, style: "font-size: 18px;;color:#4b4b4b;margin-right:20px;" %>
23
- </span>
24
- <span class="action-links">
25
- <%= display_manage_links(section, @current_user) %>
26
- <%= display_publishable_links(section) if @current_user.super_admin? %>
27
- </span>
28
- <%= clear_tag %>
29
- </div>
30
- <% end %>
31
-
32
12
  </div>
33
13
  <% if @current_user.super_admin? %>
34
14
  <div class="col-md-4 action-links">
@@ -42,6 +22,8 @@
42
22
  <% end %>
43
23
  </div>
44
24
 
45
- <%= theme_button('Add a Section', 'plus', dhatu.new_section_path(page_id: page), classes: "btn btn-success btn-xs ml-30 mb-5", btn_type: "success") if @current_user.super_admin? %>
25
+ <div id="div_section_list">
26
+ <%= render partial: "dhatu/sections/index", locals: {page: page} %>
27
+ </div>
46
28
 
47
29
  </div>
@@ -24,7 +24,7 @@
24
24
  </div>
25
25
  <%= clear_tag(10) %>
26
26
 
27
- <div id="div_page_index">
27
+ <div id="div_page_list">
28
28
  <%= render :partial=>"dhatu/pages/index" %>
29
29
  </div>
30
30
  <%= clear_tag(10) %>
@@ -46,14 +46,15 @@
46
46
  }
47
47
  });
48
48
 
49
- $("#inp_meta_key").autocomplete({
50
- source: [ "c++", "java", "php", "coldfusion", "javascript", "asp", "ruby" ]
51
- });
49
+ // $("#inp_meta_key").autocomplete({
50
+ // source: [ "c++", "java", "php", "coldfusion", "javascript", "asp", "ruby" ]
51
+ //});
52
52
 
53
53
  $('body').on('change', '#inp_title', function() {
54
54
  var sectionCode = $(this).val().replace(/ /g, '_').toUpperCase().slice(0, 63);
55
- console.log("hello");
56
- $('#inp_code').val(sectionCode);
55
+ if($('#inp_code').val() == ""){
56
+ $('#inp_code').val(sectionCode);
57
+ }
57
58
  });
58
59
  </script>
59
60
 
@@ -0,0 +1,38 @@
1
+ <% @photo_album = @r_object %>
2
+ <%= form_for(@photo_album, :html => {:id=>"form_photo_album", :class=>"mb-0 form-horizontal", :role => "form", :method => (@photo_album.new_record? ? :post : :put), :remote=>true}) do |f| %>
3
+
4
+ <div id="photo_album_form_error">
5
+ <%= @photo_album.errors[:base].to_sentence %>
6
+ </div>
7
+
8
+ <div class="form-inputs mb-30 mt-30">
9
+
10
+ <%= theme_form_field(@photo_album, :name) %>
11
+
12
+ <%= theme_form_field(@photo_album, :code) %>
13
+
14
+ <%= theme_form_field(@photo_album, :one_liner, required: false) %>
15
+ <%= theme_form_field(@photo_album, :description, required: false, html_options: {type: :textarea}) %>
16
+ <%= theme_form_field(@photo_album, :priority, required: false, html_options: {type: :number, style: "width:70px;"}) %>
17
+
18
+ <%
19
+ @photo_album.parent_id = params[:parent_id] if params[:parent_id]
20
+ relation = Dhatu::PhotoAlbum.select("id, name").order("name ASC")
21
+ relation = relation.where("id != '#{@photo_album.id}'") if @photo_album.id
22
+ photo_albums = relation.all
23
+ %>
24
+
25
+ <% options = {assoc_collection: photo_albums, required: false, editable: true, assoc_display_method: :name, label: "Parent Category", include_blank: true} %>
26
+ <%= theme_form_assoc_group(@photo_album, :parent_id, **options) %>
27
+ </div>
28
+
29
+ <div>
30
+ <%= submit_tag("Save", :class=>"btn btn-primary pull-right ml-10") %>
31
+
32
+ <%= link_to raw("<i class='fa fa-close mr-5'></i><span>Cancel</span>"), "#", onclick: "closeGenericModal();", class: "pull-right ml-10 btn btn-white" %>
33
+ </div>
34
+ <%= clear_tag(10) %>
35
+ </div>
36
+
37
+ <% end %>
38
+
@@ -0,0 +1,70 @@
1
+ <% if @current_photo_album %>
2
+ <div class="col-md-12">
3
+ <h3 class="text-gray" style="text-align: center;">
4
+ <%= @current_photo_album.display_name %> <br>
5
+ <small class="text-muted">Click on the name to view albums.</small>
6
+ </h3>
7
+ </div>
8
+ <% elsif @query %>
9
+ <div class="col-md-12">
10
+ <h3 class="text-gray" style="text-align: center;">
11
+ Search Results for '<%= @query %>'</small>
12
+ </h3>
13
+ </div>
14
+ <% end %>
15
+
16
+ <div id="div_photo_album_action_buttons" class="col-md-12">
17
+ <div class="row">
18
+ <div class="col-md-6">
19
+
20
+ <% if @current_photo_album %>
21
+ <%= theme_button('Back', 'arrow-left', photo_albums_path(parent_id: @current_photo_album.try(:parent_id), ft: @feature.try(:id)), classes: "pull-left mr-10", btn_type: "white") %>
22
+ <% end %>
23
+
24
+ <% if @current_user.has_create_permission?(Dhatu::PhotoAlbum) %>
25
+ <%= theme_button('Add a Photo Album', 'plus', new_photo_album_path(parent_id: @current_photo_album.try(:id)), classes: "pull-left mr-10", btn_type: "success") %>
26
+ <% end %>
27
+
28
+ <%= theme_button('Refresh', 'refresh', photo_albums_path(parent_id: @current_photo_album.try(:id)), classes: "pull-left mr-10", btn_type: "white") %>
29
+
30
+ </div>
31
+ <div class="col-md-6">
32
+ <%= search_form_kuppayam(Dhatu::PhotoAlbum, photo_albums_path(parent_id: @current_photo_album.try(:id)), text: @filters[:query]) %>
33
+ </div>
34
+ </div>
35
+ </div>
36
+ <%= clear_tag(10) %>
37
+
38
+ <div class="col-md-12">
39
+ <div class="row">
40
+ <!-- <div class="col-md-12"> -->
41
+ <%# @filter_ui_settings.each do |filter_name, options| %>
42
+ <%# if options[:object_filter] == true %>
43
+ <%#= report_object_filter(filter_name, options) %>
44
+ <%# else %>
45
+ <%#= report_filter(filter_name, options) %>
46
+ <%# end %>
47
+ <%# end %>
48
+ <!-- </div> -->
49
+ <div class="col-md-12" id="div_photo_album_breadcrumbs">
50
+ <% c_list = [] %>
51
+ <% c = @current_photo_album %>
52
+ <% while c do %>
53
+ <% c_list << c %>
54
+ <% c = c.parent %>
55
+ <% end %>
56
+
57
+ <% if c_list.count >= 1 %>
58
+ <ol class="breadcrumb auto-hidden1 bc-3">
59
+ <% c_list.reverse.each do |c| %>
60
+ <% if c_list[0] == c %>
61
+ <li class="active"><strong><%= c.display_name %></strong></li>
62
+ <% else %>
63
+ <li><%= link_to c.display_name, photo_albums_path(parent_id: c.id), remote: true, class: "collapsed" %></li>
64
+ <% end %>
65
+ <% end %>
66
+ </ol>
67
+ <% end %>
68
+ </div>
69
+ </div>
70
+ </div>