dhatu 0.1.18 → 0.1.19

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 (31) hide show
  1. checksums.yaml +5 -5
  2. data/app/controllers/dhatu/categories_controller.rb +1 -1
  3. data/app/controllers/dhatu/projects_controller.rb +93 -0
  4. data/app/models/dhatu/project.rb +134 -0
  5. data/app/models/dhatu/service.rb +2 -4
  6. data/app/views/dhatu/bookings/_index.html.erb +1 -1
  7. data/app/views/dhatu/bookings/_row.html.erb +1 -1
  8. data/app/views/dhatu/branches/_index.html.erb +0 -2
  9. data/app/views/dhatu/branches/_row.html.erb +3 -1
  10. data/app/views/dhatu/branches/_show.html.erb +9 -0
  11. data/app/views/dhatu/dashboard/_index.html.erb +30 -24
  12. data/app/views/dhatu/prices/_index.html.erb +1 -1
  13. data/app/views/dhatu/prices/_row.html.erb +1 -1
  14. data/app/views/dhatu/projects/_form.html.erb +54 -0
  15. data/app/views/dhatu/projects/_index.html.erb +54 -0
  16. data/app/views/dhatu/projects/_row.html.erb +28 -0
  17. data/app/views/dhatu/projects/_show.html.erb +135 -0
  18. data/app/views/dhatu/projects/index.html.erb +69 -0
  19. data/app/views/dhatu/promotion_attributes/_index.html.erb +1 -1
  20. data/app/views/dhatu/promotion_attributes/_row.html.erb +1 -1
  21. data/app/views/dhatu/promotion_enquiries/_index.html.erb +1 -1
  22. data/app/views/dhatu/promotion_enquiries/_row.html.erb +1 -1
  23. data/app/views/dhatu/services/_index.html.erb +6 -7
  24. data/app/views/dhatu/services/_row.html.erb +5 -4
  25. data/app/views/dhatu/services/index.html.erb +3 -3
  26. data/app/views/layouts/kuppayam/_sidebar.html.erb +24 -18
  27. data/config/routes.rb +8 -0
  28. data/db/migrate/20180101093434_create_projects.rb +23 -0
  29. data/lib/dhatu/version.rb +2 -2
  30. data/lib/tasks/dhatu/data.rake +3 -3
  31. metadata +13 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 8a31c4186a8a046b6b45aedbc0e8b051b2e3ca94
4
- data.tar.gz: 7828c199d77737380d93a7703eb6f3c6bfce9de3
2
+ SHA256:
3
+ metadata.gz: f96798ea3a6687453e80d811e106c2b00d6724da2cd2ec7414a186681fb93df6
4
+ data.tar.gz: 91e348a89e091973132c6b255a5aa3d0ce9b38a9cfa432001db2d86ebd776bca
5
5
  SHA512:
6
- metadata.gz: c2d5692673467bb172246ded35e8ee5d12cdd33e8333b2018c04eb2f78e04901e55ad65fffa86114a345a791d3ce9e3460f1ec6a08ef734d6460483ace234d1b
7
- data.tar.gz: d69aa7af35ac67bd1149b00f2b535dd0f0dc20f62c61d79814f757942f7a5a90e73bc63f5138834b79ebfce5a98388447cdae18cf8c6c068f775073ae34bd0db
6
+ metadata.gz: 95c2d7ff1f07934e0fd7c2a7e1d35c2e869a521f5e67dce854d0c3a280f0215215a73b378d81baece6d5a03aa8b8c2b36163111f2c3ecaaf7efcdcb36c59a20e
7
+ data.tar.gz: bd5684b3f14d216d384f25b73c4b3dec8d317de91d319aa03d2cc110f946a36555699e1d31febfaa5bd035eb5080fc286b6f4a6c9efc1255ed7be9030894a490
@@ -46,7 +46,7 @@ module Dhatu
46
46
  if @r_object.parent_id != previous_parent_id
47
47
  @r_object.parent.set_end_node!
48
48
  previous_category = Dhatu::Category.find_by_id(previous_parent_id)
49
- previous_category.set_end_node!
49
+ previous_category.set_end_node! if previous_category
50
50
  end
51
51
 
52
52
  get_collections if @resource_options[:layout] = :table
