Commit Graph

278 Commits

Author SHA1 Message Date
Will Rossiter
bd8e88e2ab Sort assets by ID so matching '2' doesn't first match newer records 2014-01-15 17:36:59 +13:00
Will Rossiter
8e534e99f2 Make DMSDocument methods chainable. PHPDoc cleanup.
- Remove unimplemented getAllTags()
- Add .DS_Store as ignored file
- Add gridfieldextensions as a declared dependancy.
2014-01-10 15:21:50 +13:00
Will Rossiter
0fb0410718 FIX: Resolve issue of not being able to attach documents on draft pages 2014-01-10 15:21:50 +13:00
Will Rossiter
50aa550161 Implement getFilename and getName to stick comparely to File API. 2014-01-10 15:21:50 +13:00
James Ayers
ae9a12ed61 Now uses GridFieldExtensions for the sortable rows 2014-01-10 15:21:50 +13:00
James Ayers
ff04a9f493 fixed CMSfields js and css issues 2014-01-10 15:21:50 +13:00
Normann Lou
98d614f14a BUG before use object's property check it to make sure it is not NULL. 2013-11-15 16:18:11 +13:00
Normann Lou
d64fe9ba13 NEW best way to keep extended 'can' functions effected with DataObject's own 'can' functions. MIN make possible to use DataExtension defined 'can' functions' signature without Strict level warning 2013-11-14 17:37:55 +13:00
Normann Lou
fd81f964e2 NEW make DMSDocument 'can' functions extensible 2013-11-14 15:00:16 +13:00
Andrew Short
00bffb2548 BUG: Fix access to documents on the staging site.
The DMS document controller had been changed to subclass ContentController
to correctly initialise the versioned stage. However, this had the side
effect of preventing access to documents when the "Stage" stage
was selected.

ContentController::init() calls the SiteTree::canViewStage() method, which
controls access when on the stage. However, since the data record was
non-existant, the method would always return false, preventing access to
documents.

This fix removes the subclassing of ContentController and just directly
initialises the versioned stage.
2013-10-11 21:58:13 +11:00
Andrew Short
76c4692d13 NEW: Add metadata to DMS links.
Shortlink links are now augmented with data attributes containing the
file extension and size.
2013-10-09 20:54:08 +11:00
Andrew Short
2c22ff476d Move shortcode handling into a new class. 2013-10-09 20:23:50 +11:00
Andrew Short
893c10955a BUG: Share session namespace with CMS main when adding documents.
The changes to the session management in 3.1 mean that editing when
uploading a document no longer worked as the page ID was not correctly
managed in the session. This addresses that issue by sharing a session
state with CMSMain.
2013-10-09 00:49:39 +11:00
Andrew Short
f718b90b69 BUG: Fix the action buttons not rendering on upload.
Due to escaping API changes, a HTMLText instance was being incorrectly
casted to JSON.
2013-10-08 19:20:18 +11:00
Stephen Shkardoon
0d9f011ea9 Merge pull request #33 from ajshort/pull-1
Extend content controller to make sure the correct stage is used.
2013-10-03 22:11:13 -07:00
Andrew Short
63e0417363 Extend content controller to make sure the correct stage is used.
The staging system is initialised inside ContentController::init(). As
the DMS serving bypassed this, the stage was not set correctly, meaning
permissions were not always correctly applied.
2013-10-03 23:54:40 +10:00
Stephen Shkardoon
075974edbb Compatbility with master - allowed_actions private 2013-10-03 19:29:21 +13:00
richardmward
b74b4f2de1 FIX #29 - 'linkdocument' needed adding to allowed_actions 2013-09-21 11:42:21 +01:00
Stephen Shkardoon
0765b90da8 Merge pull request #28 from ss23/master
FIX #25 - documentautocomplete need allowed_action
2013-09-19 15:18:41 -07:00
Stephen Shkardoon
049a1c8d84 FIX #25 - documentautocomplete need allowed_action 2013-09-20 10:17:30 +12:00
Julian Seidenberg
c2639d86d1 Merge pull request #24 from ss23/master
FIX Don't show the upload field when inappropriate
2013-09-10 22:13:14 -07:00
Stephen Shkardoon
8d4b24b68d FIX Don't show the upload field when inappropriate
This fix is quite ugly, but in theory, it's fine. By ugly,
  I mean the interface is kind of weird without it.
