Commit Graph

129 Commits

Author SHA1 Message Date
Ingo Schommer
0e3b4bfc88 MINOR Merged from trunk
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.3@76843 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 17:48:20 +13:00
Hamish Friedlander
29ab106af8 ENHANCEMENT: Correct issue with SiteTree filtering not persisting and add drop down for page type and clear button. Part of a re-work of the search system
@todo: Tests, speed optimisation, proper connection of filtering with tree control checkboxes

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.3@76779 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 17:48:20 +13:00
Ingo Schommer
413b73dc0d MINOR Merged from trunk
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.3@76733 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 17:48:20 +13:00
Sam Minnee
0518e205c7 API CHANGE: Made batch actions pluggable through CMSBatchActionHandler::register()
ENHANCEMENT: Added batch actions for unpublish and delete from published.

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.3@76666 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 17:48:20 +13:00
Sean Harvey
f2aa215cce BUGFIX Ensure that template path comments don't make it into ViewArchivedEmail
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.3@75919 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 17:48:18 +13:00
Sam Minnee
820d6b92cd ENHANCEMENT: Added 'show deleted pages' function to CMS, with a restore page option.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.3@75737 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 17:48:17 +13:00
Sam Minnee
d33c2869a7 BUGFIX: Let CMS users open pages deleted from draft; bug introduced by translatable.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.3@75611 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 17:48:15 +13:00
Andrew O'Neil
859cfe66bd FEATURE: Allow Title and Navigation Label to be searched separately
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.3@75153 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 17:48:14 +13:00
Ingo Schommer
74fad6a1d0 Merging refactored Translatable from trunk, and related changes to CMSMain
------------------------------------------------------------------------
r69959 | ischommer | 2009-01-11 01:15:30 +1300 (Sun, 11 Jan 2009) | 18 lines

Merged, debugged and enhanced Translatable patches from branches/translatable at r64523, r64523, 64523, thanks wakeless!
API CHANGE Changed Translatable schema from auxilliary tables (SiteTree_lang, SiteTree_lang_Live) to automatically filtered records on the original table (SiteTree, SiteTree_Live), using $Lang and $OriginalID properties. Incompatible update to old schema, migration script is in the works.
API CHANGE Removed Translatable::get_one(), Translatable::write()
ENHANCEMENT Simplified Translatable tree generation by using getSiteTreeFor() in CMSMain->createtranslation()
ENHANCEMENT Added AllChildrenIncludingDeleted(), augmentNumChildrenCountQuery(),  augmentAllChildrenIncludingDeleted(), augmentStageChildren() to Translatable class to allow for more stable tree generation.
ENHANCEMENT Moved definition of Translatable schema from augmentDatabase() to Translatable->extraStatics()
ENHANCEMENT Changes to the CMS language selection refresh the whole admin interface instead of the tree only. This way we can add a URL parameter ?lang=<lang> to /admin, which makes the specific language bookmarkable and reloadable. Changes to LangSelector.js
ENHANCEMENT Added fallback to ModelAsController->getNestedController() to fetch page with matching URLSegment but different language in case no page is found in the current language.
ENHANCEMENT Added helper methods to Translatable: getTranslation(), hasTranslation(), isTranslation(), findOriginalIDs()
ENHANCEMENT Getters and setters for Translatable->getOriginalPage() etc.
ENHANCEMENT Hooking Translatable into ModelAsController and ContentController initialization in order to call choose_site_lang()
ENHANCEMENT Simplified Translatable->augmentSQL(), augmentWrite() by not using auxilliary tables
ENHANCEMENT Showing clickable links for Translations in Translatable->updateCMSFields()
BUGFIX Modifying Hierarchy/SiteTree Children getters to accept optional "context" which can be used to set a language explicitly through the $Lang property, rather than implicitly reyling on the static Translatable::current_lang()
BUGFIX Fixed TranslatableTest to work with new datamodel
BUGFIX Temporarily disabled cookie/session selection in Translatable::choose_site_lang() until we have a good test suite for the side effects.
MINOR Added "untranslated" CSS styles to tree nodes and marking them as inactive/grey

------------------------------------------------------------------------
r70307 | ischommer | 2009-01-16 17:16:19 +1300 (Fri, 16 Jan 2009) | 2 lines

