Skip to content

Commit

Permalink
Save as Draft html
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshua Fett committed Aug 20, 2021
1 parent 9463d2e commit f10b63d
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 0 deletions.
Expand Up @@ -182,4 +182,10 @@ public function batch($model = null)

return parent::batch($model);
}


public function saveAsDraft()
{
echo "<script>alert('save as draft');</script>";
}
}
Expand Up @@ -266,6 +266,8 @@ protected function getListQuery()
$db->quoteName('a.metadesc'),
$db->quoteName('a.metadata'),
$db->quoteName('a.version'),
$db->quoteName('a.draft'),
$db->quoteName('a.shared')
]
)
)
Expand Down
Expand Up @@ -158,6 +158,7 @@ function (Toolbar $childBar) use ($user)
}

$childBar->save2new('article.save2new');
$childBar->saveAsDraft('article.saveAsDraft');
}
);

Expand Down Expand Up @@ -200,6 +201,7 @@ function (Toolbar $childBar) use ($checkedOut, $itemEditable, $canDo, $user)
if ($canDo->get('core.create'))
{
$childBar->save2copy('article.save2copy');
$childBar->saveAsDraft('article.saveAsDraft');
}
}
);
Expand Down Expand Up @@ -231,6 +233,9 @@ function (Toolbar $childBar) use ($checkedOut, $itemEditable, $canDo, $user)
}
}
}
$toolbar->standardButton('article.shareAsDraft', "Share as Draft")
->icon('icon-project-diagram')
->task('article.saveAsDraft');

$toolbar->divider();
$toolbar->help('JHELP_CONTENT_ARTICLE_MANAGER_EDIT');
Expand Down
2 changes: 2 additions & 0 deletions installation/sql/mysql/extensions.sql
Expand Up @@ -185,6 +185,8 @@ CREATE TABLE IF NOT EXISTS `#__content` (
`hits` int unsigned NOT NULL DEFAULT 0,
`metadata` text NOT NULL,
`featured` tinyint unsigned NOT NULL DEFAULT 0 COMMENT 'Set if article is featured.',
`draft` tinyint unsigned NOT NULL DEFAULT 0 COMMENT 'Set if article is drafted.',
`shared` tinyint unsigned NOT NULL DEFAULT 0 COMMENT 'Set if draft is shared.',
`language` char(7) NOT NULL COMMENT 'The language code for the article.',
`note` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
Expand Down

0 comments on commit f10b63d

Please sign in to comment.