Because 3.1 allows uploading when a DataObject doesn't exist,
  we need to override the new defaults to not allow such if
  the DO isn't saved yet.
2013-09-10 21:03:42 +12:00
Stephen Shkardoon
144043c437 3.1 compat -- Add action to allowed_actions 2013-09-10 20:59:59 +12:00
Stephen Shkardoon
45849c5833 Merge pull request #22 from ss23/allowed_actions-3.1
Add allowed_actions to make it work for 3.1
2013-08-28 19:55:16 -07:00
Stephen Shkardoon
cb96c474da Add allowed_actions to make it work for 3.1 2013-08-29 14:50:43 +12:00
Stephen Shkardoon
5d3f232d58 Merge pull request #21 from ss23/fix-14
Fix #14 - Shortcode download link fixed
2013-08-28 18:07:58 -07:00
Stephen Shkardoon
6d0af08f1a Fix #14 - Shortcode download link fixed 2013-08-29 13:05:51 +12:00
Ingo Schommer
75899876d2 3.1 compat (controller code) 2013-08-22 17:21:55 +02:00
Stephen Shkardoon
aa190ea7a5 Fix deprecation warnings for master 2013-08-22 23:50:14 +12:00
Normann Lou
ea7b2c0471 BUG add $allowed_actions for both DMSDocumentAddController and DMSUploadField 2013-06-26 04:57:36 +12:00
Julian Seidenberg
6ecfa61ca1 BUG removing content method again, since it doesn't work reliably 2013-05-01 17:48:53 +12:00
Julian Seidenberg
f02303793d BUG moving new getContent method into DataObject, not Controller 2013-04-30 18:14:13 +12:00
Julian Seidenberg
687b4f5f97 NEW adding content method for compatibility with TextExtraction module 2013-04-30 18:07:57 +12:00
Cam Findlay
5bf804c1af FIX the autocomplete for adding a document to a page that already exists in the DMS. 2013-04-18 13:38:29 +12:00
Cam Findlay
3276320234 Added CRUD settings to allow non-admin CMS users to use parts of the dmx module. 2013-04-18 13:02:32 +12:00
Cam Findlay
1b6c76b405 Further updates for 3.1 compatibility. 2013-04-15 14:03:58 +12:00
Ingo Schommer
ebcd6caa26 Fixed DB quoting (mainly for non-MySQL compat) 2013-03-11 15:20:55 +01:00
Ryan Wachtl
9802e05a13 BUG getList() now returns the filtered DataList
In SilverStripe 3.1.x getList() was returning the unfiltered DataList and as a result all pages in the SiteTree were showing as having a reference to the given document.
2013-03-08 21:27:18 -06:00
Ingo Schommer
5e6b77a0a9 BUGFIX Using toMap() in create_version() to avoid DataObject::__construct() failures 2013-01-08 13:22:25 +01:00
Ingo Schommer
6b7ee0623a Only return DMSDocument->FullPath() when filename exists
Fixes a regression introduced with 18c2081b when uploading new files
2013-01-07 17:31:04 +01:00
Ingo Schommer
597e393630 BUG DMSUploadField JS template usage
Instead of relying on JavaScript requirements blocking,
configure a more specific template name to use
in certain situations. We can't control JS files
loaded by the browser already by previous requests,
so Requirements blocking does not override the
template in all cases, creating execution-path specific
edge cases (like showing "save to refresh" messages
in the background of a "add document" upload success)
2013-01-07 10:11:55 +13:00
Julian Seidenberg
8f5c65d539 API-CHANGE: adding a method to add to the list of extensions that are allowed as Documents. 2012-11-23 10:56:28 +13:00
Shea
1f89aad168 MINOR show ViewCount in document details view 2012-11-22 13:48:33 +11:00
Julian Seidenberg
a9f9e7111a API-CHANGE: adding ability to show/hide the Document tab on specific pages 2012-11-22 14:37:40 +13:00
Julian Seidenberg
18c2081be7 ENHANCEMENT: deleting the old file when replacing, if document versioning is turned off 2012-11-22 13:47:59 +13:00
Julian Seidenberg
408fd88d9e MINOR: adding spaces into labels 2012-11-22 13:42:03 +13:00
Julian Seidenberg
1bd5d929ef API-CHANGE: adding document versioning 2012-11-21 18:24:46 +13:00
Julian Seidenberg
6ebb212af0 BUGFIX: fixing bug with the delete button in the grid field detail view 2012-11-21 17:15:23 +13:00
Julian Seidenberg
c72bbefabc ENHANCEMENT: using a defined directory for the dms so you can change the directory, if you want 2012-11-21 10:22:40 +13:00
Julian Seidenberg
57063c1c48 MINOR: updating method name to match deployment 2012-11-13 10:51:42 +13:00
Julian Seidenberg
090c39c378 BUGFIX: adding line breaks in front-end for Descriptions.
BUGFIX: including appropriate hiding based on embargo/expiry
2012-11-13 10:42:43 +13:00
Ingo Schommer
c5ea1b3dbd MINOR Don't fatally fail on DMSDoc->getAbsoluteSize() if doc doesn't exist on filesystem
Mainly to help with dev environments which aren't fully populated with live data
2012-10-15 01:01:58 +02:00
Ingo Schommer
f2d81e26df BUG Don't delete docs if respective other stage of SiteTree still exists 2012-10-15 01:01:58 +02:00
Julian Seidenberg
179f2294e4 BUGFIX: implementing DocumentSort so that it doesn't break unit tests 2012-10-10 13:44:37 +13:00
Julian Seidenberg
1c84e70e96 BUGFIX: fixing API matching 2012-10-10 13:44:02 +13:00
Julian Seidenberg
3a9f329a96 BUGFIX: adding default sort 2012-10-09 17:39:59 +13:00
Julian Seidenberg
9fe54f18bc BUGFIX: newly added documents now always appear at the top of the list 2012-09-21 16:10:16 +12:00
Julian Seidenberg
745741344c BUGFIX: newly added documents now appear at the top of the list 2012-09-21 15:45:05 +12:00
Julian Seidenberg
e9ee4c85a7 BUGFIX: fixing in-content the insert dialog 2012-09-21 15:44:30 +12:00
Normann Lou
0a29388e9e BUGFIX: give the div field on document add/editing form a id so the form's _super behaviour is applied to it 2012-09-21 12:40:10 +12:00
Julian Seidenberg
16d1f74b28 ENHANCEMENT: removing extension from document title when uploading a new document 2012-09-20 15:28:44 +12:00
Normann Lou
c708551982 ENHANCEMENT: add usage of GridFieldPaginatorWithShowAll for documents grid field 2012-09-12 12:33:12 +12:00
Ingo Schommer
fe82f9c5bc BUG Sequential file upload to fix Solr reindexing problems 2012-09-11 10:22:17 +02:00
Ryan O'Hara
7e6342c11b MINOR: Add extra class to documents gridfield so styling is applied. Fix scss to target the document and related links gridfield 2012-09-11 17:29:52 +12:00
Andrew O'Neil
e3958fc25e MINOR: Increase page size back up to 15 2012-09-10 10:42:43 +12:00
Ryan O'Hara
11180da4ac ENHANCEMENT: Refactor linking a document. This fixes the bug issue Branka was having in FF as well as making the UI work better 2012-09-07 11:31:37 +12:00
Normann Lou
12fe7d74fd ENHANCEMENT: make DMSDocument be able to wrap into a RSSFeed 2012-09-07 10:53:47 +12:00
Saophalkun Ponlu
7ba2a4617a BUG Fix file size format in document links 2012-09-03 17:25:21 +12:00
Andrew O'Neil
79c8efee74 BUGFIX: Fix last changed ago not taking into account time of day 2012-09-03 14:57:54 +12:00
Andrew O'Neil
3c05ca0316 MINOR: Add document count to tab title 2012-09-03 13:29:13 +12:00
Andrew O'Neil
e7e98140cc MINOR: Change pagination to 10 per page 2012-09-03 11:19:27 +12:00
Saophalkun Ponlu
d5107bce52 BUG Document link hide/show bug 2012-08-31 15:45:54 +12:00
Ingo Schommer
a57f887bb2 NEW Allow decoration of DMSDocument->Pages() 2012-08-31 01:09:43 +02:00
Ingo Schommer
9f6c1c8d19 Fixed "viewd" spelling, changed to more apt name (trackView()) 2012-08-30 16:07:23 +02:00
Ingo Schommer
150f68e382 BUG Set raw date value for embargo/expiry to avoid DateField bugs
The object property is expected to be a scalar,
but the logic sets it to a DBField instance.
While DataObject handles this fine, the DatetimeField logic
fails and simply writes the string classname into the field.
Should be fixed in DatetimeField eventually, but easier
handled here for now.
2012-08-30 16:05:56 +02:00
Ingo Schommer
900f1d144a Naming for DMSDocument 2012-08-30 15:53:41 +02:00
Normann Lou
aa9e0f8bba FEATURE: track DMSDocument downloaded Count by its Field 'ViewCount' (we keep same name as Page for this field, for lots of benefits, such as using the same field for indexing in solar, sphinx etc). 2012-08-30 11:12:45 +12:00
Julian Seidenberg
1f0c08db5d BUGFIX: fixing all the API changes made by Ingo in an earlier commit by searching for usage and updating places where the APIs are used 2012-08-27 15:07:01 +12:00
Julian Seidenberg
d023300626 ENHANCEMENT: not showing the Documents tab on certain pages 2012-08-27 14:20:28 +12:00
Ingo Schommer
234ccb3b1c API Changed DMSDocument getters to be closer to existing File API
Reduces friction when migration from File records (which will be fairly common)
2012-08-22 23:20:48 +02:00
Ingo Schommer
f7f268a859 NEW Document sorting (and optional drag'n'drop) 2012-08-21 22:57:40 +02:00
Julian Seidenberg
bd75a41f9b ENHANCEMENT: warning when deleting a document that is referenced on other pages 2012-08-21 17:57:18 +12:00
Julian Seidenberg
b05cb59646 ENHANCEMENT: displaying the references count in the getCMSFields 2012-08-21 17:57:18 +12:00
Julian Seidenberg
bac9666597 API-CHANGE: dms shortcode system 2012-08-21 14:31:13 +12:00
Normann Lou
889d56d569 BUGFIX: make the DMSDocument_Controller to able able to use customised document object 2012-08-21 13:56:45 +12:00
Andrew O'Neil
725da88e75 MINOR: Document config system bug hack 2012-08-21 11:42:04 +12:00
Andrew O'Neil
5150e66de3 ENHANCEMENT: Extensions are now the main method of providing custom functionality, replacing subclassing DMSDocument 2012-08-21 11:31:53 +12:00
Ryan O'Hara
b5c16cafe6 ENHANCEMENT: Add styling to Embargo and expiry fields. Change date format to dd-mm-yyyy 2012-08-16 16:18:41 +12:00
Julian Seidenberg
55e530f918 BUGFIX: removing unnecessary extra function to embargo (to show document about to be published when in draft mode) 2012-08-15 13:18:29 +12:00
Julian Seidenberg
dee4cb44f3 ENHANCEMENT: displaying the document in draft mode if it has been set to "hide until underlying page is published" 2012-08-14 18:36:52 +12:00
Julian Seidenberg
1a4ba2b5dd MINOR: renaming forever to indefinitely (embargo) 2012-08-14 17:26:26 +12:00
Julian Seidenberg
9d0f8ade7e BUGFIX: changing from "magic" number labels for drop down states to word labels 2012-08-14 15:05:23 +12:00
Andrew O'Neil
6280bed9ab ENHANCMENT: Add document to page when it is clicked 2012-08-14 14:13:12 +12:00
Andrew O'Neil
be809ac2c9 ENHANCEMENT: Show list of documents when page is selected in dropdown 2012-08-14 14:13:12 +12:00
Andrew O'Neil
a6f8b83e1a ENHANCEMENT: Show number of documents on a page in dropdown 2012-08-14 14:13:11 +12:00
Andrew O'Neil
3af703fa9a ENHANCEMENT: Add treedropdown to select page when adding a document 2012-08-14 14:13:11 +12:00
Julian Seidenberg
b6a728dc0e ENHANCEMENT: adding grid field row highlighting when Document is hidden 2012-08-14 13:03:35 +12:00
Julian Seidenberg
2f2019a42d MINOR: changing button label to indicate that multiple documents can be added at once 2012-08-14 13:02:53 +12:00
Julian Seidenberg
7debe98641 BUGFIX: fixing small problem with not setting the expiry off again 2012-08-14 11:44:12 +12:00
Julian Seidenberg
2dbd0d89c1 BUGFIX: fixing expire/embargo on date functionality 2012-08-14 11:35:41 +12:00
Ingo Schommer
a858c1f66c BUG Using calendar in embargo/expiry date selection 2012-08-14 00:03:31 +02:00
Julian Seidenberg
429253591c ENHANCEMENT: adding basic UI for embargo/expiry 2012-08-13 18:28:24 +12:00
Julian Seidenberg
ba51c38262 ENHANCEMENT: javascript to hide/show the DMS detail form buttons 2012-08-13 16:41:43 +12:00
Julian Seidenberg
ca18b3fac0 API-CHANGE: working embargo API (with lots and lots of unit tests) 2012-08-13 14:14:31 +12:00
Julian Seidenberg
043eb540c1 ENHANCEMENT: Tidy-up of DMS link existing document feature 2012-08-10 12:05:34 +12:00
Julian Seidenberg
607d3e8266 ENHANCEMENT: Editing document defaults after adding 2012-08-09 18:10:50 +12:00
Andrew O'Neil
7de79e20be WIP Edit frame 2012-08-08 17:58:08 +12:00
Ryan O'Hara
a629f4b66e ENHANCEMENT: Move Actions into a FieldGroup and style these. TODO - Toggle each individual action detail when clicking the respective button. Currently when clicking a button this hides the whole panel 2012-08-08 12:17:20 +12:00
Julian Seidenberg
4854be9eea ENHANCEMENT: adding the ability to extend a DMSDocument's file querying mechanism. 2012-08-07 18:19:58 +12:00
Julian Seidenberg
66422c0a31 ENHANCEMENT: re-adding modified downloadtemplate, but only in specific case when access it through a grid field 2012-08-07 17:28:11 +12:00
Julian Seidenberg
7cfefdb953 ENHANCEMENT: only using special download template when displaying DMSUploadField in getCMSFields of GridField 2012-08-07 17:28:10 +12:00
Julian Seidenberg
e682125a03 BUGFIX: removing restriction that the uploaded file needs to have the same name as the previous file. The client specifically needs to be able to upload a new file with a different name. 2012-08-07 17:28:10 +12:00
Ryan O'Hara
8da51ff5e9 ENHANCEMENT: Add tab styling to add document dialog 2012-08-07 16:51:39 +12:00
Andrew O'Neil
0e65cb2f1e FEATURE: Adding existing documents now works 2012-08-07 14:42:28 +12:00
Julian Seidenberg
9e9cc995b3 ENHANCEMENT: warning when deleting a page with documents that exist only on this page. Also, when actually deleting the page, delete the associated documents that only exist on that page 2012-08-07 14:39:07 +12:00
Andrew O'Neil
e30a34eedb FEATURE: Autocomplete for add document 2012-08-07 13:45:01 +12:00
Ryan O'Hara
6c90c89276 ENHANCEMENT: Add styling to main document tab in CMS. Add unlink icon 2012-08-07 11:55:11 +12:00
Julian Seidenberg
043bfb98f6 API-CHANGE: refactoring static methods to adhere to coding conventions. 2012-08-07 11:19:54 +12:00
Julian Seidenberg
6fa0cc5a32 API-CHANGE: refactoring getDMSinstance() to inst() 2012-08-07 11:19:54 +12:00
Julian Seidenberg
c571d5bc8d ENHANCEMENT: protecting the "dms-assets" folder from web access 2012-08-07 11:16:10 +12:00
Ingo Schommer
c44434d498 FEATURE Replace file (incl. name validation) 2012-08-06 20:53:34 +02:00
Ingo Schommer
2d66b0e453 Linking to page in DMSDoc detail view, adding header 2012-08-06 15:46:05 +02:00
Julian Seidenberg
02fad50ab3 ENHANCEMENT: delete button warning 2012-08-06 18:17:01 +12:00
Ryan O'Hara
782b07ec80 MINOR: Adjust styling for gridfield showing where-else document is linked 2012-08-06 17:55:18 +12:00
Andrew O'Neil
8be5a754bc FEATURE: WIP add existing document to page 2012-08-06 17:52:41 +12:00
Andrew O'Neil
c3437d8646 BUGFIX: Fix edit links on document upload 2012-08-06 13:23:16 +12:00
Normann Lou
505bbc96a3 MINOR: missing images that should be used after you upload files to show the file type.
MINOR: add a TODO comments for other dev to check later.
2012-08-03 18:26:32 +12:00
Normann Lou
472183df09 ENHANCEMENT: add "Back" and "Done" button to the DocumentAddController. 2012-08-03 18:26:32 +12:00
Ryan O'Hara
228e9a25c7 ENHANCEMENT: add styling to meta-data. MINOR: Add initial styling for document type and action buttons with JS to hide panels - this needs a lot of work 2012-08-03 12:18:55 +12:00
Julian Seidenberg
44317bfbe6 API-CHANGE: overriding DMS delete button (not quite working yet) 2012-08-01 18:38:06 +12:00
Andrew O'Neil
66a7a0a738 Edit form for upload 2012-08-01 17:59:41 +12:00
Julian Seidenberg
d6740d8482 ENHANCEMENT: adding scss stlying 2012-08-01 16:12:11 +12:00
Julian Seidenberg
236857bc80 API-CHANGE: deleting a DMSDocument from the GridField working 2012-08-01 15:00:53 +12:00
Normann Lou
f933e1a335 APICHANGE: add getFileSize() function to DMSDocument 2012-08-01 14:42:51 +12:00
Normann Lou
5e448c8d7b APICHANGE: add DMSDocument->getFileExt(), remove DMSDocument_Controller::get_file_extension(), use the instance function where ever applicable. 2012-08-01 14:13:07 +12:00
Normann Lou
40631b12b1 MINOR: type 'an' should be "and' in inline documentation 2012-08-01 13:43:46 +12:00
Normann Lou
99435e39b7 BUGFIX: use the new API method getFilenameWithoutID() 2012-08-01 13:23:20 +12:00
Normann Lou
09a8229ec0 APICHANGE: change DMSDocumentInterface::downloadLink() to DMSDocumentInterface::getDownloadLink() so that a $DownloadLink could be used as a field to make GridField for DMSDocument to have a formatted linkable column
ENHANCEMENT: make "Filename" column of a GridField clickable hence make the document downlaodable.
ENHANCEMENT: make "Last Changed" column show as a "Ago" format, ie. 'A day ago' or 'there months ago'.
2012-08-01 12:35:44 +12:00
Normann Lou
f361cab459 APICHANGE: rename filenameWithoutID() to getFilenameWithoutID() so that FilenameWithoutID could be used as a data object 'field' and could be used in a grid field of DMSDocument 2012-08-01 10:51:52 +12:00
Andrew O'Neil
66dd7e9394 Fix breadcrumbs for add document 2012-08-01 10:49:58 +12:00
Andrew O'Neil
adf25185f1 ENHANCEMENT: Adding documents to a page works! (poorly) 2012-08-01 10:49:57 +12:00
Julian Seidenberg
2819a5fd60 BUGFIX: removing debug statements and adding the correct filename when downloading documents 2012-08-01 10:43:53 +12:00
Julian Seidenberg
fcd29dbf31 ENHANCEMENT: working replace file and usage listing 2012-07-31 18:17:08 +12:00
Julian Seidenberg
449b1d3ba4 ENHANCEMENT: using DMSUploadField in DMSDocument 2012-07-31 18:17:07 +12:00
Andrew O'Neil
a161dca65a MINOR: Move DMSUploadField into cms folder 2012-07-31 14:42:25 +12:00
Andrew O'Neil
5cd6e96189 MINOR: Move cms code into its own folder 2012-07-31 14:26:53 +12:00
Julian Seidenberg
e41d6691f0 API-CHANGE: adding stub method 2012-07-31 14:26:29 +12:00
Julian Seidenberg
f7e0bb918a API-CHANGE: overriding upload field for DMS 2012-07-31 14:24:50 +12:00
Andrew O'Neil
c0b52b939d FEATURE: Upload button for documents (WIP) 2012-07-31 14:12:20 +12:00
Julian Seidenberg
5a13ff221e API-CHANGE: cmsFields for DMSdocument 2012-07-30 18:31:23 +12:00