ENHANCEMENT Simplifying creation logic of new languages in CMS by reloading complete interface, rather than refreshing partial interface, language dropdown etc.
API CHANGE Removed CMSMain->switchlanguage()
------------------------------------------------------------------------
r70308 | ischommer | 2009-01-16 17:17:37 +1300 (Fri, 16 Jan 2009) | 2 lines

ENHANCEMENT Moved language selector in CMS above tree for better visibility, added padding and adjusted dropdown width
ENHANCEMENT Removed "Translating mode" status message above edit form - should be clear by the language dropdown above the CMS tree now
------------------------------------------------------------------------
r70322 | ischommer | 2009-01-19 13:09:55 +1300 (Mon, 19 Jan 2009) | 1 line

BUGFIX Ensuring that new pages can't be created when in translation mode by disabling the "create..." tree action
------------------------------------------------------------------------
r70323 | ischommer | 2009-01-19 13:11:08 +1300 (Mon, 19 Jan 2009) | 1 line

BUGFIX Fixed expanded/unexpanded flags on new tree items - was showing expanded styling (plus icon) with newly created pages
------------------------------------------------------------------------
r70324 | ischommer | 2009-01-19 13:26:02 +1300 (Mon, 19 Jan 2009) | 1 line

BUGFIX Making sure that LeftAndMain->CurrentPage() respects language settings - was returning pages in different language from session after switching between languages in cms
------------------------------------------------------------------------
r71297 | sharvey | 2009-02-03 18:12:42 +1300 (Tue, 03 Feb 2009) | 1 line

BUGFIX Only show the LangSelector dropdown if there's multiple languages available on the site
------------------------------------------------------------------------
r73343 | ischommer | 2009-03-19 06:14:02 +1300 (Thu, 19 Mar 2009) | 1 line

BUGFIX Changed CSS selector for TranslationTab javascript behaviour to be less specific
------------------------------------------------------------------------
r73344 | ischommer | 2009-03-19 06:14:59 +1300 (Thu, 19 Mar 2009) | 1 line

BUGFIX Checking for existence of original before trying to get translation in LeftAndMain->currentPage()
------------------------------------------------------------------------
r73345 | ischommer | 2009-03-19 06:18:52 +1300 (Thu, 19 Mar 2009) | 3 lines

ENHANCEMENT Showing all available languages in language selector above sitetree in CMS - you can now create new pages in completely new languages without any relation to an "original"
ENHANCEMENT Added CMSMain->IsTranslatableEnabled
API CHANGE Removed CMSMain->switchlanguage() - createTranslation() is sufficient for new, ajax refreshing of CMS state got way too complicated for switching languages, we now just reload the entire CMS with a different ?lang GET parameter
------------------------------------------------------------------------
r73469 | ischommer | 2009-03-20 21:49:27 +1300 (Fri, 20 Mar 2009) | 1 line

ENHANCEMENT Adjusted CMSMain and LeftAndMain to use locales instead of short lang codes when reading and writing translations. See r73468 for details on the underlying Translatable datamodel change
------------------------------------------------------------------------
r74071 | ischommer | 2009-04-04 10:24:59 +1300 (Sat, 04 Apr 2009) | 1 line

BUGFIX Fixed Form_EditForm_Locale reference in LeftAndMain_right.js (used to be Form_EditForm_Lang)
------------------------------------------------------------------------
r74072 | ischommer | 2009-04-04 10:26:51 +1300 (Sat, 04 Apr 2009) | 1 line

MINOR Using Translatable::choose_site_locale() instead of choose_site_lang() in LeftAndMain->init()
------------------------------------------------------------------------
r74951 | ischommer | 2009-04-22 16:23:56 +1200 (Wed, 22 Apr 2009) | 1 line

BUGFIX Fixed CMSMainTest->testThatGetCMSFieldsWorksOnEveryPageType() - was comparing a string $class with instanceof() instead of comparing the actually created instance
------------------------------------------------------------------------



