ish_manager 0.1.8.304 → 0.1.8.307

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/ish_manager/application.js +8 -1
  3. data/app/assets/javascripts/ish_manager/application_materialize.js +8 -0
  4. data/app/assets/stylesheets/ish_manager/application.scss +9 -5
  5. data/app/assets/stylesheets/ish_manager/leads.scss +10 -0
  6. data/app/controllers/ish_manager/application_controller.rb +14 -0
  7. data/app/controllers/ish_manager/galleries_controller.rb +1 -1
  8. data/app/controllers/ish_manager/leads_controller.rb +21 -19
  9. data/app/controllers/ish_manager/maps_controller.rb +18 -1
  10. data/app/controllers/ish_manager/markers_controller.rb +1 -1
  11. data/app/controllers/ish_manager/meetings_controller.rb +56 -0
  12. data/app/controllers/ish_manager/unsubscribes_controller.rb +17 -0
  13. data/app/controllers/ish_manager/users_controller.rb +2 -0
  14. data/app/jobs/ish_manager/test_email_job.rb +11 -0
  15. data/app/mailers/ish_manager/application_mailer.rb +5 -0
  16. data/app/mailers/ish_manager/meeting_mailer.rb +13 -0
  17. data/app/models/ish_manager/ability.rb +2 -1
  18. data/app/views/ish_manager/application/_main_header_admin.haml +10 -3
  19. data/app/views/ish_manager/application/home.haml +1 -1
  20. data/app/views/ish_manager/application_mailer/test_email.html.haml +4 -0
  21. data/app/views/ish_manager/leads/index.haml +18 -12
  22. data/app/views/ish_manager/maps/_form.haml +2 -2
  23. data/app/views/ish_manager/markers/_form.haml +13 -18
  24. data/app/views/ish_manager/markers/_index.haml +1 -1
  25. data/app/views/ish_manager/markers/new.haml +2 -1
  26. data/app/views/ish_manager/meeting_mailer/morning_reminder.haml +13 -0
  27. data/app/views/ish_manager/meetings/_form.haml +51 -0
  28. data/app/views/ish_manager/meetings/edit.haml +0 -0
  29. data/app/views/ish_manager/meetings/index.haml +13 -0
  30. data/app/views/ish_manager/meetings/new.haml +3 -0
  31. data/app/views/ish_manager/unsubscribes/new.haml +10 -0
  32. data/app/views/ish_manager/user_profiles/_show.haml +35 -0
  33. data/app/views/ish_manager/user_profiles/edit.haml +3 -1
  34. data/app/views/ish_manager/user_profiles/index.haml +5 -36
  35. data/app/views/ish_manager/users/_index.haml +6 -2
  36. data/app/views/ish_manager/users/index.haml +2 -0
  37. data/app/views/layouts/ish_manager/application2.haml +2 -1
  38. data/config/routes.rb +31 -26
  39. metadata +17 -3
  40. data/app/views/ish_manager/campaigns/index.haml +0 -24
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 259eb867e91b4a93f763237341e16467eb4c7f785609b9fdec6649838b540676
4
- data.tar.gz: '02556480cad5c8716e36a81439b13811c7e34b4e4e78865fb52e10236e94a6ab'
3
+ metadata.gz: 3d5ed08f4fafe8db58090dbc0684eec85d393913a1530fbc755b2c3d41ae5770
4
+ data.tar.gz: 6f6e725887b2e96f27da8ced4b1107ae8e01a55daafe4592f2c097d6c2d7e589
5
5
  SHA512:
6
- metadata.gz: 291e38d1ed8f6d5fe54a92736d41f8d59f30262dcc56da21b0618c7615f631ad566ef21b267a890db103f8ad070a3f41ca0464585d27da88f302dfeda07b1ca2
7
- data.tar.gz: 46ed7b9a05b28152f1ccf5d126eea94bbfdcfc911eb7a2c329197b1e8b39691de04f6e2f567fededdf4cb1cf8e1fd639dd6e245904c0d54fd0a9880360e6c208
6
+ metadata.gz: 68d779fe0e92d0b402969d25e8746518530e4440424c12738c291a91ede050c755ef0748a81dd5c45ef36d26068ce4c62c046aeae9de841509c6ea47c54660e8
7
+ data.tar.gz: bd0f7849717fcbf42926ec87db782bb2764dfba452f535135128a49e189640674db5fbdc2339e721fc32ce720eb5d5779ed585655cf90c282b59817d6ba3667e
@@ -42,12 +42,19 @@ $(function () {
42
42
  });
43
43
  }
44
44
 
45
-
46
45
  $(".caret").each(function(idx) {
47
46
  $($(".caret")[idx]).html('')
48
47
  })
49
48
 
50
49
 
50
+
51
+
52
+
53
+
54
+
55
+
56
+
57
+
51
58
  // material_select & select2
52
59
  if ($('body').length > 0) {
53
60
  if ('function' === typeof $('body').material_select ) {
@@ -0,0 +1,8 @@
1
+
2
+ $(document).ready(function() {
3
+
4
+ if ($('body').length > 0) {
5
+ $('select').material_select()
6
+ }
7
+
8
+ })
@@ -10,12 +10,15 @@
10
10
  * files in this directory. Styles in this file should be added after the last require_* statement.
11
11
  * It is generally better to create a new file per style scope.
12
12
  *
13
+ * alphabetized : )
14
+ *
13
15
  *= require_self
14
- *= require ish_manager/tags
15
- *= require ish_manager/maps
16
- *= require ish_manager/jquery-ui
17
16
  *= require ish_manager/galleries
17
+ *= require ish_manager/jquery-ui
18
+ *= require ish_manager/maps
19
+ *= require ish_manager/leads
18
20
  *= require ish_manager/photos
21
+ *= require ish_manager/tags
19
22
  *= require ish_manager/user_profiles
20
23
  *= require ish_manager/videos
21
24
  */
@@ -71,7 +74,7 @@ ul:not(.browser-default).bullets, {
71
74
  }
72
75
  }
