ish_manager 0.1.8.380 → 0.1.8.381

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2f1ccdbb8b5690e2af9de00c78266a89f897fbe9faf0aae8de83f8353e0e9c47
4
- data.tar.gz: 68da18a96da28c456018c3792507b190bb87c7927020b481eb240ac92d842788
3
+ metadata.gz: 4d2e5be382bc48dfdf58151137f5038df66d50c386e046cb44a0700fe0b6c3c7
4
+ data.tar.gz: 361c1da27ebd6b09c154e0a101e65eb7e9c11260411be5847cc6c6bc17c6e710
5
5
  SHA512:
6
- metadata.gz: d8ed260c26f354e7ceab70994df4a2bba7d4d527f7f6ef10f6523102ddb5fd18fd1e5a330a874aafd3d84498f80306e45d5791c64c0cd254f1c2fa8c59cf3ff8
7
- data.tar.gz: 125401f5699b1eded426dd8137c71763f1971c8fb875c1137411f1b421d9dad3d71e475d340db23c0f3a71e32c5d6d581fb0fd360a74bd0db4b61ffd1f9fb1d2
6
+ metadata.gz: 5b0de89b4b160a00565e0806fd5fcf5f9495090c64c040d2f4c06897766ecf8db96e54c0a5e259cbd31fcb79dc43ae9ba2f78e45dc29535cdb0399d1587671e6
7
+ data.tar.gz: 999d4cff0011f3ad55e53bfa5c26c0432be283f1c811b33719de12aa0dfdd19333ea71143f4655005bb3f32403149b84f9dd60c37fae4e9b78ceef9254fe62c9
@@ -16,6 +16,33 @@ $(document).ready(() => {
16
16
 
17
17
  })
18
18
 
19
+ $(".archive-btn").click(function(e) {
20
+ const jwt_token = $("#Config").data('jwt-token')
21
+ const action_path = $(this).data('url')
22
+ const out = []
23
+
24
+ $( $("input[type='checkbox'].i-sel:checked") ).each( idx => {
25
+ let val = $($("input[type='checkbox'].i-sel:checked")[idx]).val()
26
+ out.push(val)
27
+ })
28
+
29
+ $.ajax({
30
+ url: action_path,
31
+ type: 'POST',
32
+ data: {
33
+ ids: out,
34
+ jwt_token: jwt_token,
35
+ },
36
+ success: e => {
37
+ logg((e||{}).responseText, 'archived Ok')
38
+ location.reload()
39
+ },
40
+ error: e => {
41
+ logg((e||{}).responseText, 'archived Err')
42
+ },
43
+ })
44
+
45
+ })
19
46
 