git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.3@74988 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 17:48:13 +13:00
Sam Minnee
cd6a6ad92d BUGFIX: Fixed ajax-response for multiple-item deletion
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.3@73117 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 17:48:08 +13:00
Will Rossiter
7a027eb753 BUGFIX: fixed site page restoration
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.3@71250 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 17:48:05 +13:00
Sean Harvey
dd61569d6c ENHANCEMENT Creation of a new page type now uses a consistent source of classes that respect $hide_ancestor on SiteTree.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.3@70131 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 17:47:54 +13:00
Sean Harvey
ba854a960e BUGFIX Removed ANSI compatible SQL that shouldn't be in branches/2.3 - this feature is available in trunk
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.3@70077 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 17:47:53 +13:00
Sean Harvey
9b84e9df6f MINOR Removed redundant code in CMSMain->AddPageOptionsForm()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.3@70065 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 17:47:53 +13:00
Sean Harvey
8f22f4ffc3 ENHANCEMENT Default to "Page" for new page type dropdown
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.3@70064 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 17:47:53 +13:00
Sam Minnee
508aa8a80b Pre-cache page version numbers when querying CMS tree for query efficiency
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.3@69982 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 17:47:53 +13:00
Ingo Schommer
4cf2ee5e38 BUGFIX Explicitly setting "lang" as a GET var when getting a page within the CMS (if the language chooser DOM object is available, hence translation mode is enabled). Used in CMSMain->init() to set the "current language". (merged from branches/translatable in r64523, thanks wakeless!)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.3@69899 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 17:47:52 +13:00
Ingo Schommer
559a4e5899 ENHANCEMENT Moved i18n::get_existing_content_languages() to correct namespace in Translatable::get_existing_content_languages().
BUGFIX Using SQL DISTINCT in get_existing_content_languages()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.3@69891 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 17:47:52 +13:00
Sean Harvey
c247db5146 ENHANCEMENT Allow selection of parent page with adding page through URL - Ticket #3177. Thanks simon_w!
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.3@69864 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 17:47:52 +13:00
Ingo Schommer
3351aef184 MINOR Merged r69410 from trunk
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.3@69839 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 17:47:52 +13:00
Ingo Schommer
4ed5760c90 BUGFIX Fixed permissions in CMSMain->revert() - only needs edit permissions, not publish permissions
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.3@69442 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 17:47:49 +13:00
Ingo Schommer
fa8e4a12a6 ENHANCEMENT More readable (and linked) output of "you are comparing..." message when viewing version of a page
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.3@69322 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 17:47:49 +13:00
Sam Minnee
b4d24d441d Fixed loading of CMS toolbar with the HtmlEditorField
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.3@68945 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 17:47:48 +13:00
Ingo Schommer
aa0f54fa97 ENHANCEMENT Appending classnames to translated pagetype titles in CMSMain->getPageTypes() when the cms is loaded in a non-english version - see inline comment
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.3@68818 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 17:47:48 +13:00
Ingo Schommer
d635f0ead2 BUGFIX Making only formfields readonly (not formactions) when comparing versions and showing historical versions within CMSMain
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.3@68810 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 17:47:48 +13:00
Ingo Schommer
66be81326d ENHANCEMENT Improved display of class permissions in /admin/security by using the menu title in addition to the classname (users won't necessarily know which classname an admin area corresponds to). Also using "Access to all CMS interfaces" as a permission description for CMS_ACCESS_LeftAndMain
MINOR Updated language tables

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.3@68771 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 17:47:48 +13:00
Ingo Schommer
9845cadb3b BUGFIX Limiting readonly transformation of form in CMSMain->EditForm() to fields only (excluding actions). FormAction readonly transformations were fixed a while ago, which meant that they were actually enforced now, causing unavailable cms actions in certain scenarios (e.g. with a page deleted from live, which should make the fields readonly, but leave buttons functional)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.3@68754 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 17:47:47 +13:00
Sam Minnee
45e34d4255 BUGFIX: Updated CMS to support HtmlEditorField changes in r68701
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.3@68702 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 17:47:47 +13:00
Sean Harvey
74545e682c MINOR Removed whitespace after ?> end PHP tag
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.3@67468 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 17:47:44 +13:00
Ingo Schommer
12dc778cf5 ENHANCEMENT Disallowing CMSMain->revert() if SiteTree->canPublish() is not granted (used to be SiteTree->canEdit()). If a user isn't allowed to publish, he shouldn't be allowed to revert the live state of a page either.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.3@67072 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 17:47:43 +13:00
Ingo Schommer
832cd7c1e9 ENHANCEMENT Moving "save" and "delete" cms actions from CMSMain->EditForm() into SiteTree->getCMSActions() to make them decoratable (e.g. disallow delete action) and easier to cover with unit tests. Leaving fallback "save" and "delete" actions in CMSMain in case no actions are defined (necessary e.g. for Group class in SecurityAdmin)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.3@67061 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 17:47:43 +13:00
Sean Harvey
21fa7b24f7 MINOR Removed unused action "waitingon" from CMSMain::$allowed_actions
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.3@66643 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 17:47:40 +13:00
Sean Harvey
d1ed61a5f4 MINOR Removed TaskList remnants of old cms workflow code
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.3@66642 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 17:47:40 +13:00
Sean Harvey
77ea25ca07 MINOR Removed old workflow instances in the cms module. See ticket #3044
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.3@66310 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 17:47:38 +13:00
Sam Minnee
45c4d670b6 API CHANGE: Revamped CMSMenu system to not instantiate any objects, so that _config.php doesn't get fskd
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.3@66264 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 17:47:38 +13:00
Ingo Schommer
5c97a59a5c BUGFIX Disabled js code in CMSMain->switchlanguage() which was assuming wrong DOM structure (TODO: Replace with more robust selectors)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.3@66136 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 17:47:37 +13:00
Sam Minnee
325ef6fe34 BUGFIX #3065: Fixed restore page
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.3@66067 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 17:47:37 +13:00
Sam Minnee
555ee1549b BUGFIX #3063: Allow old-school method of adding menu items to LeftAndMiain:
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.3@66062 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 17:47:37 +13:00
Sam Minnee
16d96c7f36 FEATURE #1614: Allow use of admin/addpage?ParentID=(ID)&PageType=(Class) url to quick-add pages
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.3@65904 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 17:47:36 +13:00
Sam Minnee
f001eee5fe BUGFIX #2706: Fixed JS error in multi-nested pages deletion
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.3@65896 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 17:47:36 +13:00
Sam Minnee
c2fe5b15ae FEATURE #594: Added javascript-on-demand support
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@65689 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-12 04:31:53 +00:00
Sam Minnee
d03e189f63 Replaced 300-second 'long execution' times with unlimited
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@65529 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-10 05:06:08 +00:00
Ingo Schommer
7e072ad785 BUGFIX Fixed Translatable::default_lang() call in CMSMain
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@65515 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-10 01:48:43 +00:00
Ingo Schommer
df7092163f ENHANCEMENT Using currently used content languages for options in the TinyMCE spellchecker (see http://open.silverstripe.com/ticket/2498#comment:2)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@65513 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-10 01:47:13 +00:00
Ingo Schommer
62a36c6828 ENHANCEMENT Added LeftAndMainDecorator
API CHANGE Deprecated DataObjectDecorator->augmentInit(), use LeftAndMainDecorator->init()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@65454 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-07 12:21:10 +00:00
Ingo Schommer
9bf3245939 BUGFIX Enforce permission checks in LeftAndMain and CMSMain through SiteTree->canView()/canEdit()/canAddChildren()/canPublish()/canDelete() (see #2701)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@65152 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-03 14:56:36 +00:00
Ingo Schommer
e1d5fc9db6 BUGFIX Fixed menu titles entity references in CMSMain and AssetAdmin
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@65104 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-02 22:45:05 +00:00
Ingo Schommer
2cdf57053f FEATURE Added CMSMenu and CMSMenuItem and adjusted existing LeftAndMain subclasses to use new notation.See #2872 (thanks to hamish for the patch!)
API CHANGE Removed LeftAndMain::add_menu_item(), LeftAndMain::remove_menu_item(), LeftAndMain::replace_menu_item(), LeftAndMain::clear_menu()
MINOR Disabled LeftAndMainTest, now covered by CMSMenuTest

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@65095 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-02 21:27:55 +00:00
Ingo Schommer
e2ca30f78a BUGFIX Using SiteTree::get_by_url() (see r65060)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@65061 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-02 00:24:46 +00:00
Ingo Schommer
118efae75d BUGFIX Adjusted HeaderField and LabelField implementation to new constructor arguments (see r64421)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@64423 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-16 13:27:12 +00:00