Add missing edit story and delete story icons in the view method of the Story Archive.
This commit is contained in:
parent
76b9f01e77
commit
6844ef4559
5 changed files with 32 additions and 3 deletions
|
|
@ -6,6 +6,7 @@
|
|||
- fixed #10361: Shortcuts duplicate extra header tags
|
||||
- fixed #10356: SQL report is cached too long
|
||||
- fixed #10313: extra head elements appear twice
|
||||
- fixed missing edit story and delete story icons in the Story Manager.
|
||||
|
||||
7.7.8
|
||||
- fixed: Basic Auth doesn't work if password contains colon (Arjan Widlak,
|
||||
|
|
|
|||
BIN
docs/upgrades/packages-7.7.9/root_import_storymanager.wgpkg
Normal file
BIN
docs/upgrades/packages-7.7.9/root_import_storymanager.wgpkg
Normal file
Binary file not shown.
|
|
@ -481,7 +481,8 @@ sub viewTemplateVariables {
|
|||
my $query = $session->form->get('query');
|
||||
my $exporting = $session->scratch->get('isExporting');
|
||||
my $p;
|
||||
my $var = $self->get();
|
||||
my $i18n = WebGUI::International->new($session);
|
||||
my $var = $self->get();
|
||||
if ($mode eq 'keyword') {
|
||||
$var->{mode} = 'keyword';
|
||||
my $wordList = WebGUI::Keyword::string2list($keywords);
|
||||
|
|
@ -524,9 +525,15 @@ sub viewTemplateVariables {
|
|||
##Pagination variables aren't useful in export mode
|
||||
$p->appendTemplateVars($var);
|
||||
}
|
||||
|
||||
$var->{date_loop} = [];
|
||||
my $lastStoryDate = '';
|
||||
my $datePointer = undef;
|
||||
my $datePointer = undef;
|
||||
|
||||
my $icon = $session->icon;
|
||||
my $userUiLevel = $session->user->profileField("uiLevel");
|
||||
my $uiLevels = $session->config->get('assetToolbarUiLevel');
|
||||
|
||||
##Only build objects for the assets that we need
|
||||
STORY: foreach my $storyId (@{ $storyIds }) {
|
||||
my $story = WebGUI::Asset->new($session, $storyId->{assetId}, $storyId->{className}, $storyId->{revisionDate});
|
||||
|
|
@ -541,11 +548,18 @@ sub viewTemplateVariables {
|
|||
$datePointer->{story_loop} = [];
|
||||
$lastStoryDate = $storyDate;
|
||||
}
|
||||
push @{$datePointer->{story_loop}}, {
|
||||
my $storyVars = {
|
||||
url => $story->getUrl,
|
||||
title => $story->getTitle,
|
||||
creationDate => $creationDate,
|
||||
};
|
||||
if ($userUiLevel >= $uiLevels->{delete}) {
|
||||
$storyVars->{deleteIcon} = $icon->delete('func=delete', $story->get('url'), $i18n->get(43));
|
||||
}
|
||||
if ($userUiLevel >= $uiLevels->{edit}) {
|
||||
$storyVars->{editIcon} = $icon->edit('func=edit', $story->get('url'));
|
||||
}
|
||||
push @{$datePointer->{story_loop}}, $storyVars;
|
||||
}
|
||||
|
||||
$var->{canPostStories} = $self->canPostStories;
|
||||
|
|
|
|||
|
|
@ -30,6 +30,8 @@ our $HELP = {
|
|||
{ 'name' => 'url' },
|
||||
{ 'name' => 'title' },
|
||||
{ 'name' => 'creationDate' },
|
||||
{ 'name' => 'deleteIcon' },
|
||||
{ 'name' => 'editIcon' },
|
||||
],
|
||||
},
|
||||
]
|
||||
|
|
|
|||
|
|
@ -213,6 +213,18 @@ our $I18N = {
|
|||
lastUpdated => 0,
|
||||
},
|
||||
|
||||
'deleteIcon' => {
|
||||
message => q|An icon to delete this story.|,
|
||||
context => q|Template variable.|,
|
||||
lastUpdated => 0,
|
||||
},
|
||||
|
||||
'editIcon' => {
|
||||
message => q|An icon to edit this story.|,
|
||||
context => q|Template variable.|,
|
||||
lastUpdated => 0,
|
||||
},
|
||||
|
||||
'add a story' => {
|
||||
message => q|Add a Story.|,
|
||||
context => q|label for the URL to add a story to the archive.|,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue