dhatu 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.md +114 -0
- data/Rakefile +36 -0
- data/app/assets/config/dhatu_manifest.js +2 -0
- data/app/assets/javascripts/dhatu/application.js +13 -0
- data/app/assets/stylesheets/dhatu/application.css +15 -0
- data/app/controllers/dhatu/application_controller.rb +25 -0
- data/app/controllers/dhatu/blog_posts_controller.rb +84 -0
- data/app/controllers/dhatu/contact_informations_controller.rb +84 -0
- data/app/controllers/dhatu/dashboard_controller.rb +24 -0
- data/app/controllers/dhatu/events_controller.rb +84 -0
- data/app/controllers/dhatu/offers_controller.rb +84 -0
- data/app/controllers/dhatu/resource_controller.rb +13 -0
- data/app/controllers/dhatu/sections_controller.rb +83 -0
- data/app/controllers/dhatu/team_members_controller.rb +84 -0
- data/app/controllers/dhatu/testimonials_controller.rb +84 -0
- data/app/helpers/dhatu/application_helper.rb +4 -0
- data/app/jobs/dhatu/application_job.rb +4 -0
- data/app/mailers/dhatu/application_mailer.rb +6 -0
- data/app/models/dhatu/application_record.rb +8 -0
- data/app/models/dhatu/blog_post.rb +62 -0
- data/app/models/dhatu/contact_information.rb +88 -0
- data/app/models/dhatu/event.rb +56 -0
- data/app/models/dhatu/offer.rb +55 -0
- data/app/models/dhatu/section.rb +82 -0
- data/app/models/dhatu/team_member.rb +59 -0
- data/app/models/dhatu/testimonial.rb +57 -0
- data/app/views/dhatu/blog_posts/_form.html.erb +42 -0
- data/app/views/dhatu/blog_posts/_index.html.erb +58 -0
- data/app/views/dhatu/blog_posts/_row.html.erb +28 -0
- data/app/views/dhatu/blog_posts/_show.html.erb +120 -0
- data/app/views/dhatu/blog_posts/index.html.erb +56 -0
- data/app/views/dhatu/contact_informations/_form.html.erb +104 -0
- data/app/views/dhatu/contact_informations/_index.html.erb +51 -0
- data/app/views/dhatu/contact_informations/_row.html.erb +26 -0
- data/app/views/dhatu/contact_informations/_show.html.erb +150 -0
- data/app/views/dhatu/contact_informations/index.html.erb +46 -0
- data/app/views/dhatu/dashboard/_index.html.erb +58 -0
- data/app/views/dhatu/dashboard/index.html.erb +18 -0
- data/app/views/dhatu/events/_form.html.erb +40 -0
- data/app/views/dhatu/events/_index.html.erb +58 -0
- data/app/views/dhatu/events/_row.html.erb +28 -0
- data/app/views/dhatu/events/_show.html.erb +120 -0
- data/app/views/dhatu/events/index.html.erb +45 -0
- data/app/views/dhatu/offers/_form.html.erb +39 -0
- data/app/views/dhatu/offers/_index.html.erb +57 -0
- data/app/views/dhatu/offers/_row.html.erb +28 -0
- data/app/views/dhatu/offers/_show.html.erb +118 -0
- data/app/views/dhatu/offers/index.html.erb +46 -0
- data/app/views/dhatu/sections/_form.html.erb +60 -0
- data/app/views/dhatu/sections/_index.html.erb +53 -0
- data/app/views/dhatu/sections/_row.html.erb +25 -0
- data/app/views/dhatu/sections/_show.html.erb +152 -0
- data/app/views/dhatu/sections/index.html.erb +53 -0
- data/app/views/dhatu/team_members/_form.html.erb +56 -0
- data/app/views/dhatu/team_members/_index.html.erb +62 -0
- data/app/views/dhatu/team_members/_row.html.erb +35 -0
- data/app/views/dhatu/team_members/_show.html.erb +93 -0
- data/app/views/dhatu/team_members/index.html.erb +46 -0
- data/app/views/dhatu/testimonials/_form.html.erb +36 -0
- data/app/views/dhatu/testimonials/_index.html.erb +64 -0
- data/app/views/dhatu/testimonials/_row.html.erb +36 -0
- data/app/views/dhatu/testimonials/_show.html.erb +133 -0
- data/app/views/dhatu/testimonials/index.html.erb +46 -0
- data/app/views/layouts/dhatu/application.html.erb +14 -0
- data/app/views/layouts/kuppayam/_footer.html.erb +25 -0
- data/app/views/layouts/kuppayam/_header.html.erb +43 -0
- data/app/views/layouts/kuppayam/_navbar.html.erb +55 -0
- data/app/views/layouts/kuppayam/_sidebar.html.erb +219 -0
- data/app/views/pattana/dashboard/_index.html.erb +35 -0
- data/config/routes.rb +63 -0
- data/db/master_data/features.csv +16 -0
- data/lib/dhatu.rb +5 -0
- data/lib/dhatu/engine.rb +31 -0
- data/lib/dhatu/factories.rb +7 -0
- data/lib/dhatu/version.rb +3 -0
- data/lib/tasks/dhatu/data.rake +91 -0
- data/lib/tasks/dhatu/master_data.rake +48 -0
- data/spec/dummy/spec/factories/blog_post.rb +48 -0
- data/spec/dummy/spec/factories/blog_post_cover_image.rb +13 -0
- data/spec/dummy/spec/factories/blog_post_gallery_image.rb +13 -0
- data/spec/dummy/spec/factories/contact_information.rb +63 -0
- data/spec/dummy/spec/factories/event.rb +46 -0
- data/spec/dummy/spec/factories/event_cover_image.rb +13 -0
- data/spec/dummy/spec/factories/event_gallery_image.rb +13 -0
- data/spec/dummy/spec/factories/offer.rb +43 -0
- data/spec/dummy/spec/factories/offer_cover_image.rb +13 -0
- data/spec/dummy/spec/factories/offer_gallery_image.rb +13 -0
- data/spec/dummy/spec/factories/section.rb +50 -0
- data/spec/dummy/spec/factories/section_cover_image.rb +13 -0
- data/spec/dummy/spec/factories/section_gallery_image.rb +13 -0
- data/spec/dummy/spec/factories/team_member.rb +47 -0
- data/spec/dummy/spec/factories/test.jpg +0 -0
- data/spec/dummy/spec/factories/testimonial.rb +44 -0
- metadata +520 -0
@@ -0,0 +1,45 @@
|
|
1
|
+
<div class="row">
|
2
|
+
|
3
|
+
<div class="col-md-12">
|
4
|
+
|
5
|
+
<ul class="nav nav-tabs nav-tabs-justified">
|
6
|
+
<% Dhatu::Event::STATUS.each do |key, value| %>
|
7
|
+
<li class="<%= @status == value ? 'active' : '' %>">
|
8
|
+
<%= link_to events_path(st: value), "aria-expanded" => "#{ @status == value ? 'true' : 'false' }" do %>
|
9
|
+
<span class="visible-xs"><i class="fa-gift"></i></span>
|
10
|
+
<span class="hidden-xs"><%= key %></span>
|
11
|
+
<% end %>
|
12
|
+
</li>
|
13
|
+
<% end %>
|
14
|
+
</ul>
|
15
|
+
<div class="tab-content">
|
16
|
+
<div class="tab-pane active">
|
17
|
+
|
18
|
+
<div id="div_event_action_buttons">
|
19
|
+
|
20
|
+
<div class="row">
|
21
|
+
<div class="col-sm-6">
|
22
|
+
<%= theme_button('Add a Event', 'plus', new_event_path(), classes: "pull-left mr-10", btn_type: "success") if @current_user.has_create_permission?(Dhatu::Event) %>
|
23
|
+
|
24
|
+
<%= theme_button('Refresh', 'refresh', events_path(st: @status), classes: "pull-left mr-10", btn_type: "white") %>
|
25
|
+
</div>
|
26
|
+
<div class="col-sm-6">
|
27
|
+
<%= search_form_kuppayam(Dhatu::Event, events_path, text: @filters[:query]) %>
|
28
|
+
</div>
|
29
|
+
</div>
|
30
|
+
|
31
|
+
</div>
|
32
|
+
<%= clear_tag(10) %>
|
33
|
+
|
34
|
+
<div id="div_event_index">
|
35
|
+
<%= render :partial=>"dhatu/events/index" %>
|
36
|
+
</div>
|
37
|
+
<%= clear_tag(10) %>
|
38
|
+
|
39
|
+
</div>
|
40
|
+
</div>
|
41
|
+
|
42
|
+
</div>
|
43
|
+
|
44
|
+
</div>
|
45
|
+
|
@@ -0,0 +1,39 @@
|
|
1
|
+
<%= form_for(@offer,
|
2
|
+
:url => (@offer.new_record? ? dhatu.offers_path : dhatu.offer_path),
|
3
|
+
:method => (@offer.new_record? ? :post : :put),
|
4
|
+
:remote => true,
|
5
|
+
:html => {:id=>"form_offer", :class=>"mb-0 form-horizontal"}) do |f| %>
|
6
|
+
|
7
|
+
<div id="offer_form_error">
|
8
|
+
<%= @offer.errors[:base].to_sentence %>
|
9
|
+
</div>
|
10
|
+
|
11
|
+
<div class="form-inputs m-15">
|
12
|
+
|
13
|
+
<%= theme_form_field(@offer, :title, form_style: "top-bottom", html_options: { placeholder: "e.g: Samsung Galaxy S8 Dual SIM Smartphone (64GB, Black, 5.8”) + FREE 128GB MicroSD Card"}) %>
|
14
|
+
|
15
|
+
<%= theme_form_field(@offer, :offer_text, required: false, form_style: "top-bottom", html_options: { placeholder: "e.g Dhs 2,499, Was Dhs 2,799, Save Dhs 300 (11%)" }) %>
|
16
|
+
|
17
|
+
<%= theme_form_field(@offer, :description, required: true, html_options: {type: :textarea, class: "form-control wysihtml5", "data-stylesheet-url": "assets/wysiwyg-color.css"}, form_style: "top-bottom") %>
|
18
|
+
|
19
|
+
<div class="row">
|
20
|
+
<div class="col-md-4 pr-20">
|
21
|
+
<%= theme_form_field(@offer, :starts_at, required: false, html_options: {type: :date}, form_style: "top-bottom") %>
|
22
|
+
</div>
|
23
|
+
<div class="col-md-4 pl-20">
|
24
|
+
<%= theme_form_field(@offer, :ends_at, required: false, html_options: {type: :date}, form_style: "top-bottom") %>
|
25
|
+
</div>
|
26
|
+
</div>
|
27
|
+
|
28
|
+
</div>
|
29
|
+
|
30
|
+
<div>
|
31
|
+
<%= submit_tag("Save", :class=>"btn btn-primary pull-right ml-10") %>
|
32
|
+
|
33
|
+
<%= link_to raw("<i class='fa fa-close mr-5'></i><span>Cancel</span>"), "#", onclick: "closeLargeModal();", class: "pull-right btn btn-white" %>
|
34
|
+
</div>
|
35
|
+
|
36
|
+
<%= clear_tag %>
|
37
|
+
|
38
|
+
<% end %>
|
39
|
+
|
@@ -0,0 +1,57 @@
|
|
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>Offer Title</th>
|
8
|
+
<th>Offer Text</th>
|
9
|
+
<th style="width:100px;" class="hidden-sm hidden-xs">Featured</th>
|
10
|
+
<th style="width:100px;" class="hidden-sm hidden-xs">Status</th>
|
11
|
+
<% if display_manage_links? %>
|
12
|
+
<th style="text-align: center;" colspan="2" class="hidden-sm hidden-xs">Actions</th>
|
13
|
+
<% end %>
|
14
|
+
</tr>
|
15
|
+
</thead>
|
16
|
+
<tbody>
|
17
|
+
<tr id="tr_offer_0"></tr>
|
18
|
+
<% @offers.each_with_index do |offer, i| %>
|
19
|
+
|
20
|
+
<tr id="tr_offer_<%= offer.id %>">
|
21
|
+
|
22
|
+
<th scope="row" style="text-align: center;">
|
23
|
+
<%= serial_number(i) %>
|
24
|
+
</th>
|
25
|
+
|
26
|
+
<td class="display-image">
|
27
|
+
<%= display_thumbnail_small(offer) %>
|
28
|
+
</td>
|
29
|
+
|
30
|
+
<td class="display-link"><%= link_to offer.title, offer_path(offer), remote: true %></td>
|
31
|
+
|
32
|
+
<td class="display-link"><%= link_to offer.offer_text, offer_path(offer), remote: true %></td>
|
33
|
+
|
34
|
+
<td class="hidden-sm hidden-xs"><%= display_featured(offer) %></td>
|
35
|
+
|
36
|
+
<td class="hidden-sm hidden-xs"><%= display_publishable_status(offer) %></td>
|
37
|
+
|
38
|
+
<% if display_manage_links? %>
|
39
|
+
<td class="action-links hidden-sm hidden-xs" style="width:10%"><%= display_publishable_links(offer) %></td>
|
40
|
+
|
41
|
+
<td class="action-links hidden-sm hidden-xs" style="width:10%">
|
42
|
+
<%= display_featurable_links(offer) %>
|
43
|
+
<%= display_manage_links(offer, @current_user) %>
|
44
|
+
</td>
|
45
|
+
<% end %>
|
46
|
+
|
47
|
+
</tr>
|
48
|
+
<% end %>
|
49
|
+
</tbody>
|
50
|
+
</table>
|
51
|
+
</div>
|
52
|
+
|
53
|
+
<div class="row">
|
54
|
+
<div class="col-sm-12">
|
55
|
+
<%= paginate_kuppayam(@offers) %>
|
56
|
+
</div>
|
57
|
+
</div>
|
@@ -0,0 +1,28 @@
|
|
1
|
+
<tr id="tr_offer_<%= offer.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(offer) %>
|
9
|
+
</td>
|
10
|
+
|
11
|
+
<td class="display-link"><%= link_to offer.title, offer_path(offer), remote: true %></td>
|
12
|
+
|
13
|
+
<td class="display-link"><%= link_to offer.offer_text, offer_path(offer), remote: true %></td>
|
14
|
+
|
15
|
+
<td class="hidden-sm hidden-xs"><%= display_featured(offer) %></td>
|
16
|
+
|
17
|
+
<td class="hidden-sm hidden-xs"><%= display_publishable_status(offer) %></td>
|
18
|
+
|
19
|
+
<% if display_manage_links? %>
|
20
|
+
<td class="action-links hidden-sm hidden-xs" style="width:10%"><%= display_publishable_links(offer) %></td>
|
21
|
+
|
22
|
+
<td class="action-links hidden-sm hidden-xs" style="width:10%">
|
23
|
+
<%= display_featurable_links(offer) %>
|
24
|
+
<%= display_manage_links(offer, @current_user) %>
|
25
|
+
</td>
|
26
|
+
<% end %>
|
27
|
+
|
28
|
+
</tr>
|
@@ -0,0 +1,118 @@
|
|
1
|
+
<div id="div_offer_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(@offer,
|
8
|
+
"cover_image.image.large.url",
|
9
|
+
upload_image_link(@offer, :cover_image, nil ),
|
10
|
+
remove_image_link(@offer, :cover_image, nil ),
|
11
|
+
image_options: {assoc_name: :cover_image }) %>
|
12
|
+
<% else %>
|
13
|
+
<%= display_image(@offer, "cover_image.image.large.url", class: "img-inline", alt: @offer.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(@offer.title) %>
|
20
|
+
|
21
|
+
<%= theme_panel_sub_heading(@offer.offer_text, "#") if @offer.offer_text %>
|
22
|
+
|
23
|
+
<%= clear_tag(10) %>
|
24
|
+
|
25
|
+
<%= display_publishable_status(@offer) %>
|
26
|
+
|
27
|
+
<%= display_featured(@offer) %>
|
28
|
+
|
29
|
+
<%= clear_tag(20) %>
|
30
|
+
|
31
|
+
<table class="table table-condensed table-bordered mb-20">
|
32
|
+
<tbody>
|
33
|
+
|
34
|
+
<tr>
|
35
|
+
<th style="width:25%">Starts At</th>
|
36
|
+
<td style="width:25%"><%= time_tag(@offer.starts_at) if @offer.starts_at %></td>
|
37
|
+
<th style="width:25%">Ends At</th>
|
38
|
+
<td style="width:25%"><%= time_tag(@offer.ends_at) if @offer.ends_at %></td>
|
39
|
+
</tr>
|
40
|
+
|
41
|
+
</tbody>
|
42
|
+
</table>
|
43
|
+
</div>
|
44
|
+
|
45
|
+
<% if display_manage_links? %>
|
46
|
+
<div class="col-md-3 col-sm-12 col-xs-12">
|
47
|
+
<%= display_manage_buttons(@offer) %>
|
48
|
+
<%= display_publishable_buttons(@offer) %>
|
49
|
+
<%= display_featurable_buttons(@offer) %>
|
50
|
+
</div>
|
51
|
+
<% end %>
|
52
|
+
|
53
|
+
</div>
|
54
|
+
|
55
|
+
<hr>
|
56
|
+
|
57
|
+
<div class="visible-sm visible-xs mb-50"></div>
|
58
|
+
|
59
|
+
<%= clear_tag(20) %>
|
60
|
+
|
61
|
+
<ul class="nav nav-pills">
|
62
|
+
<li class="active">
|
63
|
+
<a href="#offer_details" data-toggle="tab" aria-expanded="false">
|
64
|
+
<span class="visible-xs"><i class="fa-database"></i></span>
|
65
|
+
<span class="hidden-xs">Offer Details</span>
|
66
|
+
</a>
|
67
|
+
</li>
|
68
|
+
|
69
|
+
<li class="">
|
70
|
+
<a href="#technical_details" data-toggle="tab" aria-expanded="false">
|
71
|
+
<span class="visible-xs"><i class="fa-database"></i></span>
|
72
|
+
<span class="hidden-xs">Technical Details</span>
|
73
|
+
</a>
|
74
|
+
</li>
|
75
|
+
</ul>
|
76
|
+
|
77
|
+
<div class="tab-content">
|
78
|
+
<div class="tab-pane active" id="offer_details" style="border: 1px solid #000;min-height:200px;padding:20px;margin-bottom:20px;max-height: 400px;overflow-y: auto;">
|
79
|
+
|
80
|
+
<%= clear_tag(20) %>
|
81
|
+
<%= raw(@offer.description) %>
|
82
|
+
<%= clear_tag(20) %>
|
83
|
+
|
84
|
+
|
85
|
+
</div>
|
86
|
+
<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;">
|
87
|
+
|
88
|
+
<%= clear_tag(20) %>
|
89
|
+
|
90
|
+
<div class="table-responsive">
|
91
|
+
<table class="table table-striped table-condensed table-bordered mb-60">
|
92
|
+
<tbody>
|
93
|
+
|
94
|
+
<tr>
|
95
|
+
<th>ID</th><td><%= @offer.id %></td>
|
96
|
+
<th>Permalink</th><td><%= @offer.to_param %></td>
|
97
|
+
</tr>
|
98
|
+
<tr>
|
99
|
+
<th>Featured</th><td><%= @offer.featured %></td>
|
100
|
+
<th>Status</th><td><%= @offer.status %></td>
|
101
|
+
</tr>
|
102
|
+
<tr>
|
103
|
+
<th>Created At</th><td><%= @offer.created_at.strftime("%m/%d/%Y - %H:%M:%S") if @offer.created_at %></td>
|
104
|
+
<th>Updated At</th><td><%= @offer.updated_at.strftime("%m/%d/%Y - %H:%M:%S") if @offer.updated_at %></td>
|
105
|
+
</tr>
|
106
|
+
|
107
|
+
</tbody>
|
108
|
+
</table>
|
109
|
+
</div>
|
110
|
+
|
111
|
+
</div>
|
112
|
+
</div>
|
113
|
+
|
114
|
+
<%= link_to "Close", "#", onclick: "closeLargeModal();", class: "btn btn-primary pull-right" %>
|
115
|
+
|
116
|
+
<%= clear_tag %>
|
117
|
+
|
118
|
+
</div>
|
@@ -0,0 +1,46 @@
|
|
1
|
+
<div class="row">
|
2
|
+
|
3
|
+
<div class="col-md-12">
|
4
|
+
|
5
|
+
<ul class="nav nav-tabs nav-tabs-justified">
|
6
|
+
<% Dhatu::Offer::STATUS.each do |key, value| %>
|
7
|
+
<li class="<%= @status == value ? 'active' : '' %>">
|
8
|
+
<%= link_to offers_path(st: value), "aria-expanded" => "#{ @status == value ? 'true' : 'false' }" do %>
|
9
|
+
<span class="visible-xs"><i class="fa-gift"></i></span>
|
10
|
+
<span class="hidden-xs"><%= key %></span>
|
11
|
+
<% end %>
|
12
|
+
</li>
|
13
|
+
<% end %>
|
14
|
+
</ul>
|
15
|
+
|
16
|
+
<div class="tab-content">
|
17
|
+
<div class="tab-pane active">
|
18
|
+
|
19
|
+
<div id="div_offer_action_buttons">
|
20
|
+
|
21
|
+
<div class="row">
|
22
|
+
<div class="col-sm-6">
|
23
|
+
<%= theme_button('Add a Offer', 'plus', new_offer_path(), classes: "pull-left mr-10", btn_type: "success") if @current_user.has_create_permission?(Dhatu::Offer) %>
|
24
|
+
|
25
|
+
<%= theme_button('Refresh', 'refresh', offers_path(st: @status), classes: "pull-left mr-10", btn_type: "white") %>
|
26
|
+
</div>
|
27
|
+
<div class="col-sm-6">
|
28
|
+
<%= search_form_kuppayam(Dhatu::Offer, offers_path(st: @status), text: @filters[:query]) %>
|
29
|
+
</div>
|
30
|
+
</div>
|
31
|
+
|
32
|
+
</div>
|
33
|
+
<%= clear_tag(10) %>
|
34
|
+
|
35
|
+
<div id="div_offer_index">
|
36
|
+
<%= render :partial=>"dhatu/offers/index" %>
|
37
|
+
</div>
|
38
|
+
<%= clear_tag(10) %>
|
39
|
+
|
40
|
+
</div>
|
41
|
+
</div>
|
42
|
+
|
43
|
+
</div>
|
44
|
+
|
45
|
+
</div>
|
46
|
+
|
@@ -0,0 +1,60 @@
|
|
1
|
+
<%= form_for(@section,
|
2
|
+
:url => (@section.new_record? ? dhatu.sections_path : dhatu.section_path),
|
3
|
+
:method => (@section.new_record? ? :post : :put),
|
4
|
+
:remote => true,
|
5
|
+
:html => {:id=>"form_section", :class=>"mb-0 form-horizontal"}) do |f| %>
|
6
|
+
|
7
|
+
<div id="section_form_error">
|
8
|
+
<%= @section.errors[:base].to_sentence %>
|
9
|
+
</div>
|
10
|
+
|
11
|
+
<div class="form-inputs m-15">
|
12
|
+
|
13
|
+
<% if @section.new_record? || @current_user.super_admin? %>
|
14
|
+
|
15
|
+
<%= theme_form_field(@section, :section_type, form_style: "top-bottom", html_options: { placeholder: ""}) %>
|
16
|
+
|
17
|
+
<% else %>
|
18
|
+
|
19
|
+
<%= theme_form_field(@section, :section_type, form_style: "top-bottom", html_options: { placeholder: "", readonly: true}) %>
|
20
|
+
|
21
|
+
<% end %>
|
22
|
+
|
23
|
+
<%= theme_form_field(@section, :title, form_style: "top-bottom", html_options: { placeholder: ""}) %>
|
24
|
+
|
25
|
+
<%= theme_form_field(@section, :sub_title, required: false, form_style: "top-bottom", html_options: { placeholder: "" }) %>
|
26
|
+
|
27
|
+
<%= theme_form_field(@section, :short_description, required: false, form_style: "top-bottom", html_options: { placeholder: "" }) %>
|
28
|
+
|
29
|
+
<%= theme_form_field(@section, :long_description, required: true, html_options: {type: :textarea, class: "form-control wysihtml5", "data-stylesheet-url": "assets/wysiwyg-color.css"}, form_style: "top-bottom") %>
|
30
|
+
|
31
|
+
<div class="row">
|
32
|
+
<div class="col-md-4 pr-20">
|
33
|
+
<%= theme_form_field(@section, :button_one_text, required: false, form_style: "top-bottom", html_options: { placeholder: "" }) %>
|
34
|
+
</div>
|
35
|
+
<div class="col-md-4 pl-20">
|
36
|
+
<%= theme_form_field(@section, :button_one_link, required: false, form_style: "top-bottom", html_options: { placeholder: "" }) %>
|
37
|
+
</div>
|
38
|
+
</div>
|
39
|
+
|
40
|
+
<div class="row">
|
41
|
+
<div class="col-md-4 pr-20">
|
42
|
+
<%= theme_form_field(@section, :button_two_text, required: false, form_style: "top-bottom", html_options: { placeholder: "" }) %>
|
43
|
+
</div>
|
44
|
+
<div class="col-md-4 pl-20">
|
45
|
+
<%= theme_form_field(@section, :button_two_link, required: false, form_style: "top-bottom", html_options: { placeholder: "" }) %>
|
46
|
+
</div>
|
47
|
+
</div>
|
48
|
+
|
49
|
+
</div>
|
50
|
+
|
51
|
+
<div>
|
52
|
+
<%= submit_tag("Save", :class=>"btn btn-primary pull-right ml-10") %>
|
53
|
+
|
54
|
+
<%= link_to raw("<i class='fa fa-close mr-5'></i><span>Cancel</span>"), "#", onclick: "closeLargeModal();", class: "pull-right btn btn-white" %>
|
55
|
+
</div>
|
56
|
+
|
57
|
+
<%= clear_tag %>
|
58
|
+
|
59
|
+
<% end %>
|
60
|
+
|
@@ -0,0 +1,53 @@
|
|
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 style="width:200px">Section Type</th>
|
8
|
+
<th>Section Title</th>
|
9
|
+
<th style="width:100px;" class="hidden-sm hidden-xs">Status</th>
|
10
|
+
<% if display_manage_links? %>
|
11
|
+
<th style="text-align: center;" colspan="2" class="hidden-sm hidden-xs">Actions</th>
|
12
|
+
<% end %>
|
13
|
+
</tr>
|
14
|
+
</thead>
|
15
|
+
<tbody>
|
16
|
+
<tr id="tr_section_0"></tr>
|
17
|
+
<% @sections.each_with_index do |section, i| %>
|
18
|
+
|
19
|
+
<tr id="tr_section_<%= section.id %>">
|
20
|
+
|
21
|
+
<th scope="row" style="text-align: center;">
|
22
|
+
<%= serial_number(i) %>
|
23
|
+
</th>
|
24
|
+
|
25
|
+
<td class="display-image">
|
26
|
+
<%= display_thumbnail_small(section) %>
|
27
|
+
</td>
|
28
|
+
|
29
|
+
<td class="display-link"><%= link_to section.section_type, section_path(section), remote: true %></td>
|
30
|
+
|
31
|
+
<td class="display-link"><%= link_to section.title, section_path(section), remote: true %></td>
|
32
|
+
|
33
|
+
<td class="hidden-sm hidden-xs"><%= display_publishable_status(section) %></td>
|
34
|
+
|
35
|
+
<% if display_manage_links? %>
|
36
|
+
<td class="action-links hidden-sm hidden-xs" style="width:10%"><%= display_publishable_links(section) %></td>
|
37
|
+
|
38
|
+
<td class="action-links hidden-sm hidden-xs" style="width:10%">
|
39
|
+
<%= display_manage_links(section, @current_user) %>
|
40
|
+
</td>
|
41
|
+
<% end %>
|
42
|
+
|
43
|
+
</tr>
|
44
|
+
<% end %>
|
45
|
+
</tbody>
|
46
|
+
</table>
|
47
|
+
</div>
|
48
|
+
|
49
|
+
<div class="row">
|
50
|
+
<div class="col-sm-12">
|
51
|
+
<%= paginate_kuppayam(@sections) %>
|
52
|
+
</div>
|
53
|
+
</div>
|