Apps for Open Atrium: Atrium Folders

A file repository for Open Atrium

Open Atrium's default set of features covers most of the common needs of an average organization, except one: a file repository with the familiar look and feel of a folders tree. By deploying customized versions of Open Atrium for different kinds of organizations we noticed that the built-in Notebook feature is still cumbersome for intranet users to store and categorize their documents (meeting reports, minutes, etc...): they are used to store their files in directories and subdirectories and not as books and child pages.

On the other hand, the needed technology for a more familiar documents repository is there: Drupal's core Book module can create hierarchical relations among nodes and files can be easily attached to nodes, so it's enough to interpret book pages as folders and their attachments as files to get the same paradigm users are familiar with.

Enter Atrium Folders: A simple file repository application

The idea behind Atrium Folders is to have a very simple file repository application with no external dependencies that users can just download, enable and start playing with. To get started, download the code directly from Nuvole's GitHub, place it under sites/all/modules/features in your Open Atrium installation and enable the new feature. Atrium Folders is shipped as an ordinary Drupal feature so, after enabling it as a module, we need to enable it in the Open Atrium group.

folders-settings.jpg

We can now visit the new Folders section and start adding the first folder.

folders-add-folder.jpg

As already mentioned, folders are nodes: we just need to specify its name, press Save and we are good to go. Now, say goodbye to the ordinary Drupal node interface; from now on we will be managing our repository from an intuitive "filesystem browser"-like interface:

folders-overview.jpg

Managing your repository

Use the top menu to manage the folder currently being displayed; it contains the following four items.

Basic information: change name and description of the current folder:

folders-generalinfo.jpg

Subfolders: easily add a bunch of subfolders by entering their names, one per line:

folders-subfolders.jpg

Attach files to this folder: just the reinterpretation of the good old Drupal file upload form, it gives the possibility to upload as many files as we need to the current folder:

folders-upload.jpg

Notifications: specify who will get a notification of the current changes (again, we don't reinvent the wheel but we integrate with the default Open Atrium notifications system):

folders-notifications.jpg

Upload multiple files: quickly upload a ZIP archive containing several files and folders: Atrium Folders will unzip it for you and place its content in the current folder (PHP must have ZIP support enabled in order for this functionality to be available)

folders-zip.jpg

Rearranging folders

The Reorder tab allows to rearrange the structure of our repository by simple drag-and-drop. This handy interface, borrowed from Drupal's core Book module, is also very helpful when we have to rename several folders at once.

folders-reorder.jpg

File toolbox

Each file has a toolbox that will allow to rename, move or delete the respective file. The toolbox uses jQuery and AJAX calls extensively, to guarantee a smooth user interaction: files will be modified and changes will take immediate effect, with no need to reload the page.

folders-toolbox-rename.jpg

Creating your own toolbox

Atrium Folders exposes hook_folder_toolbox() to enable third party modules to expose their own toolbox. As an example, here is the default atrium_folders_folder_toolbox() implementation:

<?php

/**
* Implementation of hook_folder_toolbox()
*/
function atrium_folders_folder_toolbox() {
  return array(
    array(
'op' => 'move',
     
'type' => 'file',
     
'title' => t('Move'),
     
'description' => t('Move the file to another location.'),
     
'form callback' => 'atrium_folders_move_file',
     
'ajax callback' => 'atrium_folders_move_file_ajax_callback',
    ),
    ...
  );
}
?>

Drag and Drop Upload

Atrium Folders ships with a built-in integration for the Drag'n'Drop Uploads module which gives the possibility to simply drag and drop files on the upload form to attach them to a node. If Drag'n'Drop Uploads module is enabled a Drop zone will be visible in the Attach files to this folder panel.

folders-dropzone.jpg

Drush integration: import an existing structure

When an organization wants to switch to Open Atrium, in most cases they need to migrate a shared folder to the new intranet. Atrium Folders includes the folder-import Drush command that allows to import a directory located in our local filesystem into a certain folder of a specific Open Atrium group. We just need to specify the full path of the directory we want to import and the Drupal path of the group we want it to be imported:

$ drush folder-import /tmp/meeting secretariat
Created 13 folders and 168 files.

Type $ drush help folder-import for more.

Submit button missing

Yes I also have no submit/cancel buttons when I click on one of the hook menu buttons.

My buttons are missing, too!

My "OK" and "Cancel" buttons are missing, too (I think that's what they're called, but I'm not sure because I can't see them). I also applied that jQuery update.

Can you please advise on how to restore these buttons? As of now, I cannot rename Folder files and I cannot delete them, either. Thanks.

File toolbox

This is a great tool and we are experimenting with Atrium at our university. This tool is great. Quick question. How do you enable submit buttons for the file toolbox when deleting, editing info or moving to other folders?

I cant seem to find find that in the features or content types settings. Thanks for the help!!

Cannot delete the files from File toolbox

I have a problem with delete files in File toolbox. When I click on the delete icon then pop up the dialog box but it doesn't have button to delete.

Thanks a lot!

Tagging?

Any plans to add tagging and category features to a file upload?

Missing buttons

Hi Antonio,

As mentioned before, the OK and CANCEL buttons are missing.
Please advise if there is a way to solve this.

Thank you in advance,
Antonio

Comments closed

Comments are closed. Please use the issue queue on Github for reporting bugs, and if you need custom development on Atrium Folders feel free to contact us through the contact form on this site.