Commit Graph

242 Commits

Author SHA1 Message Date
Ingo Schommer
93558a6d62 Globalization in TreeDropdownField JS 2013-10-08 12:12:25 +02:00
Ingo Schommer
e7953f3b41 Merge pull request #2474 from wilr/externalcmslink
API: Add attributes argument for CMSMenuItem for external links
2013-10-02 02:38:56 -07:00
Will Rossiter
2d0a354405 API: Add attributes argument for CMSMenuItem.
Currently help menu item is the only external link in the CMS and the ability for it to work is hardcoded in the template. This request makes the target attribute definable by CMSMenu::add_link().

Adds documentation for how to add a basic external link to the CMS.
2013-10-02 19:06:54 +13:00
Andrew Short
9e984b8c99 Add an extension hook for the batch actions form. 2013-09-27 15:46:01 +10:00
Ingo Schommer
afe06661ef Merge remote-tracking branch 'origin/3.0' into 3.1
Conflicts:
	admin/templates/Includes/LeftAndMain_Menu.ss
	admin/templates/Includes/ModelAdmin_ImportSpec.ss
	admin/templates/Includes/ModelAdmin_Tools.ss
	admin/templates/LeftAndMain.ss
	admin/templates/ModelSidebar.ss
	i18n/i18n.php
	templates/ComplexTableField.ss
	templates/ComplexTableField_popup.ss
	templates/FileIFrameField_iframe.ss
	templates/Includes/GridFieldItemEditView.ss
	templates/Includes/TableListField_PageControls.ss
	templates/RelationComplexTableField.ss
	templates/TableField.ss
	templates/TableListField.ss
2013-08-07 17:14:47 +02:00
Ingo Schommer
00ffe72944 Translations: Switch to Transifex format
- Based on new (last) translation download from getlocalization.com
- Removed untranslated strings. Getlocalization started including those at some point
which is highly annoying, unnecessary and breaks the new transfix system,
since it'll mark all of the english strings as actual translations
- Avoid dots in entities. It confuses the Transifex YML parser
- Removed some locales unknown to Transifex which didn't have any translations anyway
- Removed "lolcat" locale, uses custom notation (en@lolcal)
  which SilverStripe's i18n system can't handle
  (needs mapping from SS naming to Zend naming)
- Renamed "Te Reo/Maori" locale from "mi_NZ" to "mi" (Transifex/CLDR notation)
- Namespaced all entities used in templates (deprecated usage)
- Converted dots to underscores where template filenames are used for namespaces,
since Transifex YML parsing handles them as separate YML keys otherwise
- Removed whitespace in entity names, SilverStripe i18n can't handle it
- Only allow selection of locales registered through i18n::$all_locales to avoid
  issues with unknown locales in Zend's CLDR database