20
47
  $(".delete-btn").click(function(e) {
21
48
  const jwt_token = $("#Config").data('jwt-token')
@@ -5,11 +5,13 @@ class ::IshManager::EmailConversationsController < IshManager::ApplicationContro
5
5
 
6
6
  def index
7
7
  authorize! :email_conversations_index, IshManager::Ability
8
+ @email_conversations = ::Office::EmailConversation.all
8
9
 
9
10
  if params[:slug]
10
- @email_conversations = ::Office::EmailConversation.in_emailtag( params[:slug] )
11
- else
12
- @email_conversations = ::Office::EmailConversation.in_no_trash
11
+ @email_conversations = @email_conversations.in_emailtag( params[:slug] )
12
+ end
13
+ if params[:not_slug]
14
+ @email_conversations = @email_conversations.not_in_emailtag(params[:not_slug])
13
15
  end
14
16
  @email_conversations = @email_conversations.order_by( latest_at: :desc )
15
17
  end
@@ -1,5 +1,5 @@
1
1
 
2
- .row
2
+ .row.max-width
3
3
  .col-sm-12
4
4
  - if notice
5
5
  - if notice.class == Array
@@ -29,7 +29,7 @@
29
29
  %li= link_to 'Ish::UserProfiles', user_profiles_path
30
30
  %li= link_to "Ish::ImageAsset's", image_assets_path
31
31
  %li
32
- = link_to 'Maps', maps_path
32
+ = link_to 'Locations (maps)', maps_path
33
33
  .inline-search
34
34
  = form_tag maps_path, method: :get do
35
35
  = text_field_tag :q
@@ -41,13 +41,12 @@
41
41
  .a
42
42
  %ul
43
43
  %li
44
- = link_to "Inbox (#{Office::EmailConversation.in_inbox.length})", email_conversations_path
44
+ = link_to "#{WpTag::INBOX} (#{Office::EmailConversation.in_emailtag(WpTag::INBOX).length})", email_conversations_in_path(WpTag::INBOX)
45
45
  = link_to '[+]', new_email_context_path
46
46
  %li
47
47
  = link_to "Templates (#{Ish::EmailTemplate.all.count})", email_templates_path
48
48
  = link_to '[+]', new_email_template_path
49
49
  %li
50
- -# = link_to 'Contexts', email_contexts_path
51
50
  = link_to 'Contexts', notsent_email_contexts_path
52
51
  = link_to '[+]', new_email_context_path
53
52
  -# %li
@@ -1,11 +1,12 @@
1
1
 
2
- .row
3
- .col-md-6
4
- %h1 Categories
5
- = render 'ish_manager/categories/subtree', subtree: @categories_flat, config: { parent_id: nil, parent_ids: @categories_flat.map { |c| c[5] }.uniq }
2
+ .categories-index.max-width
3
+ .row
4
+ .col-md-6
5
+ %h1 Categories
6
+ = render 'ish_manager/categories/subtree', subtree: @categories_flat, config: { parent_id: nil, parent_ids: @categories_flat.map { |c| c[5] }.uniq }
6
7
 
7
- .col-md-6
8
- %h1 Tags
9
- %ul
10
- - @tags.each do |tag|
11
- %li= tag[:name]
8
+ .col-md-6
9
+ %h1 Tags
10
+ %ul
11
+ - @tags.each do |tag|
12
+ %li= tag[:name]
@@ -3,21 +3,32 @@
3
3
 
4
4
  .second-header
5
5
  %i.material-icons mail
6
- = link_to email_conversations_in_emailtag_path(WpTag::EMAILTAG_INBOX) do
7
- Inbox (#{Office::EmailConversation.in_inbox.length})
8
- = link_to email_conversations_path do
9
- Archived (#{Office::EmailConversation.in_no_trash.length})
10
- = link_to email_conversations_in_emailtag_path(WpTag::EMAILTAG_TRASH) do
11
- Trash (#{Office::EmailConversation.in_emailtag(WpTag::EMAILTAG_TRASH).length})
6
+ = link_to email_conversations_in_path(WpTag::INBOX) do
7
+ Inbox (#{Office::EmailConversation.in_emailtag(WpTag::INBOX).length})
8
+ = link_to email_conversations_notin_path(WpTag::INBOX) do
9
+ Not Inbox (#{Office::EmailConversation.not_in_emailtag(WpTag::INBOX).length})
12
10
 
13
- Selected: #{params[:slug] || 'archived' }
11
+ = link_to email_conversations_in_path(WpTag::TRASH) do
12
+ Trash (#{Office::EmailConversation.in_emailtag(WpTag::TRASH).length})
13
+ = link_to email_conversations_notin_path(WpTag::TRASH) do
14
+ Not Trash (#{Office::EmailConversation.not_in_emailtag(WpTag::TRASH).length})
15
+
16
+ - if params[:slug]
17
+ slug: #{params[:slug]}
18
+ - if params[:not_slug]
19
+ not slug: #{params[:not_slug]}
14
20
 
15
21
  .actions
16
22
 
23
+ %a.btn.archive-btn{ href: "javascript: void(0)", data: { url: "/api/email_conversations/rmtag/#{WpTag::INBOX}" } }
24
+ %i.material-icons archive
25
+ archive
17
26
  %a.btn.delete-btn{ href: "javascript: void(0)", data: { url: '/api/email_conversations' } }
18
27
  %i.material-icons delete
28
+ delete
19
29
  %a.btn.reload-btn{ href: "javascript: location.reload()" }
20
30
  %i.material-icons refresh
31
+ refresh
21
32
 
22
33
  %table.conversations
23
34
  %tr
@@ -1,5 +1,5 @@
1
1
 
2
- .maps-map-editor
2
+ .maps-map-editor.max-width
3
3
  = render 'map_meta_row', map: @map
4
4
  %h1 Map Editor
5
5
 
@@ -1,4 +1,8 @@
1
- %h1 New map
2
1
 
3
- = render 'form'
2
+ .maps-new
3
+ .max-width
4
+ .header
5
+ %h3.title New map
6
+
7
+ = render 'form'
4
8
 
@@ -2,7 +2,7 @@
2
2
  -# ish_manager / maps / show.haml
3
3
  -#
4
4
 
5
- .maps-show
5
+ .maps-show.max-width
6
6
  = render 'map_meta_row', map: @map
7
7
  %hr
8
8
 
@@ -68,21 +68,11 @@
68
68
  .field
69
69
  = f.label :url, "URL (if any)"
70
70
  = f.text_field :url
71
- .row
72
- .col-sm-3 &nbsp;
73
- .col-sm-5
74
- .field
75
- = f.label :description
76
- = f.text_area :description
77
71
  .row
78
72
  .col-sm-4
79
73
  .field
80
74
  = f.label :item_type
81
75
  = f.select :item_type, options_for_select( ::Gameui::Marker::ITEM_TYPES, selected: @marker.item_type )
82
- .col-sm-4
83
- .field
84
- = f.label :ordering
85
- = f.text_field :ordering
86
76
  .col-sm-4
87
77
  .field
88
78
  = f.check_box :is_active
@@ -1,4 +1,5 @@
1
1
 
2
- Editing marker for map `#{@map.slug}`
2
+ .markers-edit.max-width
3
+ Editing marker for map `#{@map.slug}`
3
4
 
4
- = render 'form'
5
+ = render 'form'
@@ -1,5 +1,7 @@
1
1
 
2
- .a New marker
2
+ .markers-new.max-width
3
+ .header
4
+ %h3.title New Marker
3
5
 
4
- = render 'form'
6
+ = render 'form'
5
7
 
data/config/routes.rb CHANGED
@@ -62,7 +62,8 @@ IshManager::Engine.routes.draw do
62
62
  resources :email_messages
63
63
 
64
64
  get 'email_conversations', to: 'email_conversations#index'
65
- get 'email_conversations/in_emailtag/:slug', to: 'email_conversations#index', as: :email_conversations_in_emailtag
65
+ get 'email_conversations/in/:slug', to: 'email_conversations#index', as: :email_conversations_in
66
+ get 'email_conversations/notin/:not_slug', to: 'email_conversations#index', as: :email_conversations_notin
66
67
  get 'email_conversations/show/:id', to: 'email_conversations#show', as: :email_conversation
67
68
 
68
69
  get 'email_contexts/for_lead/:lead_id', to: 'email_contexts#index', as: :email_contexts_for_lead
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.380
4
+ version: 0.1.8.381
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-03-20 00:00:00.000000000 Z
11
+ date: 2023-03-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails