boxroom 0.0.4 → 0.0.5

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 (50) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +77 -1
  3. data/app/concepts/boxroom/folder/view/show.erb +1 -1
  4. data/app/concepts/boxroom/user_file/contract/notify.rb +7 -0
  5. data/app/concepts/boxroom/user_file/operations/notify_create.rb +27 -0
  6. data/app/concepts/boxroom/user_file/operations/notify_remove.rb +27 -0
  7. data/app/concepts/boxroom/user_file/operations/notify_update.rb +27 -0
  8. data/app/controllers/boxroom/files_controller.rb +3 -0
  9. data/app/controllers/boxroom/folders_controller.rb +7 -7
  10. data/app/mailers/boxroom/user_file_mailer.rb +19 -0
  11. data/app/models/boxroom/permitted_params.rb +1 -1
  12. data/app/models/boxroom/user_file.rb +5 -5
  13. data/app/views/boxroom/folders/_form.html.erb +28 -0
  14. data/app/views/boxroom/folders/show.html.erb +8 -0
  15. data/app/views/boxroom/user_file_mailer/notify_create.text.erb +2 -0
  16. data/app/views/boxroom/user_file_mailer/notify_remove.text.erb +2 -0
  17. data/app/views/boxroom/user_file_mailer/notify_update.text.erb +2 -0
  18. data/app/views/boxroom/user_mailer/reset_password_email.de.text.erb +0 -1
  19. data/app/views/boxroom/user_mailer/reset_password_email.en.text.erb +0 -1
  20. data/app/views/boxroom/user_mailer/reset_password_email.es.text.erb +0 -1
  21. data/app/views/boxroom/user_mailer/reset_password_email.fr.text.erb +0 -1
  22. data/app/views/boxroom/user_mailer/reset_password_email.it.text.erb +0 -1
  23. data/app/views/boxroom/user_mailer/reset_password_email.nl.text.erb +0 -1
  24. data/app/views/boxroom/user_mailer/reset_password_email.zh-CN.text.erb +0 -1
  25. data/app/views/boxroom/user_mailer/share_link_email.de.text.erb +0 -1
  26. data/app/views/boxroom/user_mailer/share_link_email.en.text.erb +0 -1
  27. data/app/views/boxroom/user_mailer/share_link_email.es.text.erb +0 -1
  28. data/app/views/boxroom/user_mailer/share_link_email.fr.text.erb +0 -1
  29. data/app/views/boxroom/user_mailer/share_link_email.it.text.erb +0 -1
  30. data/app/views/boxroom/user_mailer/share_link_email.nl.text.erb +0 -1
  31. data/app/views/boxroom/user_mailer/share_link_email.zh-CN.text.erb +0 -1
  32. data/app/views/boxroom/user_mailer/signup_email.de.text.erb +0 -1
  33. data/app/views/boxroom/user_mailer/signup_email.en.text.erb +0 -1
  34. data/app/views/boxroom/user_mailer/signup_email.es.text.erb +0 -1
  35. data/app/views/boxroom/user_mailer/signup_email.fr.text.erb +0 -1
  36. data/app/views/boxroom/user_mailer/signup_email.it.text.erb +0 -1
  37. data/app/views/boxroom/user_mailer/signup_email.nl.text.erb +0 -1
  38. data/app/views/boxroom/user_mailer/signup_email.zh-CN.text.erb +0 -1
  39. data/config/locales/de.yml +12 -1
  40. data/config/locales/en.yml +10 -0
  41. data/config/locales/es.yml +11 -1
  42. data/config/locales/fr.yml +11 -1
  43. data/config/locales/it.yml +11 -1
  44. data/config/locales/nl.yml +11 -1
  45. data/config/locales/zh-CN.yml +11 -1
  46. data/db/migrate/{20180309104530_add_original_id_to_users.rb → 20180309104530_boxroom_add_original_id_to_users.rb} +1 -1
  47. data/db/migrate/20180323134701_boxroom_add_notifications_to_folders.rb +10 -0
  48. data/lib/boxroom/configuration.rb +11 -9
  49. data/lib/boxroom/version.rb +1 -1
  50. metadata +12 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a37460d1fbcae9e2ee21af18724818a2d9efd917
4
- data.tar.gz: a197d3fdba1743d42fc0672474cb9819ddd19420
3
+ metadata.gz: 5008e36ca69f11ca4d4a2a9520000895932bf6bf
4
+ data.tar.gz: 4dc36ec5ca5de32f74ac9c70088ab292f7d8d962
5
5
  SHA512:
6
- metadata.gz: 524b199dc92ecd7aea57c122392582f3f148652dcbd2be209b7c48dd2775ed0eaca4fe90a14585c3254f65dc14a1ab2a54b1767656e545a4703fb17b9ed546e7
7
- data.tar.gz: b939d685ee1e1f41b76b1a2c7c8b346706bdadffe789758fa4c24d74c9945dc2f304b2f1f5dee298be82451ff109f499078f2b4af4834a7d270bd219cc55bbfc
6
+ metadata.gz: 54dc60f75254a04c3e261394943fd8ebdda4591510fedfb3a3e8f40dd62c7aada22765a6a9cd5b8d47937c0ab3fc547e9748f2782a34526c6e382cd1fbd9e8b4
7
+ data.tar.gz: 1208efb6e5b18f0fe5650aea6a9337941d5ada7c6f8d59cf1e5b2fe7f6f0f2fcc36716b55e91ace0872ded765a5766952347b8631a30ba09a12defad5a532d4c
data/README.md CHANGED
@@ -12,6 +12,7 @@ sharing files in a web browser. It lets users
12
12
  - share files