73
76
  .alert {
74
- border: 1px solid yellow;
77
+ border: 1px solid red;
75
78
  padding: .8em;
76
79
  }
77
80
 
@@ -176,7 +179,8 @@ img .img-400 {
176
179
  width: 400px;
177
180
  }
178
181
 
179
- .inline {
182
+ .inline,
183
+ .inline-block {
180
184
  display: inline-block;
181
185
  }
182
186
  ul.inline li {
@@ -0,0 +1,10 @@
1
+
2
+ .manager-leads-index {
3
+ th.company-url {
4
+ width: 10px;
5
+ }
6
+ th.created-at,
7
+ td.created-at {
8
+ width: 200px;
9
+ }
10
+ }
@@ -6,6 +6,20 @@ module IshManager
6
6
  check_authorization
7
7
  rescue_from ::CanCan::AccessDenied, :with => :access_denied
8
8
 
9
+ def email_test
10
+ authorize! :home, IshManager::Ability
11
+ IshManager::ApplicationMailer.test_email(' 3dva ').deliver_later
12
+
13
+ # wait_until = "2022-05-03T15:09".to_datetime.in_time_zone
14
+ # puts! wait_until, 'wait untl'
15
+
16
+ # # IshManager::TestEmailJob.set({ wait_until: wait_until }).perform_later
17
+ # IshManager::TestEmailJob.perform_later
18
+
19
+ flash[:notice] = 'Scheduled delivery.'
20
+ redirect_to request.referrer
21
+ end
22
+
9
23
  def home
10
24
  authorize! :home, IshManager::Ability
11
25
  render 'home'
@@ -100,7 +100,7 @@ class IshManager::GalleriesController < IshManager::ApplicationController
100
100
  ).select { |p| !old_shared_profile_ids.include?( p.id ) }
101
101
  ::IshManager::ApplicationMailer.shared_galleries( new_shared_profiles, @gallery ).deliver
102
102
  flash[:notice] = 'Success.'
103
- redirect_to gallery_path(@gallery)
103
+ redirect_to edit_gallery_path(@gallery)
104
104
  else
105
105
  puts! @gallery.errors.messages, 'cannot save gallery'
106
106
  flash[:alert] = 'No Luck. ' + @gallery.errors.messages.to_s
@@ -1,14 +1,33 @@
1
1
  class IshManager::LeadsController < IshManager::ApplicationController
2
2
 
3
+ ## alphabetized : )
4
+
5
+ def create
6
+ @lead = Ish::Lead.new params[:lead].permit!
7
+ @lead.profile = current_user.profile
8
+ authorize! :create, @lead
9
+ if @lead.save
10
+ flash[:notice] = "created lead"
11
+ else
12
+ flash[:alert] = "Cannot create lead: #{@lead.errors.messages}"
13
+ end
14
+ redirect_to :action => 'index'
15
+ end
16
+
17
+ def edit
18
+ @lead = Ish::Lead.find params[:id]
19
+ authorize! :edit, @lead
20
+ end
21
+
3
22
  def index
4
23
  authorize! :index, Ish::Lead
5
- @leads = Ish::Lead.where( :profile => current_user.profile, :is_trash => false )
24
+ @leads = Ish::Lead.all # where( :profile => current_user.profile, :is_trash => false )
6
25
  if params[:is_done]
7
26
  @leads = @leads.where( :is_done => true )
8
27
  else
9
28
  @leads = @leads.where( :is_done => false )
10
29
  end
11
- render :layout => 'ish_manager/application_no_materialize'
30
+ render :layout => 'ish_manager/application_no_material'
12
31
  end
13
32
 
14
33
  def new
@@ -16,28 +35,11 @@ class IshManager::LeadsController < IshManager::ApplicationController
16
35
  authorize! :new, @new_lead
17
36
  end
18
37
 
19
- def create
20
- @lead = Ish::Lead.new params[:lead].permit!
21
- @lead.profile = current_user.profile
22
- authorize! :create, @lead
23
- if @lead.save
24
- flash[:notice] = "created lead"
25
- else
26
- flash[:alert] = "Cannot create lead: #{@lead.errors.messages}"
27
- end
28
- redirect_to :action => 'index'
29
- end
30
-
31
38
  def show
32
39
  authorize! :redirect, IshManager::Ability
33
40
  redirect_to :action => :edit, :id => params[:id]
34
41
  end
35
42
 
36
- def edit
37
- @lead = Ish::Lead.find params[:id]
38
- authorize! :edit, @lead
39
- end
40
-
41
43
  def update
42
44
  @lead = Ish::Lead.find params[:id]
43
45
  authorize! :update, @lead
@@ -173,6 +173,17 @@ class IshManager::MapsController < IshManager::ApplicationController
173
173
 
174
174
  @map.config = JSON.parse map_params[:config]
175
175
 
176
+ # And update markers
177
+ # @TODO: rewrite and make this one query!
178
+ if map_marker_params.present?
179
+ markers = Marker.where( destination: @map )
180
+ markers.each do |m|
181
+ map_marker_params.each do |k, v|
182
+ m.update_attribute(k, v)
183
+ end
184
+ end
185
+ end
186
+
176
187
  respond_to do |format|
177
188
  if map_params[:parent_slug].present?
178
189
  @map.parent = ::Gameui::Map.find_by({ slug: map_params[:parent_slug] })
@@ -200,11 +211,17 @@ class IshManager::MapsController < IshManager::ApplicationController
200
211
  out
201
212
  end
202
213
 
214
+ def map_marker_params
215
+ out = map_params.slice( :shared_profiles, :is_public )
216
+ puts! out, 'map_marker_params'
217
+ out
218
+ end
219
+
203
220
  ## @TODO: remove all instances of unscoped, everywhere.
204
221
  def set_map
205
222
  @map = ::Gameui::Map.unscoped.where(id: params[:id]).first
206
223
  @map ||= Gameui::Map.unscoped.find_by(slug: params[:id])
207
- @markers = @map.markers.unscoped
224
+ @markers = @map.markers.unscoped.includes( :destination )
208
225
  end
209
226
 
210
227
  end
@@ -22,7 +22,6 @@ class IshManager::MarkersController < IshManager::ApplicationController
22
22
  authorize! :create_marker, @map
23
23
  @map_id = @map.id
24
24
  @marker.creator_profile_id = current_user.profile.id
25
- @marker.destination = Gameui::Map.find_by( slug: @marker.slug )
26
25
 
27
26
  if params[:image]
28
27
  @marker.image = ::Ish::ImageAsset.new :image => params[:image]
@@ -42,6 +41,7 @@ class IshManager::MarkersController < IshManager::ApplicationController
42
41
  @marker.map.touch
43
42
  format.html { redirect_to map_path(@map), notice: 'Marker was successfully created.' }
44
43
  else
44
+ puts! @marker.errors.full_messages.join(", "), "Could not create marker"
45
45
  flash[:alert] = @marker.errors.full_messages
46
46
  format.html { render :new }
47
47
  end
@@ -0,0 +1,56 @@
1
+
2
+ class IshManager::MeetingsController < IshManager::ApplicationController
3
+
4
+ layout 'ish_manager/application_no_material'
5
+
6
+ # alphabetized
7
+
8
+ def create
9
+ authorize! :create, Ish::Meeting
10
+ @meeting = Ish::Meeting.new meeting_params
11
+ if @meeting.save
12
+ if @meeting.send_reminder_morning
13
+ y = @meeting.datetime.year
14
+ m = @meeting.datetime.month
15
+ d = @meeting.datetime.day
16
+ h = 9
17
+ m = 5 # 9:05am
18
+ IshManager::MeetingMailer.morning_reminder( meeting_id: @meeting.id.to_s
19
+ ).deliver_later({ wait_until: DateTime.new(y,m,d,h,m) })
20
+ end
21
+ if @meeting.send_reminder_15min
22
+ end
23
+ flash[:notice] = 'Meeting created'
24
+ redirect_to action: 'index'
25
+ else
26
+ flash[:alert] = "Cannot create meeting: #{@meeting.errors.full_messages.join(", ")}."
27
+ render 'new'
28
+ end
29
+ end
30
+
31
+ def destroy
32
+ end
33
+
34
+ def edit
35
+ end
36
+
37
+ def index
38
+ authorize! :index, Ish::Meeting
39
+ @meetings = Ish::Meeting.all
40
+ end
41
+
42
+ def new
43
+ @meeting = Ish::Meeting.new
44
+ authorize! :new, @meeting
45
+ end
46
+
47
+ def update
48
+ end
49
+
50
+ private
51
+
52
+ def meeting_params
53
+ params.require(:meeting).permit!
54
+ end
55
+
56
+ end
@@ -0,0 +1,17 @@
1
+
2
+ class IshManager::UnsubscribesController < IshManager::ApplicationController
3
+
4
+ layout false
5
+
6
+ # alphabetized : )
7
+
8
+ def new
9
+ @unsubscribe = Ish::Unsubscribe.new
10
+ authorize! :new, @unsubscribe
11
+ end
12
+
13
+ def create
14
+ authorize! :open_permission, IshManager::Ability
15
+ end
16
+
17
+ end
@@ -3,10 +3,12 @@ class IshManager::UsersController < IshManager::ApplicationController
3
3
 
4
4
  def index
5
5
  @users = User.all
6
+ authorize! :index, User
6
7
  end
7
8
 
8
9
  def show
9
10
  @user = User.find params[:id]
11
+ authorize! :show, @user
10
12
  end
11
13
 
12
14
  end
@@ -0,0 +1,11 @@
1
+
2
+ class IshManager::TestEmailJob < ApplicationJob
3
+
4
+ queue_as :mailers
5
+
6
+ def perform
7
+ puts! 'performing test job'
8
+ ::IshManager::ApplicationMailer.test_email.deliver_later
9
+ end
10
+
11
+ end
@@ -25,5 +25,10 @@ module IshManager
25
25
  mail( :to => stock.profile.email, :subject => "IshManager Stock Alert :: #{stock.ticker}" ).deliver
26
26
  end
27
27
 
28
+ def test_email s=''
29
+ puts! s, "#test_email - delivering"
30
+ mail( to: 'piousbox@gmail.com', subject: "Test #{s} :: #{DateTime.now.strftime("%Y-%m-%d %l:%M:%S %P")}" )
31
+ end
32
+
28
33
  end
29
34
  end
@@ -0,0 +1,13 @@
1
+
2
+ class IshManager::MeetingMailer < IshManager::ApplicationMailer
3
+ default from: 'piousbox@gmail.com'
4
+ # layout 'mailer'
5
+
6
+ def morning_reminder meeting_id:
7
+ @meeting = Ish::Meeting.find meeting_id
8
+ mail( to: @meeting.invitee_email,
9
+ bcc: 'piousbox@gmail.com',
10
+ subject: 'A reminder for your upcoming meeting' )
11
+ end
12
+
13
+ end
@@ -25,7 +25,6 @@ class IshManager::Ability
25
25
 
26
26
  can [ :create_newsitem, :show, :new_feature, :create_feature,
27
27
  :index, :new, :create, :edit, :update ], City
28
- can [ :manage ], ::CoTailors
29
28
 
30
29
  can [ :new ], ::Feature
31
30
  can [ :friends_index, :friends_new ], ::Ish::UserProfile
@@ -113,5 +112,7 @@ class IshManager::Ability
113
112
  report.is_public
114
113
  end
115
114
 
115
+ can [ :new, :create ], Ish::Unsubscribe
116
+
116
117
  end
117
118
  end
@@ -35,10 +35,17 @@
35
35
  %ul
36
36
  %li{ class: params[:controller] == 'ish_manager/newsitems' ? 'active' : '' }= link_to '+Newsitem', new_newsitem_path
37
37
  -# %li{ :class => params[:controller] == 'ish_manager/stock_watches' ? 'active' : '' }= link_to 'Stock Watches (old m3)', stock_watches_path
38
- %li= link_to 'Stock Watches', '/iron_warbler/stock_watches'
39
- %li{ :class => params[:controller] == 'ish_manager/user_profiles' ? 'active' : '' }= link_to 'Profiles', user_profiles_path
38
+ -# %li= link_to 'Stock Watches', '/iron_warbler/stock_watches'
39
+ %li{ :class => params[:controller] == 'ish_manager/users' ? 'active' : '' }= link_to 'Users', users_path
40
+ %li{ :class => params[:controller] == 'ish_manager/user_profiles' ? 'active' : '' }= link_to 'Ish::UserProfiles', user_profiles_path
40
41
  %li
41
42
  = link_to "Ish::ImageAsset's", image_assets_path
42
- %li= link_to 'GuydMe', 'https://localhost:3002'
43
+ %ul
44
+ %li= link_to 'Leads', leads_path
45
+ %li
46
+ = link_to 'Meetings', meetings_path
47
+ = link_to '[+]', new_meeting_path
48
+ %li
49
+ = button_to 'Test Email', email_test_path, { form_class: 'inline-block' }
43
50
  %hr
44
51
 
@@ -1,5 +1,5 @@
1
1
 
2
- Welcome home! Your role is #{current_user.profile.role_name}.
2
+ Welcome home! Your role is `#{current_user.profile.role_name}`.
3
3
 
4
4
  .bordered{ style: 'width: 400px;' }
5
5
  = form_tag "https://www.cgtrader.com/free-3d-models", method: :get do
@@ -0,0 +1,4 @@
1
+
2
+ %h1 This is a test
3
+ %p Hello, world!
4
+
@@ -1,22 +1,23 @@
1
1
 
2
- .manager--leads-index
2
+ .manager-leads-index
3
3
  %h5
4
4
  = link_to 'Leads', leads_path
5
+ (#{Ish::Lead.all.count})
5
6
  = link_to raw("<i class='fa fa-plus-square'></i>"), new_lead_path
6
7
  = link_to '[done]', done_leads_path
7
-
8
- %table#dataTable
8
+
9
+ %table#dataTable.display.compact
9
10
  %thead
10
11
  %tr
11
12
  %th &nbsp;
12
- %th Created At
13
+ %th.created-at Created At
13
14
  %th Company
14
15
  %th Tag
15
16
  %th Phone
16
17
  %th Email
17
18
  %th Job Url
18
- %th Company Url
19
- %th Yelp Url
19
+ %th.company-url Company Url
20
+ %th.yelp-url Yelp Url
20
21
  %th Location
21
22
  %th Description
22
23
  %th Address
@@ -24,14 +25,19 @@
24
25
  - @leads.each do |lead|
25
26
  %tr
26
27
  %td= link_to raw('<i class="fa fa-play"></i>'), lead_path( lead )
27
- %td= pretty_date lead.created_at
28
+ %td.created-at= pretty_date lead.created_at
28
29
  %td= lead.company
29
30
  %td= lead.tag
30
31
  %td= lead.phone
31
- %td= link_to raw('<i class="fa fa-envelope"></i>'), "mailto:#{lead.email}"
32
- %td= link_to raw('<i class="fa fa-user-md"></i>'), lead.job_url, :target => '_blank'
33
- %td= lead.company_url
34
- %td= lead.yelp_url
32
+ %td
33
+ = link_to raw('<i class="fa fa-envelope"></i>'), "mailto:#{lead.email}" if lead.email.present?
34
+ %td
35
+ = link_to raw('<i class="fa fa-user-md"></i>'), lead.job_url, :target => '_blank' if lead.job_url.present?
36
+ %td
37
+ = link_to 'B', lead.company_url if lead.company_url.present?
38
+ %td
39
+ = link_to raw('<i class="fa fa-user-md"></i>'), lead.yelp_url if lead.yelp_url.present?
35
40
  %td= lead.location
36
41
  %td= lead.description
37
- %td= lead.address
42
+ %td
43
+ = 'Y' if lead.address.present?
@@ -77,10 +77,10 @@
77
77
  %pre.small
78
78
  :plain
79
79
  description.collapsible: bool
80
- map_panel_type: "Equirectangular" |
80
+ map_panel_type: "Equirectangular" | "Panoramic" |
81
81
  "MapPanel" | "MapPanelNoZoom" |
82
82
  "ThreePanelV1" | "ThreePanelV4" |
83
- "GoogleMaps"
83
+ "GoogleMaps" | "TabiversePlanet"
84
84
  .row
85
85
  .col.s6
86
86
  .google-maps.row
@@ -12,17 +12,17 @@
12
12
  .actions
13
13
  = f.submit 'Save'
14
14
  .row
15
- .col.s1
15
+ .col.s4
16
16
  = f.label :map
17
- = f.text_field :map_id, value: @marker.map_id || params[:map_id]
18
- .col.s5
17
+ = f.select :map_id, options_for_select(@maps_list, selected: @marker.map_id || params[:map_id])
18
+ .col.s4
19
19
  .field
20
20
  = f.label :name
21
21
  = f.text_field :name
22
- .col.s6
22
+ .col.s4
23
23
  .field
24
- = f.label :slug
25
- = f.text_field :slug
24
+ = f.label :destination
25
+ = f.select :destination_id, options_for_select(@maps_list, selected: @marker.destination_id)
26
26
  .row
27
27
  .col.s3
28
28
  .field
@@ -84,17 +84,12 @@
84
84
  = f.check_box :is_active
85
85
  = f.label :is_active
86
86
  .col.s6
87
- unused
88
- .row
89
- .col.s6
90
- .google-maps.row
91
- .col.s4
92
- = f.label "x, y"
93
- .col.s4
94
- = f.text_field :x
95
- .col.s4
96
- = f.text_field :y
97
- .col.s6
98
- unused
87
+ .google-maps.row
88
+ .col.s4
89
+ = f.label "x, y"
90
+ .col.s4
91
+ = f.text_field :x
92
+ .col.s4
93
+ = f.text_field :y
99
94
  .actions
100
95
  = f.submit 'Save'
@@ -7,7 +7,7 @@
7
7
  - else
8
8
  = image_missing_tag
9
9
  .flex-row
10
- .a= marker.slug
10
+ .a= marker.destination.name
11
11
  .a= button_to '~', edit_marker_path(marker), method: :get
12
12
  .a= button_to 'x', marker_path(marker), method: :delete, data: { confirm: 'Are you sure?' }
13
13
  .flex-row
@@ -1,4 +1,5 @@
1
- %h1 New marker for #{@map.slug}
1
+
2
+ .a New marker
2
3
 
3
4
  = render 'form'
4
5
 
@@ -0,0 +1,13 @@
1
+
2
+ %p Hello #{@meeting.invitee_name},
3
+
4
+ %p
5
+ This is a reminder that you have an upcoming meeting with #{@meeting.host_name},
6
+ today at #{@meeting.datetime.strftime('%l:%M %P')}.
7
+
8
+ %p
9
+ %small --<br />
10
+ %small The Piousbox Notifier<br />
11
+ %small If you are unable to attend or would like to reschedule, please notify #{@meeting.host_email}.
12
+ %small To submit an unsubscribe request, #{link_to 'click here', new_unsubscribe_url, style: 'color: gray'}
13
+
@@ -0,0 +1,51 @@
1
+
2
+ - url = meeting.persisted? ? meeting_path( meeting.id ) : meetings_path
3
+
4
+ = form_for meeting, :as => :meeting, :url => url do |f|
5
+
6
+ .input-field
7
+ = f.label :invitee_email
8
+ = f.text_field :invitee_email
9
+ .input-field
10
+ = f.label :invitee_name
11
+ = f.text_field :invitee_name
12
+
13
+ .input-field
14
+ = f.label :datetime
15
+ = f.text_field :datetime
16
+
17
+ .input-field
18
+ = f.check_box :send_reminder_morning
19
+ = f.label :send_reminder_morning
20
+
21
+ .input-field
22
+ = f.check_box :send_reminder_15min
23
+ = f.label :send_reminder_15min
24
+
25
+ .input-field
26
+ = f.select :template_name, options_for_select(Ish::Meeting.template_name_options)
27
+ = f.label :template_name
28
+
29
+ -# .input-field
30
+ -# = f.label :company
31
+ -# = f.text_field :company
32
+ -# .input-field
33
+ -# = f.label :tag
34
+ -# = f.text_field :tag
35
+ -# .input-field
36
+ -# = f.label :location
37
+ -# = f.text_field :location
38
+ -# .input-field
39
+ -# = f.label :description
40
+ -# = f.text_area :description
41
+ -# .input-field
42
+ -# = f.label :address
43
+ -# = f.text_area :address
44
+
45
+ -# .field
46
+ -# = f.check_box :is_trash
47
+ -# = f.label :is_trash
48
+
49
+ .actions{ :style => "margin-top: 1em;" }
50
+ = f.submit
51
+
File without changes
@@ -0,0 +1,13 @@
1
+
2
+ .manager-meeetings-index
3
+
4
+ %table#dataTable.display.compact
5
+ %thead
6
+ %tr
7
+ %th Invitee
8
+ %th Date Time
9
+ %tbody
10
+ - @meetings.each do |meeting|
11
+ %tr
12
+ %td= meeting.invitee_email
13
+ %td= meeting.datetime.to_s
@@ -0,0 +1,3 @@
1
+
2
+ %h1 New Meeting
3
+ = render 'ish_manager/meetings/form', meeting: @meeting
@@ -0,0 +1,10 @@
1
+
2
+ = form_for @unsubscribe, url: unsubscribes_path do |f|
3
+ .input-field
4
+ = f.label :email
5
+ = f.text_field :email
6
+ .input-field
7
+ = f.label :reason
8
+ = f.text_field :reason
9
+ .actions
10
+ = f.submit 'Submit Unsubscribe Request'
@@ -0,0 +1,35 @@
1
+ - profile ||= user_profile
2
+
3
+ .row
4
+ .col.s4
5
+ %ul
6
+ %li
7
+ <b>Email:</b> #{link_to profile.email, user_profile_path(profile)}
8
+ = link_to '[edit]', edit_user_profile_path( profile )
9
+ %li <b>Name:</b> #{profile.name}
10
+ %li <b>Role:</b> #{profile.role_name}
11
+ %li <b>User.email:</b> #{profile.user ? profile.user.email : nil}
12
+ %li <b>City:</b> #{profile.current_city ? profile.current_city.name : nil}
13
+ %li
14
+ <b>Profile Photo:</b>
15
+ = image_tag profile.profile_photo.photo.url(:thumb) rescue nil
16
+
17
+ .col.s8
18
+ %h5 Shared galleries
19
+ - profile.shared_galleries.unscoped.where( :is_trash => false ).each do |g|
20
+ &gt; #{link_to g.name, gallery_path(g.slug)} <br />
21
+ = render 'meta', :item => g
22
+ <hr />
23
+
24
+ %h5 Newsitems
25
+ - profile.newsitems.each do |n|
26
+ = render 'ish_manager/newsitems/item', n: n, profile_id: profile.id
27
+ <hr />
28
+
29
+ %h5 Bookmarked Locations (#{profile.bookmarked_locations.length})
30
+ %ul.browser-default
31
+ - profile.bookmarked_locations.each do |n|
32
+ %li
33
+ = n.slug
34
+
35
+
@@ -1,3 +1,5 @@
1
1
 
2
- %h5 Editing profile of user #{@profile.user.email}
2
+ %h5 Editing profile of user `#{@profile.user&.email}`
3
+ - if !@profile.user
4
+ .alert <b>Note:</b> This profile doesn't have an associated user.
3
5
  = render 'form', :profile => @profile
@@ -6,40 +6,9 @@
6
6
  User Profiles (#{@user_profiles.count})
7
7
  = link_to '[+]', new_user_profile_path
8
8
 
9
-
10
- - @user_profiles.each do |profile|
11
- .panel
12
- .panel-body
13
- .row
14
- .col.s4
15
- %ul
16
- %li
17
- <b>Email:</b> #{link_to profile.email, user_profile_path(profile)}
18
- = link_to '[edit]', edit_user_profile_path( profile )
19
- %li <b>Name:</b> #{profile.name}
20
- %li <b>Role:</b> #{profile.role_name}
21
- %li <b>User.email:</b> #{profile.user ? profile.user.email : nil}
22
- %li <b>City:</b> #{profile.current_city ? profile.current_city.name : nil}
23
- %li
24
- <b>Profile Photo:</b>
25
- = image_tag profile.profile_photo.photo.url(:thumb) rescue nil
26
-
27
- .col.s8
28
- %h5 Shared galleries
29
- - profile.shared_galleries.unscoped.where( :is_trash => false ).each do |g|
30
- &gt; #{link_to g.name, gallery_path(g.slug)} <br />
31
- = render 'meta', :item => g
32
- <hr />
33
-
34
- %h5 Newsitems
35
- - profile.newsitems.each do |n|
36
- = render 'ish_manager/newsitems/item', n: n, profile_id: profile.id
37
- <hr />
38
-
39
- %h5 Bookmarked Locations (#{profile.bookmarked_locations.length})
40
- %ul.browser-default
41
- - profile.bookmarked_locations.each do |n|
42
- %li
43
- = n.slug
44
-
9
+ %ul.browser-default
10
+ - @user_profiles.each do |profile|
11
+ %li
12
+ = link_to '[~]', edit_user_profile_path(profile)
13
+ = profile.user&.email
45
14
 
@@ -1,5 +1,9 @@
1
1
  .manager-users--index
2
2
  %h2
3
- People
4
- (#{@city.current_users.length})
3
+ Users (#{users.count})
4
+
5
+ %ul.browser-default
6
+ - users.map do |user|
7
+ %li= user.email
8
+
5
9
  %hr
@@ -0,0 +1,2 @@
1
+
2
+ = render 'index', users: @users
@@ -19,6 +19,7 @@
19
19
 
20
20
  = javascript_include_tag "ish_manager/application"
21
21
  = javascript_include_tag "ish_manager/materialize"
22
+ = javascript_include_tag "ish_manager/application_materialize"
22
23
 
23
24
  = csrf_meta_tags
24
25
  %body{ class: [ params[:controller].gsub("ish_manager/",""), "#{params[:controller].gsub("ish_manager/","")}-#{params[:action]}", params[:action]] }
@@ -37,7 +38,7 @@
37
38
  %p.notice= notice
38
39
  - if alert
39
40
  %p.alert= alert
40
- .container
41
+
41
42
  = yield
42
43
  = render 'ish_manager/application/main_footer'
43
44
  = render 'analytics' if Rails.env.production?
data/config/routes.rb CHANGED
@@ -1,26 +1,23 @@
1
+
1
2
  IshManager::Engine.routes.draw do
2
- root :to => 'application#home'
3
3
 
4
- resources :campaigns
4
+ post 'email_test', to: 'application#email_test', as: :email_test
5
5
 
6
+ root :to => 'application#home'
7
+
8
+ ## @deprecated: use Locations
6
9
  resources :cities do
7
10
  resources :features
8
11
  resources :newsitems
9
12
  resources :reports
10
13
  resources :galleries
11
- resources :users
12
14
  resources :videos
13
15
  resources :events
14
16
  resources :venues
15
17
  resources :tags
16
18
  end
17
-
18
- resources :covered_calls
19
-
20
- resources :email_templates
21
19
  resources :events
22
20
 
23
- resources :features
24
21
  resources :friends
25
22
 
26
23
  get 'galleries', :to => 'galleries#index', :defaults => { :render_type => Gallery::RENDER_THUMBS }
@@ -35,14 +32,17 @@ IshManager::Engine.routes.draw do
35
32
 
36
33
  get 'image_assets', to: 'image_assets#index', as: :image_assets
37
34
 
38
- resources :invoices do
39
- # resources :payments
40
- end
41
- resources :iron_condors
35
+ # resources :invoices do
36
+ # resources :payments
37
+ # end
38
+ # resources :orders
42
39
 
43
- get 'leads', :to => 'leads#index', :defaults => { :is_done => false }
44
- get 'leads/done', :to => 'leads#index', :defaults => { :is_done => true }, :as => :done_leads
45
- resources :leads
40
+ # namespace :iron_warbler do
41
+ # resources :iron_condors
42
+ # resources :stock_watches
43
+ # resources :option_watches
44
+ # resources :covered_calls
45
+ # end
46
46
 
47
47
  scope 'gameui' do
48
48
  get 'maps/:id/map-editor', to: 'maps#map_editor', as: :location_map_editor
@@ -57,19 +57,25 @@ IshManager::Engine.routes.draw do
57
57
  resources 'markers'
58
58
  end
59
59
 
60
- resources :newsitems
60
+ ## @TODO: move into a namespace, eg :office_suite
61
+ get 'leads', :to => 'leads#index', :defaults => { :is_done => false }
62
+ get 'leads/done', :to => 'leads#index', :defaults => { :is_done => true }, :as => :done_leads
63
+ resources :leads
64
+ resources :meetings
65
+ namespace :office_suite do
66
+ resources :campaigns
67
+ resources :email_templates
68
+ resources :unsubscribes
69
+ end
61
70
 
62
- resources :orders
63
- get 'co_tailors', :to => 'co_tailors#home'
64
- post 'co_tailors/products', :to => 'co_tailors#create_product'
65
- patch 'co_tailors/products/:id', :to => 'co_tailors#update_product', :as => :co_tailors_product
71
+ resources :newsitems
66
72
 
67
73
  resources :photos
68
74
  resources :payments
69
- ## profiles, see user_profiles
70
75
 
71
76
  resources :reports
72
77
 
78
+ ## @deprecated: use Locations
73
79
  resources :sites do
74
80
  resources :features
75
81
  resources :newsitems
@@ -84,10 +90,6 @@ IshManager::Engine.routes.draw do
84
90
  resources :tags
85
91
  end
86
92
 
87
- ## @TODO: move these to iron warbler
88
- resources :stock_watches
89
- resources :option_watches
90
-
91
93
  resources :tags do
92
94
  resources :features
93
95
  resources :newsitems
@@ -97,13 +99,16 @@ IshManager::Engine.routes.draw do
97
99
  resources :videos
98
100
  end
99
101
 
102
+ resources :users
100
103
  resources :user_profiles do
101
104
  resources :newsitems
102
105
  end
103
106
  resources :user_profiles, :as => :profiles do
104
- resources :newsitems
107
+ # resources :newsitems
105
108
  end
106
109
 
110
+ ## @TODO: venues can only be in cities, right?
111
+ ## @deprecated: use Locations
107
112
  resources :venues
108
113
  resources :videos
109
114
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ish_manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8.304
4
+ version: 0.1.8.307
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-08-14 00:00:00.000000000 Z
11
+ date: 2022-09-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk
@@ -219,6 +219,7 @@ files:
219
219
  - app/assets/images/ui-icons_ffffff_256x240.png
220
220
  - app/assets/images/wait.gif
221
221
  - app/assets/javascripts/ish_manager/application.js
222
+ - app/assets/javascripts/ish_manager/application_materialize.js
222
223
  - app/assets/javascripts/ish_manager/maps.js
223
224
  - app/assets/javascripts/ish_manager/materialize.js
224
225
  - app/assets/javascripts/ish_manager/shared.js
@@ -253,6 +254,7 @@ files:
253
254
  - app/assets/stylesheets/ish_manager/bootstrap.css
254
255
  - app/assets/stylesheets/ish_manager/galleries.scss
255
256
  - app/assets/stylesheets/ish_manager/jquery-ui.css
257
+ - app/assets/stylesheets/ish_manager/leads.scss
256
258
  - app/assets/stylesheets/ish_manager/maps.scss
257
259
  - app/assets/stylesheets/ish_manager/materialize.css
258
260
  - app/assets/stylesheets/ish_manager/photos.scss
@@ -271,6 +273,7 @@ files:
271
273
  - app/controllers/ish_manager/leads_controller.rb
272
274
  - app/controllers/ish_manager/maps_controller.rb
273
275
  - app/controllers/ish_manager/markers_controller.rb
276
+ - app/controllers/ish_manager/meetings_controller.rb
274
277
  - app/controllers/ish_manager/newsitems_controller.rb
275
278
  - app/controllers/ish_manager/orders_controller.rb
276
279
  - app/controllers/ish_manager/payments_controller.rb
@@ -278,6 +281,7 @@ files:
278
281
  - app/controllers/ish_manager/reports_controller.rb
279
282
  - app/controllers/ish_manager/sites_controller.rb
280
283
  - app/controllers/ish_manager/tags_controller.rb
284
+ - app/controllers/ish_manager/unsubscribes_controller.rb
281
285
  - app/controllers/ish_manager/user_profiles_controller.rb
282
286
  - app/controllers/ish_manager/users_controller.rb
283
287
  - app/controllers/ish_manager/venues_controller.rb
@@ -285,7 +289,9 @@ files:
285
289
  - app/helpers/ish_manager/application_helper.rb
286
290
  - app/helpers/ish_manager/images_helper.rb
287
291
  - app/jobs/ish_manager/application_job.rb
292
+ - app/jobs/ish_manager/test_email_job.rb
288
293
  - app/mailers/ish_manager/application_mailer.rb
294
+ - app/mailers/ish_manager/meeting_mailer.rb
289
295
  - app/models/ish_manager/ability.rb
290
296
  - app/models/ish_manager/application_record.rb
291
297
  - app/views/ish_manager/application/_analytics.html
@@ -305,8 +311,8 @@ files:
305
311
  - app/views/ish_manager/application_mailer/option_alert.html.erb
306
312
  - app/views/ish_manager/application_mailer/shared_galleries.html.erb
307
313
  - app/views/ish_manager/application_mailer/stock_alert.html.erb
314
+ - app/views/ish_manager/application_mailer/test_email.html.haml
308
315
  - app/views/ish_manager/application_mailer/welcome.html.erb
309
- - app/views/ish_manager/campaigns/index.haml
310
316
  - app/views/ish_manager/cities/_form.haml
311
317
  - app/views/ish_manager/cities/_header.haml
312
318
  - app/views/ish_manager/cities/edit.haml
@@ -371,6 +377,11 @@ files:
371
377
  - app/views/ish_manager/markers/_index_small.haml-trash
372
378
  - app/views/ish_manager/markers/edit.haml
373
379
  - app/views/ish_manager/markers/new.haml
380
+ - app/views/ish_manager/meeting_mailer/morning_reminder.haml
381
+ - app/views/ish_manager/meetings/_form.haml
382
+ - app/views/ish_manager/meetings/edit.haml
383
+ - app/views/ish_manager/meetings/index.haml
384
+ - app/views/ish_manager/meetings/new.haml
374
385
  - app/views/ish_manager/newsitems/_form.haml
375
386
  - app/views/ish_manager/newsitems/_header.haml
376
387
  - app/views/ish_manager/newsitems/_index.haml
@@ -409,12 +420,15 @@ files:
409
420
  - app/views/ish_manager/tags/index.haml
410
421
  - app/views/ish_manager/tags/new.haml
411
422
  - app/views/ish_manager/tags/show.haml
423
+ - app/views/ish_manager/unsubscribes/new.haml
412
424
  - app/views/ish_manager/user_profiles/_form.haml
425
+ - app/views/ish_manager/user_profiles/_show.haml
413
426
  - app/views/ish_manager/user_profiles/edit.haml
414
427
  - app/views/ish_manager/user_profiles/index.haml
415
428
  - app/views/ish_manager/user_profiles/new.haml
416
429
  - app/views/ish_manager/user_profiles/show.haml
417
430
  - app/views/ish_manager/users/_index.haml
431
+ - app/views/ish_manager/users/index.haml
418
432
  - app/views/ish_manager/venues/_form.haml
419
433
  - app/views/ish_manager/venues/_index.haml
420
434
  - app/views/ish_manager/venues/_search.haml
@@ -1,24 +0,0 @@
1
-
2
- .manager--campaigns-index
3
- %h5
4
- = link_to 'Campaigns', campaigns_path
5
- (#{@campaigns.count})
6
- = link_to raw("<i class='fa fa-plus-square'></i>"), new_campaign_path
7
- -# = link_to '(done)', done_campaigns_path
8
-
9
- %table
10
- %tr
11
- %th &nbsp;
12
- %th Created At
13
- %th Company
14
- %th Email
15
- %th Job Url
16
- %th Description
17
- - @campaigns.each do |campaign|
18
- %tr
19
- %td= link_to raw('<i class="fa fa-play"></i>'), campaign_path( campaign )
20
- %td= pretty_date campaign.created_at
21
- %td= campaign.company
22
- %td= link_to raw('<i class="fa fa-envelope"></i>'), "mailto:#{campaign.email}"
23
- %td= link_to raw('<i class="fa fa-user-md"></i>'), campaign.job_url, :target => '_blank'
24
- %td= campaign.description