API CHANGE Removed SideReport_ToDo report and "To-do" tab on SiteTree, please use the new silverstripe-page-todo module instead

This commit is contained in:
Ingo Schommer 2011-04-15 13:44:36 +12:00
parent 941863aa86
commit c1d5e9baa7
3 changed files with 0 additions and 40 deletions

View File

@ -19,7 +19,6 @@ Director::addRules(1, array(
// Register default side reports // Register default side reports
SS_Report::register("SideReport", "SideReport_EmptyPages"); SS_Report::register("SideReport", "SideReport_EmptyPages");
SS_Report::register("SideReport", "SideReport_RecentlyEdited"); SS_Report::register("SideReport", "SideReport_RecentlyEdited");
SS_Report::register("SideReport", "SideReport_ToDo");
if (class_exists('SubsiteReportWrapper')) SS_Report::register('ReportAdmin', 'SubsiteReportWrapper("BrokenLinksReport")',-20); if (class_exists('SubsiteReportWrapper')) SS_Report::register('ReportAdmin', 'SubsiteReportWrapper("BrokenLinksReport")',-20);
else SS_Report::register('ReportAdmin', 'BrokenLinksReport',-20); else SS_Report::register('ReportAdmin', 'BrokenLinksReport',-20);

View File

@ -77,9 +77,6 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
"ReportClass" => "Varchar", "ReportClass" => "Varchar",
"CanViewType" => "Enum('Anyone, LoggedInUsers, OnlyTheseUsers, Inherit', 'Inherit')", "CanViewType" => "Enum('Anyone, LoggedInUsers, OnlyTheseUsers, Inherit', 'Inherit')",
"CanEditType" => "Enum('LoggedInUsers, OnlyTheseUsers, Inherit', 'Inherit')", "CanEditType" => "Enum('LoggedInUsers, OnlyTheseUsers, Inherit', 'Inherit')",
// Simple task tracking
"ToDo" => "Text",
); );
static $indexes = array( static $indexes = array(
@ -1806,10 +1803,6 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
_t('SiteTree.HOMEPAGEFORDOMAIN', "Domain(s)", PR_MEDIUM, 'Listing domains that should be used as homepage') _t('SiteTree.HOMEPAGEFORDOMAIN', "Domain(s)", PR_MEDIUM, 'Listing domains that should be used as homepage')
) )
), ),
$tabToDo = new Tab(_t('SiteTree.TABTODO', 'To-do') . ($this->ToDo ? '**' : ''),
new LiteralField("ToDoHelp", _t('SiteTree.TODOHELP', "<p>You can use this to keep track of work that needs to be done to the content of your site. To see all your pages with to do information, open the 'Site Reports' window on the left and select 'To Do'</p>")),
new TextareaField("ToDo", "", 10)
),
$tabDependent = new Tab('Dependent', $tabDependent = new Tab('Dependent',
$dependentNote, $dependentNote,
$dependentTable $dependentTable
@ -1930,7 +1923,6 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
$labels['HomepageForDomain'] = _t('SiteTree.HomepageForDomain', 'Hompage for this domain'); $labels['HomepageForDomain'] = _t('SiteTree.HomepageForDomain', 'Hompage for this domain');
$labels['CanViewType'] = _t('SiteTree.Viewers', 'Viewers Groups'); $labels['CanViewType'] = _t('SiteTree.Viewers', 'Viewers Groups');
$labels['CanEditType'] = _t('SiteTree.Editors', 'Editors Groups'); $labels['CanEditType'] = _t('SiteTree.Editors', 'Editors Groups');
$labels['ToDo'] = _t('SiteTree.ToDo', 'Todo Notes');
$labels['Comments'] = _t('SiteTree.Comments', 'Comments'); $labels['Comments'] = _t('SiteTree.Comments', 'Comments');
$labels['LinkChangeNote'] = _t ( $labels['LinkChangeNote'] = _t (
'SiteTree.LINKCHANGENOTE', 'Changing this page\'s link will also affect the links of all child pages.' 'SiteTree.LINKCHANGENOTE', 'Changing this page\'s link will also affect the links of all child pages.'

View File

@ -180,37 +180,6 @@ class SideReport_RecentlyEdited extends SS_Report {
} }
} }
/**
* @package cms
* @subpackage content
*/
class SideReport_ToDo extends SS_Report {
function title() {
return _t('SideReport.TODO',"Pages with To Do items");
}
function group() {
return _t('SideReport.ContentGroupTitle', "Content reports");
}
function sort() {
return 0;
}
function sourceRecords($params = null) {
return DataObject::get("SiteTree", "\"SiteTree\".\"ToDo\" IS NOT NULL AND \"SiteTree\".\"ToDo\" <> ''", "\"SiteTree\".\"LastEdited\" DESC");
}
function columns() {
return array(
"Title" => array(
"title" => "Title", // todo: use NestedTitle(2)
"link" => true,
),
"ToDo" => array(
"title" => "ToDo",
"newline" => true,
),
);
}
}
/** /**
* Content side-report listing pages with broken links * Content side-report listing pages with broken links
* *