13
13
  - search folders and files
14
14
  - sort files and folders
15
+ - notify by email when files in specific folders are created, updated or removed
15
16
 
16
17
  Admins can:
17
18
  - manage users
@@ -44,6 +45,7 @@ Boxroom.configure do |config|
44
45
  config.show_settings = true
45
46
  config.show_shared_files = true
46
47
  config.show_search = true
48
+ config.enable_notifications = true # notify by email when files in specific folders are created, updated or removed
47
49
  end
48
50
  ```
49
51
 
@@ -71,9 +73,83 @@ end
71
73
  ```
72
74
  - if you modify your users without callbacks in any place you should also take care of `boxroom_users` table yourself.
73
75
 
74
- ## Contributing
76
+ ## Mail settings
77
+
78
+ Boxroom sends email on the following occasions:
79
+
80
+ * When inviting new users
81
+ * On a reset password request
82
+ * When a file is shared
83
+
84
+ For the application to be able to send email, a few things have to be set up. Depending on the environment
85
+ you're working in, either open `config/environments/development.rb` or `config/environments/production.rb`.
86
+ Uncomment the following lines and fill in the correct settings of your mail server:
87
+
88
+ ```ruby
89
+ config.action_mailer.delivery_method = :smtp
90
+ config.action_mailer.smtp_settings = {
91
+ address: 'mailhost',
92
+ port: 587,
93
+ user_name: 'user_name',
94
+ password: 'password',
95
+ authentication: 'plain'
96
+ }
97
+ ```
98
+
99
+ Also uncomment the following and replace `localhost:3000` with the host name the app will be running under:
100
+
101
+ ```ruby
102
+ config.action_mailer.default_url_options = { host: 'localhost:3000' }
103
+ ```
104
+
105
+ Lastly, you have to choose the address emails will be sent from. You can do
106
+ this by uncommenting and adjusting the following:
107
+
108
+ ```ruby
109
+ ActionMailer::Base.default from: 'Boxroom <yourname@yourdomain.com>'
110
+ ```
111
+
112
+
113
+ ## Languages
114
+
115
+ Thanks to [Rob Halff](https://github.com/rhalff), [Marcus Ilgner](https://github.com/milgner),
116
+ [Jessica Marcon](https://github.com/marcontwm), [Arnaud Sellenet](https://github.com/demental),
117
+ [Burnaby John](https://github.com/john-coding) and [marcosantoniocaro](https://github.com/marcosantoniocaro)
118
+ Boxroom is now available in Dutch, German, Italian, French, Simplified Chinese and Spanish.
119
+
120
+ English is the default. To change the language, open `config/application.rb` and set the language you desire:
121
+
122
+ ```ruby
123
+ config.i18n.default_locale = :en # English
124
+ config.i18n.default_locale = :nl # Dutch
125
+ config.i18n.default_locale = :de # German
126
+ config.i18n.default_locale = :it # Italian
127
+ config.i18n.default_locale = :fr # French
128
+ config.i18n.default_locale = :'zh-CN' # Simplified Chinese
129
+ config.i18n.default_locale = :es # Spanish
130
+ ```
131
+
132
+ It would be great to have many more languages. I am waiting for your pull requests.
133
+
134
+ ## Contributing and Development
75
135
  Please feel free to leave an issue or PR.
76
136
 
137
+ - Use `docker-compose up -d` to launch mailcatcher on [http://localhost:1080](http://localhost:1080)
138
+ - Update mail settings in `config/environments/development.rb`
139
+ ```ruby
140
+ config.action_mailer.raise_delivery_errors = true
141
+ config.action_mailer.perform_caching = false
142
+ config.action_mailer.perform_deliveries = true
143
+ config.action_mailer.delivery_method = :smtp
144
+ config.action_mailer.smtp_settings = {
145
+ address: 'localhost',
146
+ port: 1025
147
+ }
148
+ config.action_mailer.default_url_options = { :host => 'localhost:3000' }
149
+
150
+ ActionMailer::Base.default from: 'Boxroom <yourname@yourdomain.com>'
151
+ ```
152
+
77
153
  ## Testing
78
154
  - run migrations `bin/rails db:migrate RAILS_ENV=test`
79
155
  - run tests `bin/rails test`
@@ -57,7 +57,7 @@
57
57
  <%= link_to '<span class="icon is-small"><i class="fa fa-clipboard"></i></span>',
58
58
  {controller: :clipboard, action: :create, id: file.id, type: 'file', folder_id: file.folder, authenticity_token: form_authenticity_token},
59
59
  method: :post, title: t(:add_to_clipboard)
60
- %>&nbsp;
60
+ %>
61
61
  <% if Boxroom.configuration.show_shared_files %>
62
62
  <%= link_to '<span class="icon is-small"><i class="fa fa-share"></i></span>', new_file_share_link_path(file), title: t(:share) %>
63
63
  <% end %>
@@ -0,0 +1,7 @@
1
+ module Boxroom::UserFile::Contract
2
+ class Notify < Reform::Form
3
+ property :id, virtual: true
4
+
5
+ validates :id, presence: true
6
+ end
7
+ end
@@ -0,0 +1,27 @@
1
+ module Boxroom
2
+ class UserFile < ActiveRecord::Base
3
+ class NotifyCreate < ::Trailblazer::Operation
4
+ step Trailblazer::Operation::Contract::Build(constant: Boxroom::UserFile::Contract::Notify)
5
+ step Trailblazer::Operation::Contract::Validate()
6
+ step :model!
7
+ step :check
8
+ step :notify
9
+
10
+ def model!(options, params:, **)
11
+ options['model'] = UserFile.find(params[:id])
12
+ end
13
+
14
+ def check(options, params:, **)
15
+ return false unless Boxroom.configuration.enable_notifications
16
+ return false unless options['model'].folder.notify_create
17
+ true
18
+ end
19
+
20
+ def notify(options, params:, **)
21
+ options['model'].folder.notify_emails.gsub(',', ' ').split.each do |email|
22
+ UserFileMailer.notify_create(options['model'], email).deliver_later
23
+ end
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,27 @@
1
+ module Boxroom
2
+ class UserFile < ActiveRecord::Base
3
+ class NotifyRemove < ::Trailblazer::Operation
4
+ step Trailblazer::Operation::Contract::Build(constant: Boxroom::UserFile::Contract::Notify)
5
+ step Trailblazer::Operation::Contract::Validate()
6
+ step :model!
7
+ step :check
8
+ step :notify
9
+
10
+ def model!(options, params:, **)
11
+ options['model'] = UserFile.find(params[:id])
12
+ end
13
+
14
+ def check(options, params:, **)
15
+ return false unless Boxroom.configuration.enable_notifications
16
+ return false unless options['model'].folder.notify_remove
17
+ true
18
+ end
19
+
20
+ def notify(options, params:, **)
21
+ options['model'].folder.notify_emails.gsub(',', ' ').split.each do |email|
22
+ UserFileMailer.notify_remove(options['model'].attachment_file_name, options['model'].folder, email).deliver_later
23
+ end
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,27 @@
1
+ module Boxroom
2
+ class UserFile < ActiveRecord::Base
3
+ class NotifyUpdate < ::Trailblazer::Operation
4
+ step Trailblazer::Operation::Contract::Build(constant: Boxroom::UserFile::Contract::Notify)
5
+ step Trailblazer::Operation::Contract::Validate()
6
+ step :model!
7
+ step :check
8
+ step :notify
9
+
10
+ def model!(options, params:, **)
11
+ options['model'] = UserFile.find(params[:id])
12
+ end
13
+
14
+ def check(options, params:, **)
15
+ return false unless Boxroom.configuration.enable_notifications
16
+ return false unless options['model'].folder.notify_update
17
+ true
18
+ end
19
+
20
+ def notify(options, params:, **)
21
+ options['model'].folder.notify_emails.gsub(',', ' ').split.each do |email|
22
+ UserFileMailer.notify_update(options['model'], email).deliver_later
23
+ end
24
+ end
25
+ end
26
+ end
27
+ end
@@ -34,6 +34,7 @@ module Boxroom
34
34
  File.open("#{Rails.root}/#{Boxroom.configuration.uploads_path}/#{Rails.env}/#{existing_file.id}/original/#{existing_file.id}", "ab") {|f| f.write(permitted_params.user_file["attachment"].read)}
35
35
  else
36
36
  @file = @target_folder.user_files.create(permitted_params.user_file)
37
+ UserFile::NotifyCreate.(params: {id: @file.id})
37
38
  end
38
39
 
39
40
  head :ok
@@ -46,6 +47,7 @@ module Boxroom
46
47
  # @file and @folder are set in require_existing_file
47
48
  def update
48
49
  if @file.update_attributes(permitted_params.user_file)
50
+ UserFile::NotifyUpdate.(params: {id: @file.id})
49
51
  redirect_to edit_file_url(@file), :notice => t(:your_changes_were_saved)
50
52
  else
51
53
  render :action => 'edit'
@@ -54,6 +56,7 @@ module Boxroom
54
56
 
55
57
  # @file and @folder are set in require_existing_file
56
58
  def destroy
59
+ UserFile::NotifyRemove.(params: {id: @file.id})
57
60
  @file.destroy
58
61
  redirect_to @folder
59
62
  end
@@ -2,14 +2,14 @@ module Boxroom
2
2
  class FoldersController < Boxroom::ApplicationController
3
3
  include Boxroom::BaseController
4
4
 
5
- before_action :require_existing_folder, :only => [:show, :edit, :update, :destroy]
6
- before_action :require_existing_target_folder, :only => [:new, :create]
7
- before_action :require_folder_isnt_root_folder, :only => [:edit, :update, :destroy]
5
+ before_action :require_existing_folder, only: [:show, :edit, :update, :destroy]
6
+ before_action :require_existing_target_folder, only: [:new, :create]
7
+ before_action :require_folder_isnt_root_folder, only: [:edit, :update, :destroy]
8
8
 
9
- before_action :require_create_permission, :only => [:new, :create]
10
- before_action :require_read_permission, :only => :show
11
- before_action :require_update_permission, :only => [:edit, :update]
12
- before_action :require_delete_permission, :only => :destroy
9
+ before_action :require_create_permission, only: [:new, :create]
10
+ before_action :require_read_permission, only: :show
11
+ before_action :require_update_permission, only: [:edit, :update]
12
+ before_action :require_delete_permission, only: :destroy
13
13
 
14
14
  def index
15
15
  redirect_to Folder.root
@@ -0,0 +1,19 @@
1
+ module Boxroom
2
+ class UserFileMailer < ActionMailer::Base
3
+ def notify_create(user_file, email)
4
+ @user_file = user_file
5
+ mail(to: email, subject: t(:file_added))
6
+ end
7
+
8
+ def notify_update(user_file, email)
9
+ @user_file = user_file
10
+ mail(to: email, subject: t(:file_updated))
11
+ end
12
+
13
+ def notify_remove(file_name, folder, email)
14
+ @file_name = file_name
15
+ @folder = folder
16
+ mail(to: email, subject: t(:file_removed))
17
+ end
18
+ end
19
+ end
@@ -7,7 +7,7 @@ module Boxroom
7
7
  end
8
8
 
9
9
  def folder_attributes
10
- [:name]
10
+ [:name, :notify_emails, :notify_create, :notify_update, :notify_remove]
11
11
  end
12
12
 
13
13
  def group_attributes
@@ -1,15 +1,15 @@
1
1
  module Boxroom
2
2
  class UserFile < ActiveRecord::Base
3
- has_attached_file :attachment, :path => ":rails_root/#{Boxroom.configuration.uploads_path}/:rails_env/:id/:style/:id", :restricted_characters => Boxroom::RESTRICTED_CHARACTERS
3
+ has_attached_file :attachment, path: ":rails_root/#{Boxroom.configuration.uploads_path}/:rails_env/:id/:style/:id", restricted_characters: Boxroom::RESTRICTED_CHARACTERS
4
4
  do_not_validate_attachment_file_type :attachment
5
5
 
6
6
  belongs_to :folder
7
- has_many :share_links, :dependent => :destroy
7
+ has_many :share_links, dependent: :destroy
8
8
 
9
- validates_attachment_presence :attachment, :message => I18n.t(:blank, :scope => [:activerecord, :errors, :messages])
9
+ validates_attachment_presence :attachment, message: I18n.t(:blank, scope: [:activerecord, :errors, :messages])
10
10
  validates_presence_of :folder_id
11
- validates_uniqueness_of :attachment_file_name, :scope => 'folder_id', :message => I18n.t(:exists_already, :scope => [:activerecord, :errors, :messages])
12
- validates_format_of :attachment_file_name, :with => /\A[^\/\\\?\*:|"<>]+\z/, :message => I18n.t(:invalid_characters, :scope => [:activerecord, :errors, :messages])
11
+ validates_uniqueness_of :attachment_file_name, scope: 'folder_id', message: I18n.t(:exists_already, scope: [:activerecord, :errors, :messages])
12
+ validates_format_of :attachment_file_name, with: /\A[^\/\\\?\*:|"<>]+\z/, message: I18n.t(:invalid_characters, scope: [:activerecord, :errors, :messages])
13
13
 
14
14
  def copy(target_folder)
15
15
  new_file = self.dup
@@ -8,6 +8,34 @@
8
8
  <div class="control">
9
9
  <%= f.text_field :name, class: 'input' %>
10
10
  </div>
11
+ <% if Boxroom.configuration.enable_notifications %>
12
+ <section class="section">
13
+ <h2 class="subtitle"> <%= t :edit_notifications %> </h2>
14
+ <%= f.label :notify_emails, class: 'label' %>
15
+ <div class="control">
16
+ <%= f.text_field :notify_emails, placeholder: t(:notify_emails_list), class: 'input' %>
17
+ </div>
18
+
19
+ <div class="control">
20
+ <label class="checkbox">
21
+ <%= f.check_box :notify_create %>
22
+ <%= t :notify_create %>
23
+ </label>
24
+ </div>
25
+ <div class="control">
26
+ <label class="checkbox">
27
+ <%= f.check_box :notify_update %>
28
+ <%= t :notify_update %>
29
+ </label>
30
+ </div>
31
+ <div class="control">
32
+ <label class="checkbox">
33
+ <%= f.check_box :notify_remove %>
34
+ <%= t :notify_remove %>
35
+ </label>
36
+ </div>
37
+ </section>
38
+ <% end %>
11
39
  </div>
12
40
  <div class="field is-grouped">
13
41
  <div class="control">
@@ -40,6 +40,14 @@
40
40
  <span><%= t(:clipboard) %></span>
41
41
  </a>
42
42
  </li>
43
+ <% if boxroom_current_user.can_update(@folder) -%>
44
+ <li>
45
+ <a href="<%= edit_folder_path(@folder) %>">
46
+ <span class="icon is-small"><i class="fa fa-edit"></i></span>
47
+ <span><%= t(:edit) %></span>
48
+ </a>
49
+ </li>
50
+ <% end -%>
43
51
  </ul>
44
52
  </div>
45
53
 
@@ -0,0 +1,2 @@
1
+ <%= t 'activerecord.models.folder' %>: <%= @user_file.folder.name %> | <%= folder_url(@user_file.folder) %>
2
+ <%= t 'activerecord.models.user_file' %>: <%= @user_file.attachment_file_name %> | <%= file_url(@user_file) %>
@@ -0,0 +1,2 @@
1
+ <%= t 'activerecord.models.folder' %>: <%= @folder.name %> | <%= folder_url(@folder) %>
2
+ <%= t 'activerecord.models.user_file' %>: <%= @file_name %>
@@ -0,0 +1,2 @@
1
+ <%= t 'activerecord.models.folder' %>: <%= @user_file.folder.name %> | <%= folder_url(@user_file.folder) %>
2
+ <%= t 'activerecord.models.user_file' %>: <%= @user_file.attachment_file_name %> | <%= file_url(@user_file) %>
@@ -15,4 +15,3 @@ Ihr altes Kennwort ist weiterhin gültig.
15
15
 
16
16
  --
17
17
  Boxroom
18
- http://boxroomapp.com/
@@ -14,4 +14,3 @@ Your current password is still valid.
14
14
 
15
15
  --
16
16
  Boxroom
17
- http://boxroomapp.com/
@@ -14,4 +14,3 @@ Sus credenciales seguirán siendo validas.
14
14
 
15
15
  --
16
16
  Boxroom
17
- http://boxroomapp.com/
@@ -14,4 +14,3 @@ Votre mot de passe actuel reste inchangé.
14
14
 
15
15
  --
16
16
  Boxroom
17
- http://boxroomapp.com/
@@ -14,4 +14,3 @@ La password corrente continuerà ad essere valida.
14
14
 
15
15
  --
16
16
  Boxroom
17
- http://boxroomapp.com/
@@ -14,4 +14,3 @@ Uw huidige wachtwoord is nog steeds geldig.
14
14
 
15
15
  --
16
16
  Boxroom
17
- http://boxroomapp.com/
@@ -13,4 +13,3 @@
13
13
 
14
14
  --
15
15
  Boxroom
16
- http://boxroomapp.com/
@@ -17,4 +17,3 @@ Diese URL wird am <%= l @share_link.link_expires_at, :format => :long %> ablaufe
17
17
 
18
18
  --
19
19
  Boxroom
20
- http://boxroomapp.com/
@@ -17,4 +17,3 @@ The URL above will expire at <%= l @share_link.link_expires_at, :format => :time
17
17
 
18
18
  --
19
19
  Boxroom
20
- http://boxroomapp.com/
@@ -17,4 +17,3 @@ La URL expirará a las <%= l @share_link.link_expires_at, :format => :time_only
17
17
 
18
18
  --
19
19
  Boxroom
20
- http://boxroomapp.com/
@@ -17,4 +17,3 @@ Le lien ci-dessus expirera à <%= l @share_link.link_expires_at, :format => :tim
17
17
 
18
18
  --
19
19
  Boxroom
20
- http://boxroomapp.com/
@@ -17,4 +17,3 @@ L'URL indicato sopra scadrà <%= l @share_link.link_expires_at, :format => :long
17
17
 
18
18
  --
19
19
  Boxroom
20
- http://boxroomapp.com/
@@ -17,4 +17,3 @@ De vervaldatum van bovenstaande URL is <%= l @share_link.link_expires_at, :forma
17
17
 
18
18
  --
19
19
  Boxroom
20
- http://boxroomapp.com/
@@ -17,4 +17,3 @@
17
17
 
18
18
  --
19
19
  Boxroom
20
- http://boxroomapp.com/
@@ -6,4 +6,3 @@ This is an invitation to sign up for Boxroom. Please use the following URL to si
6
6
 
7
7
  --
8
8
  Boxroom
9
- http://boxroomapp.com/
@@ -6,4 +6,3 @@ This is an invitation to sign up for Boxroom. Please use the following URL to si
6
6
 
7
7
  --
8
8
  Boxroom
9
- http://boxroomapp.com/
@@ -6,4 +6,3 @@ Esta es una invitacion para activar su cuenta Boxroom. Por favor use la siguient
6
6
 
7
7
  --
8
8
  Boxroom
9
- http://boxroomapp.com/
@@ -6,4 +6,3 @@ Ceci est un mail d'invitation à Boxroom. Pour vous inscrire, veuillez utiliser
6
6
 
7
7
  --
8
8
  Boxroom
9
- http://boxroomapp.com/
@@ -6,4 +6,3 @@ This is an invitation to sign up for Boxroom. Please use the following URL to si
6
6
 
7
7
  --
8
8
  Boxroom
9
- http://boxroomapp.com/
@@ -7,4 +7,3 @@ Gebruik onderstaande URL om uw account aan te maken:
7
7
 
8
8
  --
9
9
  Boxroom
10
- http://boxroomapp.com/
@@ -5,4 +5,3 @@
5
5
  <%= edit_signup_url(@user.signup_token) %>
6
6
  --
7
7
  Boxroom
8
- http://boxroomapp.com/
@@ -265,6 +265,12 @@ de:
265
265
 
266
266
  #folders/edit
267
267
  rename_folder: Ordner umbenennen
268
+ edit_notifications: Benachrichtigungen bearbeiten
269
+ notify_emails_list: Liste der durch Komma getrennten E-Mails
270
+ notify_create: Benachrichtigen Sie Erstellen
271
+ notify_update: Aktualisierung benachrichtigen
272
+ notify_remove: Benachrichtigen Entfernen
273
+
268
274
 
269
275
  #folders/new
270
276
  new_folder: Neuen Ordner anlegen
@@ -281,7 +287,7 @@ de:
281
287
  add_to_clipboard: Zur Zwischenablage hinzufügen
282
288
  download: Herunterladen
283
289
  share: Freigeben
284
- search: Search files and folders inside current folder... Press Enter to search
290
+ search: Suchen Sie Dateien und Ordner im aktuellen Ordner ... Drücken Sie die Eingabetaste, um zu suchen
285
291
 
286
292
  #groups/edit
287
293
  rename_group: Gruppe umbenennen
@@ -412,3 +418,8 @@ de:
412
418
  signup_email_subject: '[Boxroom] Sign up invitation'
413
419
  reset_password_email_subject: '[Boxroom] Anleitung zum Ändern Ihres Kennworts'
414
420
  share_link_email_subject: '[Boxroom] %{email} möchte Ihnen eine Datei freigeben'
421
+
422
+ # mailers/user_file_mailer
423
+ file_added: '[Boxroom] Neue Datei wurde zum Ordner hinzugefügt'
424
+ file_updated: '[Boxroom] Die Datei wurde im Ordner aktualisiert'
425
+ file_removed: '[Boxroom] Die Datei wurde aus dem Ordner entfernt'
@@ -258,6 +258,11 @@
258
258
 
259
259
  #folders/edit
260
260
  rename_folder: Rename folder
261
+ edit_notifications: Edit Notifications
262
+ notify_emails_list: List of comma separated emails
263
+ notify_create: Notify Create
264
+ notify_update: Notify Update
265
+ notify_remove: Notify Remove
261
266
 
262
267
  #folders/new
263
268
  new_folder: New folder
@@ -405,3 +410,8 @@
405
410
  signup_email_subject: '[Boxroom] Sign up invitation'
406
411
  reset_password_email_subject: '[Boxroom] Password reset instructions'
407
412
  share_link_email_subject: '[Boxroom] %{email} shared a file with you'
413
+
414
+ # mailers/user_file_mailer
415
+ file_added: '[Boxroom] New file was added to folder'
416
+ file_updated: '[Boxroom] File was updated in folder'
417
+ file_removed: '[Boxroom] File was removed from folder'
@@ -257,6 +257,11 @@
257
257
 
258
258
  #folders/edit
259
259
  rename_folder: Renombrar Carpeta
260
+ edit_notifications: Editar notificaciones
261
+ notify_emails_list: Lista de correos electrónicos separados por comas
262
+ notify_create: Notificar Crear
263
+ notify_update: Notificar actualización
264
+ notify_remove: Notificar Eliminar
260
265
 
261
266
  #folders/new
262
267
  new_folder: Nueva Carpeta
@@ -273,7 +278,7 @@
273
278
  add_to_clipboard: Agregar al portapapeles
274
279
  download: Descargar
275
280
  share: Compartir
276
- search: Search files and folders inside current folder... Press Enter to search
281
+ search: Buscar archivos y carpetas dentro de la carpeta actual ... Presione Entrar para buscar
277
282
 
278
283
  #groups/edit
279
284
  rename_group: Renombrar grupo
@@ -401,3 +406,8 @@
401
406
  signup_email_subject: 'Invitación al Sistema de Gestión de Archivos'
402
407
  reset_password_email_subject: 'Gestión de Archivos: cambio de claves'
403
408
  share_link_email_subject: 'Gestión de Archivos: se le ha compartido un enlace'
409
+
410
+ # mailers/user_file_mailer
411
+ file_added: '[Boxroom] Nuevo archivo fue agregado a la carpeta'
412
+ file_updated: '[Boxroom] El archivo se actualizó en la carpeta'
413
+ file_removed: '[Boxroom] El archivo fue eliminado de la carpeta'
@@ -254,6 +254,11 @@
254
254
 
255
255
  #folders/edit
256
256
  rename_folder: Renommer dossier
257
+ edit_notifications: Modifier les notifications
258
+ notify_emails_list: Liste des courriels séparés par des virgules
259
+ notify_create: Notifier Créer
260
+ notify_update: Avertir mise à
261
+ notify_remove: Notifier Supprimer
257
262
 
258
263
  #folders/new
259
264
  new_folder: Nouveau dossier
@@ -270,7 +275,7 @@
270
275
  add_to_clipboard: Ajouter au presse-papier
271
276
  download: Télécharger
272
277
  share: Partager
273
- search: Search files and folders inside current folder... Press Enter to search
278
+ search: Rechercher des fichiers et des dossiers dans le dossier actuel ... Appuyez sur Entrée pour rechercher
274
279
 
275
280
  #groups/edit
276
281
  rename_group: Renommer groupe
@@ -401,3 +406,8 @@
401
406
  signup_email_subject: '[Boxroom] Invitiation à créer un compte'
402
407
  reset_password_email_subject: '[Boxroom] Instructions de réinitialisation mot de passe'
403
408
  share_link_email_subject: "[Boxroom] %{email} a partagé un fichier avec vous"
409
+
410
+ # mailers/user_file_mailer
411
+ file_added: '[Boxroom] Nouveau fichier a été ajouté au dossier'
412
+ file_updated: '[Boxroom] Le fichier a été mis à jour dans le dossier'
413
+ file_removed: '[Boxroom] Le fichier a été supprimé du dossier'
@@ -265,6 +265,11 @@
265
265
 
266
266
  #folders/edit
267
267
  rename_folder: Rinomina cartella
268
+ edit_notifications: Modifica notifiche
269
+ notify_emails_list: Elenco di e-mail separate da virgole
270
+ notify_create: Notifica Crea
271
+ notify_update: Notifica aggiornamento
272
+ notify_remove: Notifica Rimuovi
268
273
 
269
274
  #folders/new
270
275
  new_folder: Nuova cartella
@@ -281,7 +286,7 @@
281
286
  add_to_clipboard: Copia negli appunti
282
287
  download: Scarica
283
288
  share: Condividi
284
- search: Search files and folders inside current folder... Press Enter to search
289
+ search: Cerca file e cartelle all'interno della cartella corrente ... Premi Invio per cercare
285
290
 
286
291
  #groups/edit
287
292
  rename_group: Rinomina gruppo
@@ -412,3 +417,8 @@
412
417
  signup_email_subject: '[Boxroom] Sign up invitation'
413
418
  share_link_email_subject: '[Boxroom] %{email} ha condiviso un file con te'
414
419
  reset_password_email_subject: '[Boxroom] Istruzioni per modificare la password'
420
+
421
+ # mailers/user_file_mailer
422
+ file_added: '[Boxroom] Nuovo file è stato aggiunto alla cartella'
423
+ file_updated: '[Boxroom] Il file è stato aggiornato nella cartella'
424
+ file_removed: '[Boxroom] Il file è stato rimosso dalla cartella'
@@ -259,6 +259,11 @@ nl:
259
259
 
260
260
  #folders/edit
261
261
  rename_folder: Mapnaam wijzigen
262
+ edit_notifications: Bewerk meldingen
263
+ notify_emails_list: Lijst met door komma's gescheiden e-mails
264
+ notify_create: Notificeer Create
265
+ notify_update: Breng update op de hoogte
266
+ notify_remove: Verwittig Verwijderen
262
267
 
263
268
  #folders/new
264
269
  new_folder: Nieuwe map
@@ -275,7 +280,7 @@ nl:
275
280
  add_to_clipboard: Op klembord plaatsen
276
281
  download: Download
277
282
  share: Delen
278
- search: Search files and folders inside current folder... Press Enter to search
283
+ search: Zoek bestanden en mappen in de huidige map ... Druk op Enter om te zoeken
279
284
 
280
285
  #groups/edit
281
286
  rename_group: Groepnaam wijzigen
@@ -406,3 +411,8 @@ nl:
406
411
  signup_email_subject: '[Boxroom] Uitnodiging om aan te melden'
407
412
  reset_password_email_subject: '[Boxroom] Instructies om uw wachtwoord te resetten'
408
413
  share_link_email_subject: '[Boxroom] %{email} heeft een bestand met u gedeeld'
414
+
415
+ # mailers/user_file_mailer
416
+ file_added: '[Boxroom] Nieuw bestand toegevoegd aan map'
417
+ file_updated: '[Boxroom] Bestand is in map bijgewerk'
418
+ file_removed: '[Boxroom] Bestand is uit de map verwijderd'
@@ -257,6 +257,11 @@
257
257
 
258
258
  #folders/edit
259
259
  rename_folder: 重新命名文件夹
260
+ edit_notifications: 编辑通知
261
+ notify_emails_list: 用逗号分隔的电子邮件列表
262
+ notify_create: 通知创建
263
+ notify_update: 通知更新
264
+ notify_remove: 通知删除
260
265
 
261
266
  #folders/new
262
267
  new_folder: 新文件夹
@@ -273,7 +278,7 @@
273
278
  add_to_clipboard: 加到剪贴板
274
279
  download: 下载
275
280
  share: 共享
276
- search: Search files and folders inside current folder... Press Enter to search
281
+ search: 搜索当前文件夹内的文件和文件夹...按Enter键搜索
277
282
 
278
283
  #groups/edit
279
284
  rename_group: 群组重新命名
@@ -404,3 +409,8 @@
404
409
  signup_email_subject: '[Boxroom] 注册邀请'
405
410
  reset_password_email_subject: '[Boxroom] 重设密码的步骤'
406
411
  share_link_email_subject: '[Boxroom] %{email}与您共享了文件'
412
+
413
+ # mailers/user_file_mailer
414
+ file_added: '[Boxroom] 新文件已添加到文件夹'
415
+ file_updated: '[Boxroom] 文件已在文件夹中更新'
416
+ file_removed: '[Boxroom] 文件已从文件夹中删除'
@@ -1,4 +1,4 @@
1
- class AddOriginalIdToUsers < ActiveRecord::Migration[5.1]
1
+ class BoxroomAddOriginalIdToUsers < ActiveRecord::Migration[5.1]
2
2
  def change
3
3
  add_column :boxroom_users, :original_id, :integer
4
4
  end
@@ -0,0 +1,10 @@
1
+ class BoxroomAddNotificationsToFolders < ActiveRecord::Migration[5.1]
2
+ def change
3
+ change_table :boxroom_folders do |t|
4
+ t.string :notify_emails
5
+ t.boolean :notify_create
6
+ t.boolean :notify_update
7
+ t.boolean :notify_remove
8
+ end
9
+ end
10
+ end
@@ -8,6 +8,7 @@ module Boxroom
8
8
  :show_settings,
9
9
  :show_shared_files,
10
10
  :show_search,
11
+ :enable_notifications,
11
12
  :uploads_path,
12
13
  :current_user_method,
13
14
  :sign_in_path,
@@ -15,15 +16,16 @@ module Boxroom
15
16
  :parent_controller
16
17
 
17
18
  def initialize
18
- @site_name = 'Boxroom'
19
- @logo = 'boxroom/logo.png'
20
- @show_footer = true
21
- @show_users = true
22
- @show_groups = true
23
- @show_settings = true
24
- @show_shared_files = true
25
- @show_search = true
26
- @uploads_path = 'uploads'
19
+ @site_name = 'Boxroom'
20
+ @logo = 'boxroom/logo.png'
21
+ @show_footer = true
22
+ @show_users = true
23
+ @show_groups = true
24
+ @show_settings = true
25
+ @show_shared_files = true
26
+ @show_search = true
27
+ @enable_notifications = true
28
+ @uploads_path = 'uploads'
27
29
 
28
30
  # Integrate with existing user model
29
31
  @current_user_method = nil
@@ -1,3 +1,3 @@
1
1
  module Boxroom
2
- VERSION = '0.0.4'
2
+ VERSION = '0.0.5'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: boxroom
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Serge Koba
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-03-23 00:00:00.000000000 Z
11
+ date: 2018-03-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -338,6 +338,10 @@ files:
338
338
  - app/concepts/boxroom/folder/view/show.erb
339
339
  - app/concepts/boxroom/search/contract/files_and_folders.rb
340
340
  - app/concepts/boxroom/search/operations/files_and_folders.rb
341
+ - app/concepts/boxroom/user_file/contract/notify.rb
342
+ - app/concepts/boxroom/user_file/operations/notify_create.rb
343
+ - app/concepts/boxroom/user_file/operations/notify_remove.rb
344
+ - app/concepts/boxroom/user_file/operations/notify_update.rb
341
345
  - app/controllers/boxroom/admins_controller.rb
342
346
  - app/controllers/boxroom/application_controller.rb
343
347
  - app/controllers/boxroom/clipboard_controller.rb
@@ -356,6 +360,7 @@ files:
356
360
  - app/helpers/boxroom/folders_helper.rb
357
361
  - app/jobs/boxroom/application_job.rb
358
362
  - app/mailers/boxroom/application_mailer.rb
363
+ - app/mailers/boxroom/user_file_mailer.rb
359
364
  - app/mailers/boxroom/user_mailer.rb
360
365
  - app/models/boxroom/application_record.rb
361
366
  - app/models/boxroom/clipboard.rb
@@ -402,6 +407,9 @@ files:
402
407
  - app/views/boxroom/shared/_footer.html.erb
403
408
  - app/views/boxroom/shared/_header.html.erb
404
409
  - app/views/boxroom/signup/edit.html.erb
410
+ - app/views/boxroom/user_file_mailer/notify_create.text.erb
411
+ - app/views/boxroom/user_file_mailer/notify_remove.text.erb
412
+ - app/views/boxroom/user_file_mailer/notify_update.text.erb
405
413
  - app/views/boxroom/user_mailer/reset_password_email.de.text.erb
406
414
  - app/views/boxroom/user_mailer/reset_password_email.en.text.erb
407
415
  - app/views/boxroom/user_mailer/reset_password_email.es.text.erb
@@ -450,7 +458,8 @@ files:
450
458
  - db/migrate/20120411081345_boxroom_add_column_signup_token_expires_at_to_users.rb
451
459
  - db/migrate/20130626210927_boxroom_add_columns_message_user_id_to_share_links.rb
452
460
  - db/migrate/20130628082245_boxroom_populate_user_id_in_share_links.rb
453
- - db/migrate/20180309104530_add_original_id_to_users.rb
461
+ - db/migrate/20180309104530_boxroom_add_original_id_to_users.rb
462
+ - db/migrate/20180323134701_boxroom_add_notifications_to_folders.rb
454
463
  - lib/boxroom.rb
455
464
  - lib/boxroom/active_record.rb
456
465
  - lib/boxroom/configuration.rb