@@ -0,0 +1,93 @@
1
+ module Dhatu
2
+ class ProjectsController < ResourceController
3
+
4
+ private
5
+
6
+ def permitted_params
7
+ params.require("dhatu/project").permit(:name, :meta_description, :permalink, :description, :client, :category_id, :priority)
8
+ end
9
+
10
+ def get_collections
11
+ category_ids = Dhatu::Project.distinct.pluck(:category_id)
12
+ @categories = Dhatu::Category.where(id: category_ids).to_a
13
+ @categories.unshift(Dhatu::Category.new(id: -1, name: "All"))
14
+
15
+ @relation = Dhatu::Project.includes(:cover_image).where("")
16
+ # params[:st] = "published" if params[:st].nil?
17
+
18
+ parse_filters
19
+ apply_filters
20
+
21
+ @projects = @r_objects = @relation.page(@current_page).per(@per_page)
22
+ return true
23
+ end
24
+
25
+ def apply_filters
26
+ @category = Dhatu::Category.find_by_id(params[:ct]) || Dhatu::Category.new(id: -1, name: "All")
27
+
28
+ if @category && @category.id != -1
29
+ @relation = @relation.where("category_id = ?", @category.id)
30
+ end
31
+
32
+ @relation = @relation.search(@query) if @query
33
+ @relation = @relation.status(@status) if @status
34
+ @relation = @relation.order("priority ASC, name ASC")
35
+ end
36
+
37
+ def configure_filter_settings
38
+ @filter_settings = {
39
+ string_filters: [
40
+ { filter_name: :query },
41
+ { filter_name: :status }
42
+ ],
43
+
44
+ boolean_filters: [],
45
+
46
+ reference_filters: [],
47
+ variable_filters: [],
48
+ }
49
+ end
50
+
51
+ def configure_filter_ui_settings
52
+ @filter_ui_settings = {
53
+ status: {
54
+ object_filter: false,
55
+ select_label: "Select Status",
56
+ display_hash: Dhatu::Project::STATUS,
57
+ current_value: @status,
58
+ values: Dhatu::Project::STATUS_REVERSE,
59
+ current_filters: @filters,
60
+ filters_to_remove: [],
61
+ filters_to_add: {},
62
+ url_method_name: 'projects_url',
63
+ show_all_filter_on_top: true
64
+ }
65
+ }
66
+ end
67
+
68
+ def resource_controller_configuration
69
+ {
70
+ page_title: "Projects",
71
+ js_view_path: "/kuppayam/workflows/peacock",
72
+ view_path: "dhatu/projects",
73
+ collection_name: :projects,
74
+ item_name: :project,
75
+ class: Dhatu::Project
76
+ }
77
+ end
78
+
79
+ def breadcrumbs_configuration
80
+ {
81
+ heading: "Manage Projects",
82
+ icon: "fa-rocket",
83
+ description: "Listing all Projects",
84
+ links: [{name: "Dashboard", link: breadcrumb_home_path, icon: 'fa-dashboard'},
85
+ {name: "Manage Projects", link: dhatu.projects_path, icon: 'fa-rocket', active: true}]
86
+ }
87
+ end
88
+
89
+ def set_navs
90
+ set_nav("project")
91
+ end
92
+ end
93
+ end
@@ -0,0 +1,134 @@
1
+ class Dhatu::Project < Dhatu::ApplicationRecord
2
+
3
+ # Set Table Name
4
+ self.table_name = "projects"
5
+
6
+ # Including the State Machine Methods
7
+ include Publishable
8
+ include Featureable
9
+
10
+ # Validations
11
+ validate_string :name, mandatory: true, min_length: 2, format: /.*/i
12
+ validate_string :meta_description, mandatory: false, format: /.*/i
13
+ validate_string :permalink, mandatory: true, format: /.*/i, min_length: 4, max_length: 128
14
+
15
+ # Associations
16
+ belongs_to :category, optional: true
17
+ has_one :cover_image, :as => :imageable, :dependent => :destroy, :class_name => "Image::CoverImage"
18
+ has_many :gallery_images, :as => :imageable, :dependent => :destroy, :class_name => "Image::GalleryImage"
19
+
20
+ # ------------------
21
+ # Class Methods
22
+ # ------------------
23
+
24
+ scope :search, lambda {|query| where("LOWER(name) LIKE LOWER('%#{query}%') OR\
25
+ LOWER(meta_description) LIKE LOWER('%#{query}%') OR\
26
+ LOWER(permalink) LIKE LOWER('%#{query}%') OR\
27
+ LOWER(description) LIKE LOWER('%#{query}%')")
28
+ }
29
+
30
+ scope :filter_by_category, lambda { |c| where("category_id = ?", (c.is_a? Dhatu::Category ? c.id : c)) }
31
+
32
+ scope :upcoming, lambda { where("created_at >= ?", Time.now) }
33
+ scope :past, lambda { where("created_at < ?", Time.now) }
34
+
35
+ def self.save_row_data(hsh)
36
+ # Initializing error hash for displaying all errors altogether
37
+ error_object = Kuppayam::Importer::ErrorHash.new
38
+
39
+ return error_object if hsh[:name].to_s.strip.blank?
40
+
41
+ project = Dhatu::Project.find_by_name(hsh[:name].to_s.strip) || Dhatu::Project.new
42
+ project.name = hsh[:name].to_s.strip
43
+ project.meta_description = hsh[:meta_description].to_s.strip
44
+ project.description = hsh[:description].to_s.strip
45
+ project.client = hsh[:client].to_s.strip
46
+ project.category = Dhatu::Category.find_by_name(hsh[:category].to_s.strip)
47
+ project.status = hsh[:status].to_s.strip.blank? ? PUBLISHED : hsh[:status].to_s.strip
48
+ project.featured = hsh[:featured].to_s.strip || true
49
+ project.priority = hsh[:priority].to_s.strip || 1
50
+
51
+ project.generate_permalink
52
+
53
+ if project.valid?
54
+ begin
55
+ project.save!
56
+ rescue Exception => e
57
+ summary = "uncaught #{e} exception while handling connection: #{e.message}"
58
+ details = "Stack trace: #{e.backtrace.map {|l| " #{l}\n"}.join}"
59
+ error_object.errors << { summary: summary, details: details }
60
+ end
61
+ else
62
+ summary = "Error while saving project: #{project.name}"
63
+ details = "Error! #{project.errors.full_messages.to_sentence}"
64
+ error_object.errors << { summary: summary, details: details }
65
+ end
66
+ return error_object
67
+ end
68
+
69
+ # Image Configuration
70
+ # -------------
71
+ def self.image_configuration
72
+ {
73
+ "Image::CoverImage" => {
74
+ max_upload_limit: 10485760,
75
+ min_upload_limit: 1,
76
+ resolutions: [800, 400],
77
+ form_upload_image_label: "Upload a new Image",
78
+ form_title: "Upload an Image",
79
+ form_sub_title: "Please read the instructions below:",
80
+ form_instructions: [
81
+ "the filename should be in .jpg / .jpeg or .png format",
82
+ "the image resolutions should be <strong>800 x 400 Pixels</strong>",
83
+ "the file size should be greater than 100 Kb and or lesser than <strong>10 MB</strong>",
84
+ "Note: most cameras and camera phones will produce images bigger than this"
85
+ ]
86
+ },
87
+ "Image::GalleryImage" => {
88
+ max_upload_limit: 10485760,
89
+ min_upload_limit: 1,
90
+ resolutions: [800, 400],
91
+ form_upload_image_label: "Upload a new Image",
92
+ form_title: "Upload an Image",
93
+ form_sub_title: "Please read the instructions below:",
94
+ form_instructions: [
95
+ "the filename should be in .jpg / .jpeg or .png format",
96
+ "the image resolutions should be <strong>800 x 400 Pixels</strong>",
97
+ "the file size should be greater than 100 Kb and or lesser than <strong>10 MB</strong>",
98
+ "Note: most cameras and camera phones will produce images bigger than this"
99
+ ]
100
+ }
101
+ }
102
+
103
+ end
104
+
105
+ # ------------------
106
+ # Instance Methods
107
+ # ------------------
108
+
109
+ # Generic Methods
110
+ # ---------------
111
+ def to_param
112
+ "#{id}-#{name.parameterize[0..32]}"
113
+ end
114
+
115
+ def generate_permalink
116
+ self.permalink = self.name.parameterize[0..32]
117
+ end
118
+
119
+ def display_name
120
+ "#{name_was}"
121
+ end
122
+
123
+ # Permission Methods
124
+ # ------------------
125
+
126
+ def can_be_edited?
127
+ status?(:published) or status?(:unpublished)
128
+ end
129
+
130
+ def can_be_deleted?
131
+ status?(:removed)
132
+ end
133
+
134
+ end
@@ -12,10 +12,8 @@ class Dhatu::Service < Dhatu::ApplicationRecord
12
12
  validate_string :meta_description, mandatory: false, format: /.*/i
13
13
  validate_string :permalink, mandatory: true, format: /.*/i, min_length: 4, max_length: 128
14
14
 
15
- validates :category, presence: true
16
-
17
15
  # Associations
18
- belongs_to :category
16
+ belongs_to :category, optional: true
19
17
  has_one :cover_image, :as => :imageable, :dependent => :destroy, :class_name => "Image::CoverImage"
20
18
  has_many :gallery_images, :as => :imageable, :dependent => :destroy, :class_name => "Image::GalleryImage"
21
19
 
@@ -48,7 +46,7 @@ class Dhatu::Service < Dhatu::ApplicationRecord
48
46
  service.price = hsh[:price].to_s.strip
49
47
  service.duration = hsh[:duration].to_s.strip
50
48
  service.category = Dhatu::Category.find_by_name(hsh[:category].to_s.strip)
51
- service.status = hsh[:status].to_s.strip || PUBLISHED
49
+ service.status = hsh[:status].to_s.strip.blank? ? PUBLISHED : hsh[:status].to_s.strip
52
50
  service.featured = hsh[:featured].to_s.strip || true
53
51
  service.priority = hsh[:priority].to_s.strip || 1
54
52
 
@@ -27,7 +27,7 @@
27
27
  <%= link_to booking.name, booking_path(booking), remote: true %>
28
28
  <% end %>
29
29
  &nbsp;<%= display_readable_status(booking) %><br>
30
- <%= link_to time_ago_in_words(booking.created_at) + " ago", booking_path(booking), remote: true, style: "color:darkred;font-size:10px;" %>
30
+ <%= link_to time_ago_in_words(booking.created_at) + " ago", booking_path(booking), remote: true, style: "color:chocolate;font-size:10px;" %>
31
31
  </td>
32
32
 
33
33
  <td class=""><%= truncate booking.message, length: 30 %></td>
@@ -5,7 +5,7 @@
5
5
 
6
6
  <td class="display-link">
7
7
  <%= link_to booking.name, booking_path(booking), remote: true %><br>
8
- <%#= link_to booking.category.try(:display_name), booking_path(booking), remote: true, style: "color:darkred" %>
8
+ <%#= link_to booking.category.try(:display_name), booking_path(booking), remote: true, style: "color:chocolate" %>
9
9
  </td>
10
10
 
11
11
  <td class=""><%= truncate booking.message, length: 30 %></td>
@@ -14,7 +14,6 @@
14
14
  <tbody>
15
15
  <tr id="tr_branch_0"></tr>
16
16
  <% @branches.each_with_index do |branch, i| %>
17
-
18
17
  <tr id="tr_branch_<%= branch.id %>">
19
18
 
20
19
  <th scope="row" style="text-align: center;">
@@ -50,7 +49,6 @@
50
49
  <%= display_manage_links(branch, @current_user) %>
51
50
  </td>
52
51
  <% end %>
53
-
54
52
  </tr>
55
53
  <% end %>
56
54
  </tbody>
@@ -14,7 +14,9 @@
14
14
 
15
15
  <td class="hidden-sm hidden-xs"><%= display_publishable_status(branch) %></td>
16
16
 
17
- <td class="action-links hidden-sm hidden-xs" style="width:10%"><%= display_publishable_links(branch) %></td>
17
+ <td class="action-links hidden-sm hidden-xs" style="width:10%">
18
+ <%= display_publishable_links(branch) %>
19
+ </td>
18
20
 
19
21
  <% if display_manage_links? %>
20
22
  <td class="action-links hidden-sm hidden-xs" style="width:10%">
@@ -98,6 +98,15 @@
98
98
  <%= display_manage_buttons(@branch) %>
99
99
  <%= display_publishable_buttons(@branch) %>
100
100
  <%= display_featurable_buttons(@branch) %>
101
+ <% if display_edit_links? %>
102
+ <% if @branch.main_branch? %>
103
+ <!-- Remove Branch -->
104
+ <%= link_to raw("<i class=\"fa fa-check mr-5\"></i> Remove Main Branch"), remove_main_branch_path(:id =>@branch.id), :method =>'PUT', :remote=>true, role: "menuitem", tabindex: "-1", :class=>"btn btn-block btn-danger btn-only-hover" %>
105
+ <% else %>
106
+ <!-- Main Branch -->
107
+ <%= link_to raw("<i class=\"fa fa-check mr-5\"></i> Make this Main Branch"), make_main_branch_path(:id =>@branch.id), :method =>'PUT', :remote=>true, role: "menuitem", tabindex: "-1", :class=>"btn btn-block btn-success btn-only-hover" %>
108
+ <% end %>
109
+ <% end %>
101
110
  </div>
102
111
  <% end %>
103
112
 
@@ -1,5 +1,35 @@
1
1
  <%
2
2
  dhatu_items = {
3
+ section_types: {
4
+ text: "Section Types",
5
+ icon_class: "fa-reorder",
6
+ url: dhatu.section_types_url,
7
+ has_permission: @current_user.has_read_permission?(Dhatu::SectionType)
8
+ },
9
+ sections: {
10
+ text: "Sections",
11
+ icon_class: "fa-reorder",
12
+ url: dhatu.sections_url,
13
+ has_permission: @current_user.has_read_permission?(Dhatu::Section)
14
+ },
15
+ categories: {
16
+ text: "Categories",
17
+ icon_class: "fa-sitemap",
18
+ url: dhatu.categories_url,
19
+ has_permission: @current_user.has_read_permission?(Dhatu::Category)
20
+ },
21
+ projects: {
22
+ text: "Projects",
23
+ icon_class: "fa-rocket",
24
+ url: dhatu.projects_url,
25
+ has_permission: @current_user.has_read_permission?(Dhatu::Project)
26
+ },
27
+ services: {
28
+ text: "Services",
29
+ icon_class: "fa-glass",
30
+ url: dhatu.services_url,
31
+ has_permission: @current_user.has_read_permission?(Dhatu::Service)
32
+ },
3
33
  promotions: {
4
34
  text: "Promotions",
5
35
  icon_class: "fa-gift",
@@ -18,24 +48,12 @@
18
48
  url: dhatu.bookings_url,
19
49
  has_permission: @current_user.has_read_permission?(Dhatu::Booking)
20
50
  },
21
- sections: {
22
- text: "Sections",
23
- icon_class: "fa-reorder",
24
- url: dhatu.sections_url,
25
- has_permission: @current_user.has_read_permission?(Dhatu::Section)
26
- },
27
51
  blog_posts: {
28
52
  text: "Blog",
29
53
  icon_class: "fa-newspaper-o",
30
54
  url: dhatu.blog_posts_url,
31
55
  has_permission: @current_user.has_read_permission?(Dhatu::BlogPost)
32
56
  },
33
- services: {
34
- text: "Services",
35
- icon_class: "fa-glass",
36
- url: dhatu.services_url,
37
- has_permission: @current_user.has_read_permission?(Dhatu::Service)
38
- },
39
57
  prices: {
40
58
  text: "Prices",
41
59
  icon_class: "fa-dollar",
@@ -71,18 +89,6 @@
71
89
  icon_class: "fa-group",
72
90
  url: dhatu.team_members_url,
73
91
  has_permission: @current_user.has_read_permission?(Dhatu::TeamMember)
74
- },
75
- categories: {
76
- text: "Categories",
77
- icon_class: "fa-sitemap",
78
- url: dhatu.categories_url,
79
- has_permission: @current_user.has_read_permission?(Dhatu::Category)
80
- },
81
- section_types: {
82
- text: "Section Types",
83
- icon_class: "fa-reorder",
84
- url: dhatu.section_types_url,
85
- has_permission: @current_user.has_read_permission?(Dhatu::SectionType)
86
92
  }
87
93
  }
88
94
  %>
@@ -23,7 +23,7 @@
23
23
 
24
24
  <td class="display-link">
25
25
  <%= link_to price.title, price_path(price), remote: true %><br>
26
- <%= link_to price.category.try(:display_name), price_path(price), remote: true, style: "color:darkred" %>
26
+ <%= link_to price.category.try(:display_name), price_path(price), remote: true, style: "color:chocolate" %>
27
27
  </td>
28
28
 
29
29
  <td class="hidden-sm hidden-xs"><%= price.price %></td>
@@ -5,7 +5,7 @@
5
5
 
6
6
  <td class="display-link">
7
7
  <%= link_to price.title, price_path(price), remote: true %><br>
8
- <%= link_to price.category.try(:display_name), price_path(price), remote: true, style: "color:darkred" %>
8
+ <%= link_to price.category.try(:display_name), price_path(price), remote: true, style: "color:chocolate" %>
9
9
  </td>
10
10
 
11
11
  <td class="hidden-sm hidden-xs"><%= price.price %></td>
@@ -0,0 +1,54 @@
1
+ <%= form_for(@project,
2
+ :url => (@project.new_record? ? dhatu.projects_path : dhatu.project_path),
3
+ :method => (@project.new_record? ? :post : :put),
4
+ :remote => true,
5
+ :html => {:id=>"form_project", :class=>"mb-0 form-horizontal"}) do |f| %>
6
+
7
+ <div id="project_form_error">
8
+ <%= @project.errors[:base].to_sentence %>
9
+ </div>
10
+
11
+ <div class="form-inputs m-15">
12
+
13
+ <%= theme_form_field(@project, :name, required: true, form_style: "top-bottom", html_options: { placeholder: "", "data-id": @project.id.to_s}) %>
14
+
15
+ <div class="row">
16
+ <div class="col-md-4 pr-20">
17
+ <% options = {assoc_collection: Dhatu::Category.filter_by_category_type("Dhatu::Project").published.select("id, name").order("priority ASC, name ASC").all, editable: true, assoc_display_method: :name, required: false} %>
18
+ <%= theme_form_assoc_group(@project, :category_id, label: "Choose Category", form_style: "top-bottom", **options) %>
19
+ </div>
20
+ <div class="col-md-4 pl-20">
21
+ <%= theme_form_field(@project, :meta_description, required: false, form_style: "top-bottom", html_options: { placeholder: "" }) %>
22
+ </div>
23
+ <div class="col-md-4 pl-20">
24
+ <% if @project.new_record? || @current_user.super_admin? %>
25
+ <%= theme_form_field(@project, :permalink, form_style: "top-bottom", html_options: { placeholder: ""}) %>
26
+ <% else %>
27
+ <%= theme_form_field(@project, :permalink, form_style: "top-bottom", html_options: { placeholder: "", readonly: true}) %>
28
+ <% end %>
29
+ </div>
30
+ </div>
31
+
32
+ <%= theme_form_field(@project, :description, required: true, html_options: {type: :textarea, class: "form-control wysihtml5", "data-stylesheet-url": "assets/wysiwyg-color.css"}, form_style: "top-bottom") %>
33
+
34
+ <div class="row">
35
+ <div class="col-md-4 pr-20">
36
+ <%= theme_form_field(@project, :client, required: false, form_style: "top-bottom", html_options: { placeholder: "" }) %>
37
+ </div>
38
+ <div class="col-md-4 pl-20">
39
+ <%= theme_form_field(@project, :priority, required: false, form_style: "top-bottom", html_options: { placeholder: "" }) %>
40
+ </div>
41
+ </div>
42
+
43
+ </div>
44
+
45
+ <div>
46
+ <%= submit_tag("Save", :class=>"btn btn-primary pull-right ml-10") %>
47
+
48
+ <%= link_to raw("<i class='fa fa-close mr-5'></i><span>Cancel</span>"), "#", onclick: "closeLargeModal();", class: "pull-right btn btn-white" %>
49
+ </div>
50
+
51
+ <%= clear_tag %>
52
+
53
+ <% end %>
54
+
@@ -0,0 +1,54 @@
1
+ <div class="table-responsive">
2
+ <table class="table table-hover members-table middle-align">
3
+ <thead>
4
+ <tr>
5
+ <th style="text-align: center;width:5%">#</th>
6
+ <th style="text-align: center;width:100px"><i class="fa fa-photo"></i></th>
7
+ <th>Project Name</th>
8
+ <% if display_manage_links? %>
9
+ <th style="text-align: center;" colspan="2" class="hidden-sm hidden-xs">Actions</th>
10
+ <% end %>
11
+ </tr>
12
+ </thead>
13
+ <tbody>
14
+ <tr id="tr_project_0"></tr>
15
+ <% @projects.each_with_index do |project, i| %>
16
+
17
+ <tr id="tr_project_<%= project.id %>">
18
+
19
+ <th scope="row" style="text-align: center;">
20
+ <%= serial_number(i) %>
21
+ </th>
22
+
23
+ <td class="display-image">
24
+ <%= display_thumbnail_small(project) %>
25
+ </td>
26
+
27
+ <td class="display-link">
28
+ <%= link_to project.name, project_path(project), remote: true, style: "color: chocolate;font-size:16px;" %><br>
29
+ <%= link_to project.category.try(:display_name), project_path(project), remote: true %><br>
30
+ <p style="color:#898989;"><%= project.meta_description %></p>
31
+ <%= display_publishable_status(project) %>
32
+ <%= display_featured(project) %>
33
+ </td>
34
+
35
+ <% if display_manage_links? %>
36
+ <td class="action-links hidden-sm hidden-xs" style="width:10%"><%= display_publishable_links(project) %></td>
37
+
38
+ <td class="action-links hidden-sm hidden-xs" style="width:10%">
39
+ <%= display_featurable_links(project) %>
40
+ <%= display_manage_links(project, @current_user) %>
41
+ </td>
42
+ <% end %>
43
+
44
+ </tr>
45
+ <% end %>
46
+ </tbody>
47
+ </table>
48
+ </div>
49
+
50
+ <div class="row">
51
+ <div class="col-sm-12">
52
+ <%= paginate_kuppayam(@projects) %>
53
+ </div>
54
+ </div>
@@ -0,0 +1,28 @@
1
+ <tr id="tr_project_<%= project.id %>">
2
+
3
+ <th scope="row" style="text-align: center;">
4
+ <%= serial_number(i) %>
5
+ </th>
6
+
7
+ <td class="display-image">
8
+ <%= display_thumbnail_small(project) %>
9
+ </td>
10
+
11
+ <td class="display-link">
12
+ <%= link_to project.name, project_path(project), remote: true, style: "color: chocolate;font-size:16px;" %><br>
13
+ <%= link_to project.category.try(:display_name), project_path(project), remote: true %><br>
14
+ <p style="color:#898989;"><%= project.meta_description %></p>
15
+ <%= display_publishable_status(project) %>
16
+ <%= display_featured(project) %>
17
+ </td>
18
+
19
+ <% if display_manage_links? %>
20
+ <td class="action-links hidden-sm hidden-xs" style="width:10%"><%= display_publishable_links(project) %></td>
21
+
22
+ <td class="action-links hidden-sm hidden-xs" style="width:10%">
23
+ <%= display_featurable_links(project) %>
24
+ <%= display_manage_links(project, @current_user) %>
25
+ </td>
26
+ <% end %>
27
+
28
+ </tr>
@@ -0,0 +1,135 @@
1
+ <div id="div_project_show">
2
+
3
+ <div class="row">
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(@project,
8
+ "cover_image.image.large.url",
9
+ upload_image_link(@project, :cover_image, nil ),
10
+ remove_image_link(@project, :cover_image, nil ),
11
+ image_options: {assoc_name: :cover_image }) %>
12
+ <% else %>
13
+ <%= display_image(@project, "cover_image.image.large.url", class: "img-inline", alt: @project.display_name) %>
14
+ <% end %>
15
+ </div>
16
+
17
+ <div class="col-md-6 col-sm-12 col-xs-12" style="border-right:1px solid #f1f1f1;">
18
+
19
+ <%= theme_panel_heading(@project.name) %>
20
+
21
+ <%= theme_panel_sub_heading(@project.category.try(:display_name), "#") if @project.category %>
22
+
23
+ <%= clear_tag(10) %>
24
+
25
+ <div class="well">
26
+ <%= @project.meta_description %>
27
+ </div>
28
+
29
+ <%= clear_tag(10) %>
30
+
31
+ <%= display_publishable_status(@project) %>
32
+
33
+ <%= display_featured(@project) %>
34
+
35
+ <%= clear_tag(20) %>
36
+
37
+ </div>
38
+
39
+ <% if display_manage_links? %>
40
+ <div class="col-md-3 col-sm-12 col-xs-12">
41
+ <%= display_manage_buttons(@project) %>
42
+ <%= display_publishable_buttons(@project) %>
43
+ <%= display_featurable_buttons(@project) %>
44
+ </div>
45
+ <% end %>
46
+
47
+ </div>
48
+
49
+ <hr>
50
+
51
+ <div class="visible-sm visible-xs mb-50"></div>
52
+
53
+ <%= clear_tag(20) %>
54
+
55
+ <ul class="nav nav-pills">
56
+ <li class="active">
57
+ <a href="#project_details" data-toggle="tab" aria-expanded="false">
58
+ <span class="visible-xs"><i class="fa-database"></i></span>
59
+ <span class="hidden-xs">Project Details</span>
60
+ </a>
61
+ </li>
62
+
63
+ <li class="">
64
+ <a href="#project_images" data-toggle="tab" aria-expanded="false">
65
+ <span class="visible-xs"><i class="fa-database"></i></span>
66
+ <span class="hidden-xs">Images</span>
67
+ </a>
68
+ </li>
69
+
70
+ <li class="">
71
+ <a href="#technical_details" data-toggle="tab" aria-expanded="false">
72
+ <span class="visible-xs"><i class="fa-database"></i></span>
73
+ <span class="hidden-xs">Technical Details</span>
74
+ </a>
75
+ </li>
76
+ </ul>
77
+
78
+ <div class="tab-content">
79
+ <div class="tab-pane active" id="project_details" style="border: 1px solid #000;min-height:200px;padding:20px;margin-bottom:20px;max-height: 400px;overflow-y: auto;">
80
+
81
+ <%= clear_tag(20) %>
82
+ <strong>Description</strong>
83
+ <%= raw(@project.description) %>
84
+ <%= clear_tag(20) %>
85
+
86
+ </div>
87
+
88
+ <div class="tab-pane" id="project_images" style="border: 1px solid #000;min-height:200px;padding:20px;margin-bottom:20px;max-height: 400px;overflow-y: auto;">
89
+
90
+ <%= clear_tag(20) %>
91
+
92
+ <div id="div_project_images_buttons">
93
+ <div class="row">
94
+ <div class="col-md-6">
95
+ <%= theme_button('Upload a New Image', 'refresh', upload_multiple_image_link(@project, :gallery_images, nil ), classes: "pull-left", btn_type: "white") %>
96
+ </div>
97
+ <div class="col-md-6">
98
+ </div>
99
+ </div>
100
+ </div>
101
+ <%= clear_tag(10) %>
102
+
103
+ <%= render :partial=>"kuppayam/images/multiple_images", locals: { images: @project.gallery_images } %>
104
+
105
+ </div>
106
+
107
+ <div class="tab-pane" id="technical_details" style="border: 1px solid #000;min-height:200px;padding:20px;margin-bottom:20px;max-height: 400px;overflow-y: auto;">
108
+
109
+ <%= clear_tag(20) %>
110
+
111
+ <div class="table-responsive">
112
+ <table class="table table-striped table-condensed table-bordered mb-60">
113
+ <tbody>
114
+
115
+ <tr>
116
+ <th>ID</th><td><%= @project.id %></td>
117
+ <th>Status</th><td><%= @project.status %></td>
118
+ </tr>
119
+ <tr>
120
+ <th>Created At</th><td><%= @project.created_at.strftime("%m/%d/%Y - %H:%M:%S") if @project.created_at %></td>
121
+ <th>Updated At</th><td><%= @project.updated_at.strftime("%m/%d/%Y - %H:%M:%S") if @project.updated_at %></td>
122
+ </tr>
123
+
124
+ </tbody>
125
+ </table>
126
+ </div>
127
+
128
+ </div>
129
+ </div>
130
+
131
+ <%= link_to "Close", "#", onclick: "closeLargeModal();", class: "btn btn-primary pull-right" %>
132
+
133
+ <%= clear_tag %>
134
+
135
+ </div>
@@ -0,0 +1,69 @@
1
+ <div class="row">
2
+
3
+ <div class="col-md-12">
4
+
5
+ <div class="tabs-vertical-env">
6
+
7
+ <ul id="div_category_types" class="nav tabs-vertical">
8
+ <% @categories.each do |ct| %>
9
+ <li class="<%= ct == @category ? 'active' : '' %>">
10
+ <%= link_to ct.name, projects_path(ct: ct.id) %>
11
+ </li>
12
+ <% end %>
13
+ </ul>
14
+
15
+ <!-- <ul class="nav nav-tabs nav-tabs-justified">
16
+ <%# Dhatu::Project::STATUS.each do |key, value| %>
17
+ <li class="<%#= @status == value ? 'active' : '' %>">
18
+ <%#= link_to dhatu.projects_path(st: value), "aria-expanded" => "#{ @status == value ? 'true' : 'false' }" do %>
19
+ <span class="visible-xs"><i class="fa-gift"></i></span>
20
+ <span class="hidden-xs"><%#= key %></span>
21
+ <%# end %>
22
+ </li>
23
+ <%# end %>
24
+ </ul> -->
25
+
26
+ <div class="tab-content">
27
+ <div class="tab-pane active">
28
+
29
+ <div id="div_project_action_buttons">
30
+ <div class="row">
31
+ <div class="col-sm-6">
32
+ <%= theme_button('Add a Project', 'plus', dhatu.new_project_path(ct: @category.try(:id)), classes: "pull-left mr-10", btn_type: "success") if @current_user.has_create_permission?(Dhatu::Project) %>
33
+
34
+ <%= theme_button('Refresh', 'refresh', dhatu.projects_path(ct: @category.try(:id)), classes: "pull-left mr-10", btn_type: "white") %>
35
+ </div>
36
+ <div class="col-sm-6">
37
+ <%= search_form_kuppayam(Dhatu::Project, dhatu.projects_path(), text: @filters[:query]) %>
38
+ </div>
39
+ </div>
40
+
41
+ </div>
42
+ <%= clear_tag(10) %>
43
+
44
+ <div id="div_project_index">
45
+ <%= render :partial=>"dhatu/projects/index" %>
46
+ </div>
47
+ <%= clear_tag(10) %>
48
+
49
+ </div>
50
+ </div>
51
+
52
+ </div>
53
+
54
+ </div>
55
+
56
+ </div>
57
+
58
+ <script type="text/javascript">
59
+ $('body').on('change', '#inp_name', function() {
60
+ var projectId = $('#inp_permalink').data("id");
61
+ if(projectId){
62
+ } else {
63
+ var permalink = convertToSlug($(this).val()).slice(0, 63);
64
+ $('#inp_permalink').val(permalink);
65
+ }
66
+ });
67
+ </script>
68
+
69
+
@@ -30,7 +30,7 @@
30
30
 
31
31
  <td class="promotion_attribute-name">
32
32
  <strong><%= link_to promotion_attribute.name, promotion_attribute_path(promotion_attribute), remote: true %></strong><br>
33
- <%= content_tag :span, promotion_attribute.display_data_type, style: "color:darkred;" %><br>
33
+ <%= content_tag :span, promotion_attribute.display_data_type, style: "color:chocolate;" %><br>
34
34
  </td>
35
35
 
36
36
  <td style="text-align: center;">
@@ -10,7 +10,7 @@
10
10
 
11
11
  <td class="promotion_attribute-name">
12
12
  <strong><%= link_to promotion_attribute.name, promotion_attribute_path(promotion_attribute), remote: true %></strong><br>
13
- <%= content_tag :span, promotion_attribute.display_data_type, style: "color:darkred;" %><br>
13
+ <%= content_tag :span, promotion_attribute.display_data_type, style: "color:chocolate;" %><br>
14
14
  </td>
15
15
 
16
16
  <td style="text-align: center;">
@@ -28,7 +28,7 @@
28
28
  <%= link_to promotion_enquiry.name, promotion_enquiry_path(promotion_enquiry), remote: true %>
29
29
  <% end %>
30
30
  &nbsp;<%= display_readable_status(promotion_enquiry) %><br>
31
- <%= link_to time_ago_in_words(promotion_enquiry.created_at) + " ago", promotion_enquiry_path(promotion_enquiry), remote: true, style: "color:darkred;font-size:10px;" %>
31
+ <%= link_to time_ago_in_words(promotion_enquiry.created_at) + " ago", promotion_enquiry_path(promotion_enquiry), remote: true, style: "color:chocolate;font-size:10px;" %>
32
32
  </td>
33
33
 
34
34
  <td class=""><%= promotion_enquiry.email %></td>
@@ -11,7 +11,7 @@
11
11
  <%= link_to promotion_enquiry.name, promotion_enquiry_path(promotion_enquiry), remote: true %>
12
12
  <% end %>
13
13
  &nbsp;<%= display_readable_status(promotion_enquiry) %><br>
14
- <%= link_to time_ago_in_words(promotion_enquiry.created_at) + " ago", promotion_enquiry_path(promotion_enquiry), remote: true, style: "color:darkred;font-size:10px;" %>
14
+ <%= link_to time_ago_in_words(promotion_enquiry.created_at) + " ago", promotion_enquiry_path(promotion_enquiry), remote: true, style: "color:chocolate;font-size:10px;" %>
15
15
  </td>
16
16
 
17
17
  <td class=""><%= promotion_enquiry.email %></td>
@@ -5,8 +5,6 @@
5
5
  <th style="text-align: center;width:5%">#</th>
6
6
  <th style="text-align: center;width:100px"><i class="fa fa-photo"></i></th>
7
7
  <th>Service Name</th>
8
- <th style="width:200px">Category</th>
9
- <th style="width:100px;" class="hidden-sm hidden-xs">Status</th>
10
8
  <% if display_manage_links? %>
11
9
  <th style="text-align: center;" colspan="2" class="hidden-sm hidden-xs">Actions</th>
12
10
  <% end %>
@@ -27,17 +25,18 @@
27
25
  </td>
28
26
 
29
27
  <td class="display-link">
30
- <%= link_to service.name, service_path(service), remote: true, style: "color: darkred;font-size:16px;" %><br>
28
+ <%= link_to service.name, service_path(service), remote: true, style: "color: chocolate;font-size:16px;" %><br>
31
29
  <%= link_to service.category.try(:display_name), service_path(service), remote: true %><br>
32
- <%= service.meta_description %>
30
+ <p style="color:#898989;"><%= service.meta_description %></p><br>
31
+ <%= display_publishable_status(service) %>
32
+ <%= display_featured(service) %>
33
33
  </td>
34
34
 
35
- <td class="hidden-sm hidden-xs"><%= display_publishable_status(service) %></td>
36
-
37
- <% if display_manage_links? %>
35
+ <% if display_manage_links? %>
38
36
  <td class="action-links hidden-sm hidden-xs" style="width:10%"><%= display_publishable_links(service) %></td>
39
37
 
40
38
  <td class="action-links hidden-sm hidden-xs" style="width:10%">
39
+ <%= display_featurable_links(service) %>
41
40
  <%= display_manage_links(service, @current_user) %>
42
41
  </td>
43
42
  <% end %>
@@ -9,17 +9,18 @@
9
9
  </td>
10
10
 
11
11
  <td class="display-link">
12
- <%= link_to service.name, service_path(service), remote: true, style: "color: darkred;font-size:16px;" %><br>
12
+ <%= link_to service.name, service_path(service), remote: true, style: "color: chocolate;font-size:16px;" %><br>
13
13
  <%= link_to service.category.try(:display_name), service_path(service), remote: true %><br>
14
- <%= service.meta_description %>
14
+ <p style="color:#898989;"><%= service.meta_description %></p><br>
15
+ <%= display_publishable_status(service) %>
16
+ <%= display_featured(service) %>
15
17
  </td>
16
18
 
17
- <td class="hidden-sm hidden-xs"><%= display_publishable_status(service) %></td>
18
-
19
19
  <% if display_manage_links? %>
20
20
  <td class="action-links hidden-sm hidden-xs" style="width:10%"><%= display_publishable_links(service) %></td>
21
21
 
22
22
  <td class="action-links hidden-sm hidden-xs" style="width:10%">
23
+ <%= display_featurable_links(service) %>
23
24
  <%= display_manage_links(service, @current_user) %>
24
25
  </td>
25
26
  <% end %>
@@ -29,12 +29,12 @@
29
29
  <div id="div_service_action_buttons">
30
30
  <div class="row">
31
31
  <div class="col-sm-6">
32
- <%= theme_button('Add a Service', 'plus', dhatu.new_service_path(), classes: "pull-left mr-10", btn_type: "success") if @current_user.has_create_permission?(Dhatu::Service) %>
32
+ <%= theme_button('Add a Service', 'plus', dhatu.new_service_path(ct: @category.try(:id)), classes: "pull-left mr-10", btn_type: "success") if @current_user.has_create_permission?(Dhatu::Service) %>
33
33
 
34
- <%= theme_button('Refresh', 'refresh', dhatu.services_path(st: @status), classes: "pull-left mr-10", btn_type: "white") %>
34
+ <%= theme_button('Refresh', 'refresh', dhatu.services_path(ct: @category.try(:id)), classes: "pull-left mr-10", btn_type: "white") %>
35
35
  </div>
36
36
  <div class="col-sm-6">
37
- <%= search_form_kuppayam(Dhatu::Service, dhatu.services_path(st: @status), text: @filters[:query]) %>
37
+ <%= search_form_kuppayam(Dhatu::Service, dhatu.services_path(), text: @filters[:query]) %>
38
38
  </div>
39
39
  </div>
40
40
 
@@ -1,5 +1,29 @@
1
1
  <%
2
2
  dhatu_items = {
3
+ sections: {
4
+ text: "Sections",
5
+ icon_class: "fa-reorder",
6
+ url: dhatu.sections_url,
7
+ has_permission: @current_user.has_read_permission?(Dhatu::Section)
8
+ },
9
+ categories: {
10
+ text: "Categories",
11
+ icon_class: "fa-sitemap",
12
+ url: dhatu.categories_url,
13
+ has_permission: @current_user.has_read_permission?(Dhatu::Category)
14
+ },
15
+ projects: {
16
+ text: "Projects",
17
+ icon_class: "fa-rocket",
18
+ url: dhatu.projects_url,
19
+ has_permission: @current_user.has_read_permission?(Dhatu::Project)
20
+ },
21
+ services: {
22
+ text: "Services",
23
+ icon_class: "fa-glass",
24
+ url: dhatu.services_url,
25
+ has_permission: @current_user.has_read_permission?(Dhatu::Service)
26
+ },
3
27
  promotions: {
4
28
  text: "Promotions",
5
29
  icon_class: "fa-gift",
@@ -18,24 +42,12 @@
18
42
  url: dhatu.bookings_url,
19
43
  has_permission: @current_user.has_read_permission?(Dhatu::Booking)
20
44
  },
21
- sections: {
22
- text: "Sections",
23
- icon_class: "fa-reorder",
24
- url: dhatu.sections_url,
25
- has_permission: @current_user.has_read_permission?(Dhatu::Section)
26
- },
27
45
  blog_posts: {
28
46
  text: "Blog",
29
47
  icon_class: "fa-newspaper-o",
30
48
  url: dhatu.blog_posts_url,
31
49
  has_permission: @current_user.has_read_permission?(Dhatu::BlogPost)
32
50
  },
33
- services: {
34
- text: "Services",
35
- icon_class: "fa-glass",
36
- url: dhatu.services_url,
37
- has_permission: @current_user.has_read_permission?(Dhatu::Service)
38
- },
39
51
  prices: {
40
52
  text: "Prices",
41
53
  icon_class: "fa-dollar",
@@ -71,12 +83,6 @@
71
83
  icon_class: "fa-group",
72
84
  url: dhatu.team_members_url,
73
85
  has_permission: @current_user.has_read_permission?(Dhatu::TeamMember)
74
- },
75
- categories: {
76
- text: "Categories",
77
- icon_class: "fa-sitemap",
78
- url: dhatu.categories_url,
79
- has_permission: @current_user.has_read_permission?(Dhatu::Category)
80
86
  }
81
87
  }
82
88
  %>
@@ -42,6 +42,14 @@ Dhatu::Engine.routes.draw do
42
42
  end
43
43
  end
44
44
 
45
+ resources :projects do
46
+ member do
47
+ put :update_status, as: :update_status
48
+ put :mark_as_featured
49
+ put :remove_from_featured
50
+ end
51
+ end
52
+
45
53
  resources :prices do
46
54
  member do
47
55
  put :update_status, as: :update_status
@@ -0,0 +1,23 @@
1
+ class CreateProjects < ActiveRecord::Migration[5.1]
2
+ def change
3
+ create_table :projects do |t|
4
+ t.string :name, :null => false, limit: 128
5
+ t.string :permalink, :null => false, limit: 128
6
+
7
+ t.string :meta_description, :null => true, limit: 512
8
+ t.text :description
9
+
10
+ t.string :client, :null => false, limit: 128
11
+ t.references :category
12
+
13
+ t.string :status, :null => false, :default=>"unpublished", :limit=>16
14
+ t.boolean :featured, default: false
15
+ t.integer :priority, default: 1, null: false
16
+
17
+ t.timestamps null: false
18
+ end
19
+
20
+ add_index :projects, :permalink, :unique => true
21
+ add_index :projects, :status
22
+ end
23
+ end
@@ -1,3 +1,3 @@
1
1
  module Dhatu
2
- VERSION = '0.1.18'
3
- end
2
+ VERSION = '0.1.19'
3
+ end
@@ -25,7 +25,7 @@ namespace 'dhatu' do
25
25
  puts " "
26
26
  end
27
27
 
28
- ["Dhatu::Category", "Dhatu::Service", "Dhatu::Section", "Dhatu::SectionType", "Dhatu::Event", "Dhatu::Offer", "Dhatu::Price", "Dhatu::Testimonial", "Dhatu::TeamMember", "Dhatu::Branch", "Dhatu::Promotion", "Dhatu::PromotionAttribute", "Dhatu::BlogPost"].each do |cls_name|
28
+ ["Dhatu::Category", "Dhatu::Service", "Dhatu::Project", "Dhatu::Section", "Dhatu::SectionType", "Dhatu::Event", "Dhatu::Offer", "Dhatu::Price", "Dhatu::Testimonial", "Dhatu::TeamMember", "Dhatu::Branch", "Dhatu::Promotion", "Dhatu::PromotionAttribute", "Dhatu::BlogPost"].each do |cls_name|
29
29
  name = cls_name.underscore.pluralize
30
30
  desc "Import #{cls_name.pluralize}"
31
31
  task name => :environment do
@@ -49,7 +49,7 @@ namespace 'dhatu' do
49
49
  desc "Import all dummy data in sequence"
50
50
  task 'all' => :environment do
51
51
 
52
- import_list = ["dhatu/services", "dhatu/sections", "dhatu/section_types", "dhatu/categories", "dhatu/events", "dhatu/offers", "dhatu/prices", "dhatu/testimonials", "dhatu/team_members"]
52
+ import_list = ["dhatu/services", "dhatu/projects", "dhatu/sections", "dhatu/section_types", "dhatu/categories", "dhatu/events", "dhatu/offers", "dhatu/prices", "dhatu/testimonials", "dhatu/team_members"]
53
53
 
54
54
  import_list.each do |item|
55
55
  print "Loading #{item.split(':').last.titleize} \t".yellow
@@ -65,7 +65,7 @@ namespace 'dhatu' do
65
65
  puts " "
66
66
  end
67
67
 
68
- ["Dhatu::Category", "Dhatu::Service", "Dhatu::Section", "Dhatu::SectionType", "Dhatu::Event", "Dhatu::Offer", "Dhatu::Price", "Dhatu::Testimonial", "Dhatu::TeamMember", "Dhatu::Branch", "Dhatu::Promotion", "Dhatu::PromotionAttribute", "Dhatu::BlogPost"].each do |cls_name|
68
+ ["Dhatu::Category", "Dhatu::Service", "Dhatu::Project", "Dhatu::Section", "Dhatu::SectionType", "Dhatu::Event", "Dhatu::Offer", "Dhatu::Price", "Dhatu::Testimonial", "Dhatu::TeamMember", "Dhatu::Branch", "Dhatu::Promotion", "Dhatu::PromotionAttribute", "Dhatu::BlogPost"].each do |cls_name|
69
69
  name = cls_name.underscore.pluralize
70
70
  desc "Load Dummy #{cls_name.pluralize}"
71
71
  task name => :environment do
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.18
4
+ version: 0.1.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - kpvarma
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-12-24 00:00:00.000000000 Z
11
+ date: 2018-01-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -107,7 +107,7 @@ dependencies:
107
107
  version: '0.1'
108
108
  - - ">="
109
109
  - !ruby/object:Gem::Version
110
- version: 0.1.30
110
+ version: 0.1.32
111
111
  type: :runtime
112
112
  prerelease: false
113
113
  version_requirements: !ruby/object:Gem::Requirement
@@ -117,7 +117,7 @@ dependencies:
117
117
  version: '0.1'
118
118
  - - ">="
119
119
  - !ruby/object:Gem::Version
120
- version: 0.1.30
120
+ version: 0.1.32
121
121
  - !ruby/object:Gem::Dependency
122
122
  name: pattana
123
123
  requirement: !ruby/object:Gem::Requirement
@@ -418,6 +418,7 @@ files:
418
418
  - app/controllers/dhatu/events_controller.rb
419
419
  - app/controllers/dhatu/offers_controller.rb
420
420
  - app/controllers/dhatu/prices_controller.rb
421
+ - app/controllers/dhatu/projects_controller.rb
421
422
  - app/controllers/dhatu/promotion_attributes_controller.rb
422
423
  - app/controllers/dhatu/promotion_enquiries_controller.rb
423
424
  - app/controllers/dhatu/promotions_controller.rb
@@ -438,6 +439,7 @@ files:
438
439
  - app/models/dhatu/event.rb
439
440
  - app/models/dhatu/offer.rb
440
441
  - app/models/dhatu/price.rb
442
+ - app/models/dhatu/project.rb
441
443
  - app/models/dhatu/promotion.rb
442
444
  - app/models/dhatu/promotion_attribute.rb
443
445
  - app/models/dhatu/promotion_enquiry.rb
@@ -485,6 +487,11 @@ files:
485
487
  - app/views/dhatu/prices/_row.html.erb
486
488
  - app/views/dhatu/prices/_show.html.erb
487
489
  - app/views/dhatu/prices/index.html.erb
490
+ - app/views/dhatu/projects/_form.html.erb
491
+ - app/views/dhatu/projects/_index.html.erb
492
+ - app/views/dhatu/projects/_row.html.erb
493
+ - app/views/dhatu/projects/_show.html.erb
494
+ - app/views/dhatu/projects/index.html.erb
488
495
  - app/views/dhatu/promotion_attributes/_form.html.erb
489
496
  - app/views/dhatu/promotion_attributes/_index.html.erb
490
497
  - app/views/dhatu/promotion_attributes/_row.html.erb
@@ -567,6 +574,7 @@ files:
567
574
  - db/migrate/20171203114528_change_default_status_of_promotion_enquiries.rb
568
575
  - db/migrate/20171203114529_add_meta_description_to_services.rb
569
576
  - db/migrate/20171203114530_add_control_fields_to_promotions.rb
577
+ - db/migrate/20180101093434_create_projects.rb
570
578
  - lib/dhatu.rb
571
579
  - lib/dhatu/engine.rb
572
580
  - lib/dhatu/factories.rb
@@ -614,7 +622,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
614
622
  version: '0'
615
623
  requirements: []
616
624
  rubyforge_project:
617
- rubygems_version: 2.6.11
625
+ rubygems_version: 2.7.3
618
626
  signing_key:
619
627
  specification_version: 4
620
628
  summary: A simple CMS for your website