boxroom 0.0.1
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 +50 -0
- data/Rakefile +36 -0
- data/app/assets/config/boxroom_manifest.js +2 -0
- data/app/assets/images/boxroom/clipboard.png +0 -0
- data/app/assets/images/boxroom/clipboard_add.png +0 -0
- data/app/assets/images/boxroom/copy.png +0 -0
- data/app/assets/images/boxroom/delete.png +0 -0
- data/app/assets/images/boxroom/edit.png +0 -0
- data/app/assets/images/boxroom/exclamation.png +0 -0
- data/app/assets/images/boxroom/extend.png +0 -0
- data/app/assets/images/boxroom/failed.png +0 -0
- data/app/assets/images/boxroom/file.png +0 -0
- data/app/assets/images/boxroom/file_add.png +0 -0
- data/app/assets/images/boxroom/fileicons/7z.png +0 -0
- data/app/assets/images/boxroom/fileicons/ai.png +0 -0
- data/app/assets/images/boxroom/fileicons/aif.png +0 -0
- data/app/assets/images/boxroom/fileicons/aiff.png +0 -0
- data/app/assets/images/boxroom/fileicons/audio.png +0 -0
- data/app/assets/images/boxroom/fileicons/bz2.png +0 -0
- data/app/assets/images/boxroom/fileicons/c.png +0 -0
- data/app/assets/images/boxroom/fileicons/conf.png +0 -0
- data/app/assets/images/boxroom/fileicons/cpp.png +0 -0
- data/app/assets/images/boxroom/fileicons/cs.png +0 -0
- data/app/assets/images/boxroom/fileicons/css.png +0 -0
- data/app/assets/images/boxroom/fileicons/csv.png +0 -0
- data/app/assets/images/boxroom/fileicons/divx.png +0 -0
- data/app/assets/images/boxroom/fileicons/doc.png +0 -0
- data/app/assets/images/boxroom/fileicons/docx.png +0 -0
- data/app/assets/images/boxroom/fileicons/dot.png +0 -0
- data/app/assets/images/boxroom/fileicons/fla.png +0 -0
- data/app/assets/images/boxroom/fileicons/gif.png +0 -0
- data/app/assets/images/boxroom/fileicons/gz.png +0 -0
- data/app/assets/images/boxroom/fileicons/htm.png +0 -0
- data/app/assets/images/boxroom/fileicons/html.png +0 -0
- data/app/assets/images/boxroom/fileicons/image.png +0 -0
- data/app/assets/images/boxroom/fileicons/java.png +0 -0
- data/app/assets/images/boxroom/fileicons/jpeg.png +0 -0
- data/app/assets/images/boxroom/fileicons/jpg.png +0 -0
- data/app/assets/images/boxroom/fileicons/js.png +0 -0
- data/app/assets/images/boxroom/fileicons/mdb.png +0 -0
- data/app/assets/images/boxroom/fileicons/mdbx.png +0 -0
- data/app/assets/images/boxroom/fileicons/mov.png +0 -0
- data/app/assets/images/boxroom/fileicons/mp3.png +0 -0
- data/app/assets/images/boxroom/fileicons/mpg.png +0 -0
- data/app/assets/images/boxroom/fileicons/ogg.png +0 -0
- data/app/assets/images/boxroom/fileicons/pdf.png +0 -0
- data/app/assets/images/boxroom/fileicons/php.png +0 -0
- data/app/assets/images/boxroom/fileicons/pl.png +0 -0
- data/app/assets/images/boxroom/fileicons/png.png +0 -0
- data/app/assets/images/boxroom/fileicons/ppt.png +0 -0
- data/app/assets/images/boxroom/fileicons/pptx.png +0 -0
- data/app/assets/images/boxroom/fileicons/ps.png +0 -0
- data/app/assets/images/boxroom/fileicons/py.png +0 -0
- data/app/assets/images/boxroom/fileicons/ram.png +0 -0
- data/app/assets/images/boxroom/fileicons/rar.png +0 -0
- data/app/assets/images/boxroom/fileicons/rb.png +0 -0
- data/app/assets/images/boxroom/fileicons/rm.png +0 -0
- data/app/assets/images/boxroom/fileicons/rtf.png +0 -0
- data/app/assets/images/boxroom/fileicons/sql.png +0 -0
- data/app/assets/images/boxroom/fileicons/swf.png +0 -0
- data/app/assets/images/boxroom/fileicons/tar.png +0 -0
- data/app/assets/images/boxroom/fileicons/tgz.png +0 -0
- data/app/assets/images/boxroom/fileicons/txt.png +0 -0
- data/app/assets/images/boxroom/fileicons/video.png +0 -0
- data/app/assets/images/boxroom/fileicons/wav.png +0 -0
- data/app/assets/images/boxroom/fileicons/wma.png +0 -0
- data/app/assets/images/boxroom/fileicons/wmv.png +0 -0
- data/app/assets/images/boxroom/fileicons/xls.png +0 -0
- data/app/assets/images/boxroom/fileicons/xlsx.png +0 -0
- data/app/assets/images/boxroom/fileicons/xml.png +0 -0
- data/app/assets/images/boxroom/fileicons/xvid.png +0 -0
- data/app/assets/images/boxroom/fileicons/zip.png +0 -0
- data/app/assets/images/boxroom/folder.png +0 -0
- data/app/assets/images/boxroom/folder_add.png +0 -0
- data/app/assets/images/boxroom/group.png +0 -0
- data/app/assets/images/boxroom/group_add.png +0 -0
- data/app/assets/images/boxroom/group_grey.png +0 -0
- data/app/assets/images/boxroom/information.png +0 -0
- data/app/assets/images/boxroom/logo.png +0 -0
- data/app/assets/images/boxroom/move.png +0 -0
- data/app/assets/images/boxroom/permissions.png +0 -0
- data/app/assets/images/boxroom/share.png +0 -0
- data/app/assets/images/boxroom/spinner.gif +0 -0
- data/app/assets/images/boxroom/tick.png +0 -0
- data/app/assets/images/boxroom/user.png +0 -0
- data/app/assets/images/boxroom/user_add.png +0 -0
- data/app/assets/javascripts/boxroom/application.js.coffee +51 -0
- data/app/assets/javascripts/boxroom/files.js.coffee +33 -0
- data/app/assets/stylesheets/boxroom/application.scss +7 -0
- data/app/concepts/boxroom/base_cell.rb +7 -0
- data/app/concepts/boxroom/folder/cell/show.rb +25 -0
- data/app/concepts/boxroom/folder/view/show.erb +69 -0
- data/app/concepts/boxroom/search/contract/files_and_folders.rb +9 -0
- data/app/concepts/boxroom/search/operations/files_and_folders.rb +21 -0
- data/app/controllers/boxroom/admins_controller.rb +30 -0
- data/app/controllers/boxroom/application_controller.rb +5 -0
- data/app/controllers/boxroom/clipboard_controller.rb +87 -0
- data/app/controllers/boxroom/files_controller.rb +78 -0
- data/app/controllers/boxroom/folders_controller.rb +91 -0
- data/app/controllers/boxroom/groups_controller.rb +60 -0
- data/app/controllers/boxroom/permissions_controller.rb +19 -0
- data/app/controllers/boxroom/reset_password_controller.rb +45 -0
- data/app/controllers/boxroom/search_controller.rb +21 -0
- data/app/controllers/boxroom/sessions_controller.rb +48 -0
- data/app/controllers/boxroom/share_links_controller.rb +67 -0
- data/app/controllers/boxroom/signup_controller.rb +31 -0
- data/app/controllers/boxroom/users_controller.rb +75 -0
- data/app/controllers/concerns/boxroom/base_controller.rb +92 -0
- data/app/helpers/boxroom/application_helper.rb +4 -0
- data/app/helpers/boxroom/folders_helper.rb +17 -0
- data/app/jobs/boxroom/application_job.rb +4 -0
- data/app/mailers/boxroom/application_mailer.rb +6 -0
- data/app/mailers/boxroom/user_mailer.rb +18 -0
- data/app/models/boxroom/application_record.rb +5 -0
- data/app/models/boxroom/clipboard.rb +45 -0
- data/app/models/boxroom/folder.rb +113 -0
- data/app/models/boxroom/group.rb +57 -0
- data/app/models/boxroom/permission.rb +6 -0
- data/app/models/boxroom/permitted_params.rb +33 -0
- data/app/models/boxroom/share_link.rb +40 -0
- data/app/models/boxroom/user.rb +113 -0
- data/app/models/boxroom/user_file.rb +35 -0
- data/app/views/boxroom/admins/new.html.erb +42 -0
- data/app/views/boxroom/clipboard/_clipboard_empty.de.html.erb +2 -0
- data/app/views/boxroom/clipboard/_clipboard_empty.en.html.erb +2 -0
- data/app/views/boxroom/clipboard/_clipboard_empty.es.html.erb +2 -0
- data/app/views/boxroom/clipboard/_clipboard_empty.fr.html.erb +2 -0
- data/app/views/boxroom/clipboard/_clipboard_empty.it.html.erb +2 -0
- data/app/views/boxroom/clipboard/_clipboard_empty.nl.html.erb +2 -0
- data/app/views/boxroom/clipboard/_clipboard_empty.zh-CN.html.erb +2 -0
- data/app/views/boxroom/clipboard/_show.html.erb +72 -0
- data/app/views/boxroom/files/edit.html.erb +24 -0
- data/app/views/boxroom/files/new.html.erb +45 -0
- data/app/views/boxroom/folders/_form.html.erb +19 -0
- data/app/views/boxroom/folders/edit.html.erb +6 -0
- data/app/views/boxroom/folders/new.html.erb +6 -0
- data/app/views/boxroom/folders/show.html.erb +69 -0
- data/app/views/boxroom/groups/_form.html.erb +21 -0
- data/app/views/boxroom/groups/edit.html.erb +4 -0
- data/app/views/boxroom/groups/index.html.erb +42 -0
- data/app/views/boxroom/groups/new.html.erb +4 -0
- data/app/views/boxroom/permissions/_form.html.erb +46 -0
- data/app/views/boxroom/reset_password/_message.de.html.erb +2 -0
- data/app/views/boxroom/reset_password/_message.en.html.erb +2 -0
- data/app/views/boxroom/reset_password/_message.es.html.erb +2 -0
- data/app/views/boxroom/reset_password/_message.fr.html.erb +2 -0
- data/app/views/boxroom/reset_password/_message.it.html.erb +2 -0
- data/app/views/boxroom/reset_password/_message.nl.html.erb +2 -0
- data/app/views/boxroom/reset_password/_message.zh-CN.html.erb +2 -0
- data/app/views/boxroom/reset_password/edit.html.erb +30 -0
- data/app/views/boxroom/reset_password/new.html.erb +22 -0
- data/app/views/boxroom/search/show.html.erb +15 -0
- data/app/views/boxroom/sessions/new.html.erb +31 -0
- data/app/views/boxroom/share_links/index.html.erb +24 -0
- data/app/views/boxroom/share_links/new.html.erb +49 -0
- data/app/views/boxroom/shared/_footer.html.erb +9 -0
- data/app/views/boxroom/shared/_header.html.erb +45 -0
- data/app/views/boxroom/signup/edit.html.erb +42 -0
- data/app/views/boxroom/user_mailer/reset_password_email.de.text.erb +18 -0
- data/app/views/boxroom/user_mailer/reset_password_email.en.text.erb +17 -0
- data/app/views/boxroom/user_mailer/reset_password_email.es.text.erb +17 -0
- data/app/views/boxroom/user_mailer/reset_password_email.fr.text.erb +17 -0
- data/app/views/boxroom/user_mailer/reset_password_email.it.text.erb +17 -0
- data/app/views/boxroom/user_mailer/reset_password_email.nl.text.erb +17 -0
- data/app/views/boxroom/user_mailer/reset_password_email.zh-CN.text.erb +16 -0
- data/app/views/boxroom/user_mailer/share_link_email.de.text.erb +20 -0
- data/app/views/boxroom/user_mailer/share_link_email.en.text.erb +20 -0
- data/app/views/boxroom/user_mailer/share_link_email.es.text.erb +20 -0
- data/app/views/boxroom/user_mailer/share_link_email.fr.text.erb +20 -0
- data/app/views/boxroom/user_mailer/share_link_email.it.text.erb +20 -0
- data/app/views/boxroom/user_mailer/share_link_email.nl.text.erb +20 -0
- data/app/views/boxroom/user_mailer/share_link_email.zh-CN.text.erb +20 -0
- data/app/views/boxroom/user_mailer/signup_email.de.text.erb +9 -0
- data/app/views/boxroom/user_mailer/signup_email.en.text.erb +9 -0
- data/app/views/boxroom/user_mailer/signup_email.es.text.erb +9 -0
- data/app/views/boxroom/user_mailer/signup_email.fr.text.erb +9 -0
- data/app/views/boxroom/user_mailer/signup_email.it.text.erb +9 -0
- data/app/views/boxroom/user_mailer/signup_email.nl.text.erb +10 -0
- data/app/views/boxroom/user_mailer/signup_email.zh-CN.text.erb +8 -0
- data/app/views/boxroom/users/_form.html.erb +63 -0
- data/app/views/boxroom/users/edit.html.erb +4 -0
- data/app/views/boxroom/users/index.html.erb +68 -0
- data/app/views/boxroom/users/new.html.erb +4 -0
- data/app/views/layouts/boxroom/application.html.erb +37 -0
- data/config/locales/de.yml +414 -0
- data/config/locales/en.yml +407 -0
- data/config/locales/es.yml +403 -0
- data/config/locales/fr.yml +403 -0
- data/config/locales/it.yml +414 -0
- data/config/locales/nl.yml +408 -0
- data/config/locales/zh-CN.yml +406 -0
- data/config/routes.rb +44 -0
- data/db/migrate/20100930062939_boxroom_create_users.rb +20 -0
- data/db/migrate/20100930091426_boxroom_create_folders.rb +14 -0
- data/db/migrate/20100930091451_boxroom_create_groups.rb +12 -0
- data/db/migrate/20101002122244_boxroom_create_user_files.rb +17 -0
- data/db/migrate/20101005071402_boxroom_create_permissions.rb +16 -0
- data/db/migrate/20101005071508_boxroom_create_groups_users.rb +12 -0
- data/db/migrate/20110106045148_boxroom_drop_column_user_id_from_folders.rb +9 -0
- data/db/migrate/20110106045414_boxroom_drop_column_user_id_from_user_files.rb +9 -0
- data/db/migrate/20110529123402_boxroom_drop_column_access_key_from_users.rb +9 -0
- data/db/migrate/20110616215033_boxroom_create_share_links.rb +15 -0
- data/db/migrate/20120411075110_boxroom_add_column_signup_token_to_users.rb +8 -0
- data/db/migrate/20120411081345_boxroom_add_column_signup_token_expires_at_to_users.rb +7 -0
- data/db/migrate/20130626210927_boxroom_add_columns_message_user_id_to_share_links.rb +6 -0
- data/db/migrate/20130628082245_boxroom_populate_user_id_in_share_links.rb +9 -0
- data/lib/boxroom.rb +35 -0
- data/lib/boxroom/configuration.rb +18 -0
- data/lib/boxroom/engine.rb +9 -0
- data/lib/boxroom/version.rb +3 -0
- data/lib/paperclip/spoof_detector.rb +7 -0
- data/lib/tasks/boxroom_tasks.rake +4 -0
- metadata +481 -0
@@ -0,0 +1,72 @@
|
|
1
|
+
<% if clipboard.empty? -%>
|
2
|
+
<div class="notification is-info">
|
3
|
+
<%= render 'boxroom/clipboard/clipboard_empty' %>
|
4
|
+
</div>
|
5
|
+
<% else -%>
|
6
|
+
<table id="clipboard_table" class="table">
|
7
|
+
<tr>
|
8
|
+
<th></th>
|
9
|
+
<th><%= t :name %></th>
|
10
|
+
<th></th>
|
11
|
+
</tr>
|
12
|
+
<% reset_cycle -%>
|
13
|
+
<% clipboard.folders.each do |item| -%>
|
14
|
+
<tr class="<%= cycle('even', 'odd') %>">
|
15
|
+
<td><%= image_tag('boxroom/folder.png') %></td>
|
16
|
+
<td class="clipboard_item"><%= item.name %></td>
|
17
|
+
<td>
|
18
|
+
<% if current_user.can_create(@folder) -%>
|
19
|
+
<%= link_to image_tag('boxroom/copy.png', :alt => t(:copy)),
|
20
|
+
{:controller => :clipboard, :action => :copy, :id => item.id, :type => 'folder', :folder_id => @folder, :authenticity_token => form_authenticity_token},
|
21
|
+
:method => :post, :title => t(:copy_folder)
|
22
|
+
%>
|
23
|
+
<% end -%>
|
24
|
+
<% if current_user.can_create(@folder) && current_user.can_delete(item) -%>
|
25
|
+
<%= link_to image_tag('boxroom/move.png', :alt => t(:move)),
|
26
|
+
{:controller => :clipboard, :action => :move, :id => item.id, :type => 'folder', :folder_id => @folder, :authenticity_token => form_authenticity_token},
|
27
|
+
:method => :post, :title => t(:move_folder), :data => {:confirm => t(:are_you_sure)}
|
28
|
+
%>
|
29
|
+
<% end -%>
|
30
|
+
<%= link_to image_tag('boxroom/delete.png', :alt => t(:delete_item)),
|
31
|
+
{:controller => :clipboard, :action => :destroy, :id => item.id, :type => 'folder', :folder_id => @folder, :authenticity_token => form_authenticity_token},
|
32
|
+
:method => :delete, :title => t(:remove_from_clipboard)
|
33
|
+
%>
|
34
|
+
</td>
|
35
|
+
</tr>
|
36
|
+
<% end -%>
|
37
|
+
<% clipboard.files.each do |item| -%>
|
38
|
+
<tr class="<%= cycle('even', 'odd') %>">
|
39
|
+
<td><%= image_tag(file_icon(item.extension)) %></td>
|
40
|
+
<td class="clipboard_item"><%= item.attachment_file_name %></td>
|
41
|
+
<td>
|
42
|
+
<% if current_user.can_create(@folder) -%>
|
43
|
+
<%= link_to '<span class="icon is-small"><i class="fa fa-copy"></i></span>'.html_safe,
|
44
|
+
{:controller => :clipboard, :action => :copy, :id => item.id, :type => 'file', :folder_id => @folder, :authenticity_token => form_authenticity_token},
|
45
|
+
:method => :post, :title => t(:copy_file)
|
46
|
+
%>
|
47
|
+
<% end -%>
|
48
|
+
<% if current_user.can_create(@folder) && current_user.can_delete(item.folder) -%>
|
49
|
+
<%= link_to '<span class="icon is-small"><i class="fa fa-cut"></i></span>'.html_safe,
|
50
|
+
{:controller => :clipboard, :action => :move, :id => item.id, :type => 'file', :folder_id => @folder, :authenticity_token => form_authenticity_token},
|
51
|
+
:method => :post, :title => t(:move_file), :data => {:confirm => t(:are_you_sure)}
|
52
|
+
%>
|
53
|
+
<% end -%>
|
54
|
+
<%= link_to '<span class="icon is-small"><i class="fa fa-remove"></i></span>'.html_safe,
|
55
|
+
{:controller => :clipboard, :action => :destroy, :id => item.id, :type => 'file', :folder_id => @folder, :authenticity_token => form_authenticity_token},
|
56
|
+
:method => :delete, :title => t(:remove_from_clipboard)
|
57
|
+
%>
|
58
|
+
</td>
|
59
|
+
</tr>
|
60
|
+
<% end -%>
|
61
|
+
</table>
|
62
|
+
<div class="field is-grouped">
|
63
|
+
<div class="control">
|
64
|
+
<%= button_to t(:clear_clipboard),
|
65
|
+
{:controller => :clipboard, :action => :reset, :folder_id => @folder, :authenticity_token => form_authenticity_token}, :method => :put, class: 'button is-link'
|
66
|
+
%>
|
67
|
+
</div>
|
68
|
+
<div class="control">
|
69
|
+
<%= link_to t(:back), '#', class: 'back_link button is-text' %>
|
70
|
+
</div>
|
71
|
+
</div>
|
72
|
+
<% end -%>
|
@@ -0,0 +1,24 @@
|
|
1
|
+
<% content_for :title, t(:rename_file) -%>
|
2
|
+
|
3
|
+
<h1 class="title"><%= content_for :title %></h1>
|
4
|
+
<%= form_for @file, :url => {:action => 'update'} do |f| %>
|
5
|
+
<% if f.error_messages.size > 0 %>
|
6
|
+
<div class="notification is-danger">
|
7
|
+
<%= f.error_messages %>
|
8
|
+
</div>
|
9
|
+
<% end %>
|
10
|
+
<div class="field">
|
11
|
+
<%= f.label :name, class: 'label' %>
|
12
|
+
<div class="control">
|
13
|
+
<%= f.text_field :attachment_file_name, class: 'input' %>
|
14
|
+
</div>
|
15
|
+
</div>
|
16
|
+
<div class="field is-grouped">
|
17
|
+
<div class="control">
|
18
|
+
<%= f.submit t(:save), class: 'button is-link' %>
|
19
|
+
</div>
|
20
|
+
<div class="control">
|
21
|
+
<%= link_to t(:back), @folder, class: 'button is-text' %>
|
22
|
+
</div>
|
23
|
+
</div>
|
24
|
+
<% end %>
|
@@ -0,0 +1,45 @@
|
|
1
|
+
<% content_for :title, t(:upload_file) -%>
|
2
|
+
|
3
|
+
<h1 class="title"><%= content_for :title %></h1>
|
4
|
+
<%= form_for [@target_folder, @file], :url => {:action => 'create'} do |f| %>
|
5
|
+
<%= hidden_field_tag :target_folder_id, @target_folder.id %>
|
6
|
+
<div class="file">
|
7
|
+
<label class="file-label">
|
8
|
+
<%= file_field_tag :attachment, multiple: true, name: 'user_file[attachment]', class: 'file-input' %>
|
9
|
+
<span class="file-cta">
|
10
|
+
<span class="file-icon">
|
11
|
+
<i class="fa fa-upload"></i>
|
12
|
+
</span>
|
13
|
+
<span class="file-label">
|
14
|
+
Choose a file…
|
15
|
+
</span>
|
16
|
+
</span>
|
17
|
+
</label>
|
18
|
+
</div>
|
19
|
+
|
20
|
+
<div class="notification is-warning" id="server_wait" style="display:none;">
|
21
|
+
<%= t(:server_wait) %>
|
22
|
+
</div>
|
23
|
+
|
24
|
+
<table id="progress" class="table">
|
25
|
+
</table>
|
26
|
+
|
27
|
+
<div class="field">
|
28
|
+
<div class="control">
|
29
|
+
<%= link_to t(:back), @target_folder, class: 'button is-text' %>
|
30
|
+
</div>
|
31
|
+
</div>
|
32
|
+
<% end %>
|
33
|
+
|
34
|
+
<script id="template-upload" type="text/x-tmpl">
|
35
|
+
<tr>
|
36
|
+
<td>
|
37
|
+
<%= image_tag 'boxroom/spinner.gif', :class => 'spinner' %>
|
38
|
+
<%= image_tag 'boxroom/failed.png', :class => 'failed', :style => 'display:none;' %>
|
39
|
+
<%= image_tag 'boxroom/tick.png', :class => 'tick', :style => 'display:none;' %>
|
40
|
+
</td>
|
41
|
+
<td class="status">Uploading <strong>{%= o.name %}</strong>...</td>
|
42
|
+
<td class="percentage">0%</td>
|
43
|
+
<td class="exists_message is-danger" style="display:none;"><strong><%= t(:exists_already) %></strong></td>
|
44
|
+
</tr>
|
45
|
+
</script>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<% if f.error_messages.size > 0 %>
|
2
|
+
<div class="notification is-danger">
|
3
|
+
<%= f.error_messages %>
|
4
|
+
</div>
|
5
|
+
<% end %>
|
6
|
+
<div class="field">
|
7
|
+
<%= f.label :name, class: 'label' %>
|
8
|
+
<div class="control">
|
9
|
+
<%= f.text_field :name, class: 'input' %>
|
10
|
+
</div>
|
11
|
+
</div>
|
12
|
+
<div class="field is-grouped">
|
13
|
+
<div class="control">
|
14
|
+
<%= f.submit t(:save), class: 'button is-link' %>
|
15
|
+
</div>
|
16
|
+
<div class="control">
|
17
|
+
<%= link_to t(:back), @folder.parent, class: 'button is-text' %>
|
18
|
+
</div>
|
19
|
+
</div>
|
@@ -0,0 +1,69 @@
|
|
1
|
+
<% content_for :title, @folder.name -%>
|
2
|
+
|
3
|
+
<h1 class="title"><%= content_for :title %></h1>
|
4
|
+
<% unless @folder.is_root? -%>
|
5
|
+
<nav class="breadcrumb" aria-label="breadcrumbs">
|
6
|
+
<ul>
|
7
|
+
<%= breadcrumbs(@folder) %>
|
8
|
+
<li class="is-active"><a href="#" aria-current="page"><%= @folder.name %></a></li>
|
9
|
+
</ul>
|
10
|
+
</nav>
|
11
|
+
<% end -%>
|
12
|
+
|
13
|
+
<div class="tabs">
|
14
|
+
<ul>
|
15
|
+
<% if current_user.can_create(@folder) -%>
|
16
|
+
<li>
|
17
|
+
<a href="<%= new_folder_folder_path(@folder) %>">
|
18
|
+
<span class="icon is-small"><i class="fa fa-folder"></i></span>
|
19
|
+
<span><%= t(:create_a_new_folder) %></span>
|
20
|
+
</a>
|
21
|
+
</li>
|
22
|
+
<li>
|
23
|
+
<a href="<%= new_folder_file_path(@folder) %>">
|
24
|
+
<span class="icon is-small"><i class="fa fa-upload"></i></span>
|
25
|
+
<span><%= t(:upload_a_file) %></span>
|
26
|
+
</a>
|
27
|
+
</li>
|
28
|
+
<% end -%>
|
29
|
+
<% if current_user.member_of_admins? -%>
|
30
|
+
<li>
|
31
|
+
<a href="#" id="permissions_link" class="permissions_link">
|
32
|
+
<span class="icon is-small"><i class="fa fa-lock"></i></span>
|
33
|
+
<span><%= t(:permissions) %></span>
|
34
|
+
</a>
|
35
|
+
</li>
|
36
|
+
<% end -%>
|
37
|
+
<li>
|
38
|
+
<a href="#" id="clipboard_link" class="clipboard_link">
|
39
|
+
<span class="icon is-small"><i class="fa fa-clipboard"></i></span>
|
40
|
+
<span><%= t(:clipboard) %></span>
|
41
|
+
</a>
|
42
|
+
</li>
|
43
|
+
</ul>
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<%= form_tag(search_path, method: :get) do %>
|
47
|
+
<div class="field">
|
48
|
+
<div class="control">
|
49
|
+
<%= text_field_tag 'term', nil, placeholder: t(:search), size: 71, class: 'input' %>
|
50
|
+
</div>
|
51
|
+
</div>
|
52
|
+
<%= hidden_field_tag 'folder_id', @folder.id %>
|
53
|
+
<% end %>
|
54
|
+
|
55
|
+
<div id="files_and_folders">
|
56
|
+
<%= concept(Boxroom::Folder::Cell::Show, @folder,
|
57
|
+
folders: @folder.children,
|
58
|
+
files: @folder.user_files,
|
59
|
+
current_user: current_user) %>
|
60
|
+
</div>
|
61
|
+
|
62
|
+
<% if current_user.member_of_admins? -%>
|
63
|
+
<div id="permissions" style="display:none;">
|
64
|
+
<%= render 'boxroom/permissions/form' %>
|
65
|
+
</div>
|
66
|
+
<% end -%>
|
67
|
+
<div id="clipboard" style="display:none;">
|
68
|
+
<%= render 'boxroom/clipboard/show' %>
|
69
|
+
</div>
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<%= form_for @group do |f| %>
|
2
|
+
<% if f.error_messages.size > 0 %>
|
3
|
+
<div class="notification is-danger">
|
4
|
+
<%= f.error_messages %>
|
5
|
+
</div>
|
6
|
+
<% end %>
|
7
|
+
<div class="field">
|
8
|
+
<%= f.label :name, class: 'label' %>
|
9
|
+
<div class="control">
|
10
|
+
<%= f.text_field :name, class: 'input' %>
|
11
|
+
</div>
|
12
|
+
</div>
|
13
|
+
<div class="field is-grouped">
|
14
|
+
<div class="control">
|
15
|
+
<%= f.submit t(:save), class: 'button is-link' %>
|
16
|
+
</div>
|
17
|
+
<div class="control">
|
18
|
+
<%= link_to t(:back), groups_url, class: 'button is-text' %>
|
19
|
+
</div>
|
20
|
+
</div>
|
21
|
+
<% end %>
|
@@ -0,0 +1,42 @@
|
|
1
|
+
<% content_for :title, t(:groups) -%>
|
2
|
+
|
3
|
+
<h1 class="title"><%= content_for :title %></h1>
|
4
|
+
|
5
|
+
<a class="button is-primary" href="<%= new_group_path %>">
|
6
|
+
<span class="icon">
|
7
|
+
<i class="fa fa-group"></i>
|
8
|
+
</span>
|
9
|
+
<span><%= t(:create_a_new_group) %></span>
|
10
|
+
</a>
|
11
|
+
|
12
|
+
<table class="table">
|
13
|
+
<tr>
|
14
|
+
<th></th>
|
15
|
+
<th><%= t :name %></th>
|
16
|
+
<th></th>
|
17
|
+
</tr>
|
18
|
+
<% @groups.each do |group| -%>
|
19
|
+
<tr class="<%= cycle('even', 'odd') %>">
|
20
|
+
<% if group.admins_group? -%>
|
21
|
+
<td>
|
22
|
+
<span class="icon is-small">
|
23
|
+
<i class="fa fa-group"></i>
|
24
|
+
</span>
|
25
|
+
</td>
|
26
|
+
<td class="group_name disabled"><%= group.name %></td>
|
27
|
+
<td></td>
|
28
|
+
<% else -%>
|
29
|
+
<td>
|
30
|
+
<span class="icon is-small">
|
31
|
+
<i class="fa fa-group"></i>
|
32
|
+
</span>
|
33
|
+
</td>
|
34
|
+
<td class="group_name"><%= group.name %></td>
|
35
|
+
<td>
|
36
|
+
<%= link_to '<span class="icon is-small"><i class="fa fa-edit"></i></span>'.html_safe, edit_group_path(group), :title => t(:edit) %>
|
37
|
+
<%= link_to '<span class="icon is-small"><i class="fa fa-remove"></i></span>'.html_safe, group_path(group), :method => :delete, :data => {:confirm => t(:are_you_sure)}, :title => t(:delete_item) %>
|
38
|
+
</td>
|
39
|
+
<% end -%>
|
40
|
+
</tr>
|
41
|
+
<% end -%>
|
42
|
+
</table>
|
@@ -0,0 +1,46 @@
|
|
1
|
+
<%= form_tag update_multiple_permissions_path do %>
|
2
|
+
<%= hidden_field_tag '_method', 'put' %>
|
3
|
+
<table class="table">
|
4
|
+
<tr>
|
5
|
+
<th></th>
|
6
|
+
<th></th>
|
7
|
+
<th class="permission_column"><%= t :create_permission %></th>
|
8
|
+
<th class="permission_column"><%= t :read_permission %></th>
|
9
|
+
<th class="permission_column"><%= t :update_permission %></th>
|
10
|
+
<th class="permission_column"><%= t :delete_permission %></th>
|
11
|
+
</tr>
|
12
|
+
<% reset_cycle -%>
|
13
|
+
<% @folder.permissions.each do |permission| -%>
|
14
|
+
<%= fields_for "permissions[]", permission do |f| %>
|
15
|
+
<tr class="<%= cycle('even', 'odd') %>">
|
16
|
+
<% if permission.group.admins_group? -%>
|
17
|
+
<td><%= image_tag('boxroom/group_grey.png') %></td>
|
18
|
+
<td class="disabled"><%= permission.group.name %></td>
|
19
|
+
<td class="permission_column"><input type="checkbox" checked="checked" disabled="disabled"/></td>
|
20
|
+
<td class="permission_column"><input type="checkbox" checked="checked" disabled="disabled"/></td>
|
21
|
+
<td class="permission_column"><input type="checkbox" checked="checked" disabled="disabled"/></td>
|
22
|
+
<td class="permission_column"><input type="checkbox" checked="checked" disabled="disabled"/></td>
|
23
|
+
<% else -%>
|
24
|
+
<td><%= image_tag('boxroom/group.png') %></td>
|
25
|
+
<td><%= permission.group.name %></td>
|
26
|
+
<td class="permission_column"><%= f.check_box :can_create %></td>
|
27
|
+
<td class="permission_column"><%= f.check_box :can_read %></td>
|
28
|
+
<td class="permission_column"><%= f.check_box :can_update %></td>
|
29
|
+
<td class="permission_column"><%= f.check_box :can_delete %></td>
|
30
|
+
<% end -%>
|
31
|
+
</tr>
|
32
|
+
<% end -%>
|
33
|
+
<% end -%>
|
34
|
+
</table>
|
35
|
+
<div class="field is-grouped">
|
36
|
+
<div class="control">
|
37
|
+
<%= submit_tag t(:save), class: 'button is-link' %>
|
38
|
+
</div>
|
39
|
+
<div class="control">
|
40
|
+
<%= check_box_tag :recursive, true %> <%= t :apply_changes_to_subfolders %>
|
41
|
+
</div>
|
42
|
+
<div class="control">
|
43
|
+
<%= link_to t(:back), '#', class: 'button is-text back_link' %>
|
44
|
+
</div>
|
45
|
+
</div>
|
46
|
+
<% end -%>
|
@@ -0,0 +1,30 @@
|
|
1
|
+
<% content_for :title, t(:reset_password) -%>
|
2
|
+
|
3
|
+
<h1 class="title"><%= content_for :title %></h1>
|
4
|
+
<%= form_for @user, :url => {:action => 'update'} do |f| %>
|
5
|
+
<% if f.error_messages.size > 0 %>
|
6
|
+
<div class="notification is-danger">
|
7
|
+
<%= f.error_messages %>
|
8
|
+
</div>
|
9
|
+
<% end %>
|
10
|
+
<div class="field">
|
11
|
+
<%= label_tag :password, t(:password), class: 'label' %>
|
12
|
+
<div class="control">
|
13
|
+
<%= f.password_field :password, class: 'input' %>
|
14
|
+
</div>
|
15
|
+
</div>
|
16
|
+
<div class="field">
|
17
|
+
<%= label_tag :confirm_password, t(:confirm_password), class: 'label' %>
|
18
|
+
<div class="control">
|
19
|
+
<%= f.password_field :password_confirmation, class: 'input' %>
|
20
|
+
</div>
|
21
|
+
</div>
|
22
|
+
<div class="field is-grouped">
|
23
|
+
<div class="control">
|
24
|
+
<%= f.submit t(:reset_password), class: 'button is-link' %>
|
25
|
+
</div>
|
26
|
+
<div class="control">
|
27
|
+
<%= link_to t(:back), new_session_path, class: 'button is-text' %>
|
28
|
+
</div>
|
29
|
+
</div>
|
30
|
+
<% end %>
|