2013-08-07 00:25:16 +02:00
Will Rossiter
919a8c21c3 FIX: pass controller as reference inside closure.
Non referenced causes segfaults on PHP <= 5.3.8 environments when opening subtrees in the CMS. Likely the cause of silverstripe-cms/issues/803.
2013-07-31 14:12:08 +12:00
Ingo Schommer
d4a1e6d294 BUG Prevent clickjacking in CMS and Security controllers (fixes #2215) 2013-07-14 22:44:09 +02:00
Simon Welsh
e5ed8f1ef2 Merge branch '3.0' into 3.1 2013-07-10 12:31:38 +12:00
Simon Welsh
b506eb1b29 Use httpError() instead of non-existent HTTPResponse_Exception class 2013-07-10 12:30:27 +12:00
ARNHOE
6e7cae50fd Updated helplink to 3.1 2013-06-22 18:08:25 +02:00
Ingo Schommer
bfff11eb9c API New CMSForm class to allow validation responses in CMS (fixes #1777)
Thanks to @willmorgan for getting this discussion started
(see https://github.com/silverstripe/sapphire/pull/1814).
2013-06-13 07:51:05 +02:00
Will Rossiter
db85f3ca16 FIX extra_requirements to accept non associative arrays.
Added unit tests for extra_requirements_js and extra_requirements_css.

Fixed YAML documentation to indicate list syntax.
2013-06-02 13:37:34 +12:00
Sam Minnee
4548b67538 NEW: Add LeftAndMain.session_keepalive_ping config option.
The Session-keepalive ping that is built into LeftAndMain (i.e. all of the CMS admin) can now be
turned off.  The main reason you would want to do this is if you have enabled Session.timeout,
and you want users to be locked out of the CMS after a period.
2013-05-31 16:27:30 +12:00
Ingo Schommer
bd918915e2 Merge pull request #2023 from g4b0/left-and-main-classes
BUG: correct handling of multiple classes
2013-05-29 07:23:26 -07:00
Loz Calver
9be5f07231 Fixes for LeftAndMain::require_themed_css()
LeftAndMain::require_themed_css() was setting an incorrect property, and a typo meant that those requirements would never be detected anyway
2013-05-28 15:48:23 +01:00
g4b0
9fc58feb03 BUG: correct handling of multiple classes 2013-05-28 16:25:25 +02:00
Ingo Schommer
67d1327b90 Avoid collision of status flags in tree items when updating tree nodes
Fixes silverstripe/silverstripe-cms#445
See https://github.com/silverstripe/silverstripe-framework/pull/1996
Thanks to Jean-Fabien for getting this started
2013-05-25 11:27:50 +02:00
Will Rossiter
ddcfcf7bed Update @package, @subpackage labels
Cleanup of framework's use of @package and @subpackage labels and additional of labels for classes missing packages.

Moved all GridField related components to the one name.

Countless spelling fixes, grammar for other comments.

Link ClassName references in file headers.
2013-05-21 22:24:41 +12:00
Ingo Schommer
e5d3a1da6b Disable ContentNegotiator in CMS (fixes #1850) 2013-05-08 23:45:53 +02:00
Ingo Schommer
17362f9474 Showing "Help" menu item below "Settings" 2013-04-09 12:20:20 +02:00
Sam Minnee
e6d8280296 Removed notice-level erorr in CMS page list. 2013-04-09 11:42:30 +12:00
Ingo Schommer
01f46d039f NEW Enforce max node counts to avoid excessive resource usage
Rendering potentially 1000s of nodes can exceed the CPU and memory constraints
of a normal PHP process, as well as the rendering capabilities of browsers.
Set a hard maximum for the renderable nodes, deferring to a "show as list" action
in the main CMS tree. For TreeDropdownField, we don't have the list fallback option,
so ask the user to search for the node title instead.

Also makes both the "node_threshold_total" and "node_threshold_leaf" values configurable
2013-04-09 10:24:18 +12:00
Ingo Schommer
828ac7fe4f API Replaced SSViewer.custom_theme with SSViewer.theme_enabled
Since we can't influence the setting of configuration values,
we also can't set/unset the 'custom_theme' value based on which
theme is set. This means the 'custom_theme' value goes stale,
and we can't rely on it e.g. in FilesystemPublisher.

The 'theme_enabled' toggle is a cleaner solution to the same problem,
since the 'custom_theme' was really just a way to remember the original
theme, while still disabling it. The toggle makes this more explicit,
but also requires users of the 'theme' setting to check for it.
2013-04-07 23:59:10 +02:00
Ingo Schommer
1dda9ae45f Fixed extra_requirements docs 2013-04-05 15:35:30 +02:00
g4b0
f033321adc Solved json obj to array issue 2013-03-28 22:06:37 +01:00
g4b0
93428bd8f2 Solved json obj to array issue 2013-03-28 14:52:13 +01:00
Ingo Schommer
3c30c36b71 Fixed help_link config usage 2013-03-27 21:48:55 +01:00
Ingo Schommer
3334eafcb1 API Marked statics private, use Config API instead (#8317)
See "Static configuration properties are now immutable, you must use Config API." in the 3.1 change log for details.
2013-03-24 17:20:53 +01:00
Ingo Schommer
53c84ee1fe Merge remote-tracking branch 'origin/3.0' into 3.1 2013-03-19 14:04:29 +01:00
Ingo Schommer
52ffb307a7 Fixed ValidationException handling in LeftAndMain
getResult() isn't always available, and has the same content
as the native Exception->getMessage() anyway
2013-03-19 14:02:28 +01:00
Andrew Short
b8a51c3792 Merge branch '3.0' into 3.1 2013-03-19 22:27:09 +11:00
Ingo Schommer
dd6f33ab37 FIX Respect tree node limits, fix search result node display
- Renamed $minNodeCount to more accurate $nodeCountThreshold
- The $minNodeCount attribute wasn't properly respected
during actual querying, so SilverStripe would always traverse
the entire tree (and load all objects into memory),
before then marking nodes as "unexpanded", which prevents
them from actually being rendered.
- Fixes nodes on search results to be expanded by default
- Fixes nodes on search results to correctly ajax-expand
2013-03-19 00:05:14 +01:00
Andrew Short
6ae931df24 Merge branch '3.0' into 3.1 2013-03-15 21:47:23 +11:00
Ingo Schommer
b81f39aee5 API Handle uncaught ValidationException on CMS controller execution
This removes the need for a lot of boilerplate code
around DataObject->write() logic, and avoids generic 500 errors
on user-level failures. This should really be a per-project choice,
but at the moment request handling doesn't allow to configure
custom exception handling.
2013-03-08 12:55:30 +01:00
Ingo Schommer
2b6d735182 Using composer.lock for LeftAndMain->CMSVersion()
See https://github.com/silverstripe/silverstripe-cms/pull/289 for context
2013-02-28 13:38:19 +01:00
Loz Calver
8066376290 ENHANCEMENT: LeftAndMain breadcrumbs to use MenuTitle
Breadcrumbs in the CMS currently only use title, when MenuTitle is
probably more appropriate (if it is set).
2012-12-17 17:41:04 +01:00
uniun
77212c0647 CMS Titles does not support UTF-8
Title in CMS is set using header X-Title. But UTF-8 characters can't be used in HTTP headers. So the title should be encoded just before sending X-Title header and decoded before setting HTML document title (fixes #7942).
2012-12-17 17:36:00 +01:00
Naomi Guyer
5cef05ebea Separate out ActionTabSet functionality into a new file & clean up. 2012-12-13 17:43:25 +01:00
Mateusz Uzdowski
4fa2b0f3ff API Support disabling/enabling of previews.
This fixes the problem of panels flipping back to the Pages section if
loading a non-previewable section, and also initialisation problems.
2012-12-10 17:52:01 +01:00
Mateusz Uzdowski
8f5acd70b3 API Move state to enwtine properties, provide API for preview.
Also the preview state is now kept between panel loads. We also use a
redraw function to update appearance based on the state.
2012-12-10 17:52:01 +01:00
Mateusz Uzdowski
d4f13fe532 API Refactor the CMS layouting to provide access to options.
It is now possible to change the threeColumnLayout width options for the
columns via entwine property LayoutOptions and accessor methods.

Thanks @robert-h-curry, @clarkepaul for contributing!
2012-12-10 17:52:01 +01:00
Mateusz Uzdowski
f4b080ee06 NEW Side by side editing functionality - first cut (os#7412)
Introduces a preview window that appears when the screen is wide enough,
removes old preview button, adds a draft-public switch, adds variety of
preview options which are not hooked up yet.

Goes along with cms commit fa3738a9f4c5181eabf18a77ca89792d31592250
2012-12-10 17:51:35 +01:00
Ingo Schommer
4d106aa998 BUG Fixed unintentional ParentID reset in "add page" form
Side effects from old JS hanging around which was no longer used.
See d364070941
for background discussion.
2012-12-04 11:30:29 +01:00
Ingo Schommer
c55c7c33f8 Merge branch '3.0'
Conflicts:
	admin/code/CMSProfileController.php
	composer.json
	tests/model/DataObjectTest.php
2012-11-22 23:51:28 +01:00
Loz Calver
ea2dc9da0e ENHANCEMENT: Add ability to change URL for SS logo in CMS Menu 2012-11-09 11:06:04 +01:00
Andrew O'Neil
0c8de0a1de APICHANGE: Use late static binding for Object::has_extension() 2012-11-07 11:07:55 +13:00
Sean Harvey
169366a011 Merge branch '3.0' 2012-11-06 13:04:21 +13:00
Sean Harvey
3451da001a BUG Fixing session keep alive for non-ADMIN users
SecurityAdmin isn't always available for CMS users, as they might
not have permission to view that section. This fixes the problem
with session keep alive by moving the ping to Security/ping, which
is available for all users.
2012-11-05 15:41:10 +13:00
Sean Harvey
fbc6e3366b Merge branch '3.0' 2012-11-05 15:11:48 +13:00