Make addListings in the Matrix use AdminConsole submenus for
actions, like all the other assets. Add a link back to the Matrix. Fixes bug #10778.
This commit is contained in:
parent
92815bb75d
commit
d0e9b083dc
2 changed files with 20 additions and 13 deletions
|
|
@ -1,4 +1,5 @@
|
||||||
7.7.18
|
7.7.18
|
||||||
|
- fixed #10778: Matrix navigation: list attributes
|
||||||
- fixed #10776: i18n AuthLDAP::7 description
|
- fixed #10776: i18n AuthLDAP::7 description
|
||||||
- fixed #10775: i18n AuthLDAP::6 description
|
- fixed #10775: i18n AuthLDAP::6 description
|
||||||
- fixed #10774: i18n Asset::Storyarchive tag asset url
|
- fixed #10774: i18n Asset::Storyarchive tag asset url
|
||||||
|
|
|
||||||
|
|
@ -1181,8 +1181,8 @@ sub www_getCompareFormData {
|
||||||
}
|
}
|
||||||
|
|
||||||
my @results;
|
my @results;
|
||||||
if($form->process("search")){
|
if($form->process("search")) {
|
||||||
if ($searchParamList){
|
if ($searchParamList) {
|
||||||
RESULT: foreach my $result (@{$self->getListings}) {
|
RESULT: foreach my $result (@{$self->getListings}) {
|
||||||
my $matrixListing_attributes = $session->db->buildHashRefOfHashRefs("
|
my $matrixListing_attributes = $session->db->buildHashRefOfHashRefs("
|
||||||
select value, fieldType, attributeId from Matrix_attribute
|
select value, fieldType, attributeId from Matrix_attribute
|
||||||
|
|
@ -1209,14 +1209,15 @@ sub www_getCompareFormData {
|
||||||
push @results, $result if $result->{checked} eq 'checked';
|
push @results, $result if $result->{checked} eq 'checked';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
else {
|
||||||
foreach my $result (@{$self->getListings}) {
|
foreach my $result (@{$self->getListings}) {
|
||||||
$result->{checked} = 'checked';
|
$result->{checked} = 'checked';
|
||||||
$result->{assetId} =~ s/-/_____/g;
|
$result->{assetId} =~ s/-/_____/g;
|
||||||
push @results, $result;
|
push @results, $result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else{
|
}
|
||||||
|
else {
|
||||||
foreach my $result (@{$self->getListings}) {
|
foreach my $result (@{$self->getListings}) {
|
||||||
$result->{assetId} =~ s/-/_____/g;
|
$result->{assetId} =~ s/-/_____/g;
|
||||||
if(WebGUI::Utility::isIn($result->{assetId},@listingIds)){
|
if(WebGUI::Utility::isIn($result->{assetId},@listingIds)){
|
||||||
|
|
@ -1356,19 +1357,24 @@ sub www_listAttributes {
|
||||||
|
|
||||||
return $session->privilege->insufficient() unless($self->canEdit);
|
return $session->privilege->insufficient() unless($self->canEdit);
|
||||||
|
|
||||||
my $i18n = WebGUI::International->new($session,'Asset_Matrix');
|
my $i18n = WebGUI::International->new($session,'Asset_Matrix');
|
||||||
my $output = "<br /><a href='".$self->getUrl("func=editAttribute;attributeId=new")."'>"
|
my $console = $self->getAdminConsole();
|
||||||
.$i18n->get('add attribute label')."</a><br /><br />";
|
|
||||||
|
|
||||||
my $attributes = $session->db->read("select attributeId, name from Matrix_attribute where assetId=? order by name"
|
my $attributes = $session->db->read("select attributeId, name from Matrix_attribute where assetId=? order by name"
|
||||||
,[$self->getId]);
|
,[$self->getId]);
|
||||||
|
my $output = '';
|
||||||
while (my $attribute = $attributes->hashRef) {
|
while (my $attribute = $attributes->hashRef) {
|
||||||
$output .= $session->icon->delete("func=deleteAttribute;attributeId=".$attribute->{attributeId}
|
$output .= $session->icon->delete(
|
||||||
, $self->getUrl,$i18n->get("delete attribute confirm message"))
|
"func=deleteAttribute;attributeId=".$attribute->{attributeId},
|
||||||
.$session->icon->edit("func=editAttribute;attributeId=".$attribute->{attributeId})
|
$self->getUrl,$i18n->get("delete attribute confirm message")
|
||||||
.' '.$attribute->{name}."<br />\n";
|
)
|
||||||
|
. $session->icon->edit("func=editAttribute;attributeId=".$attribute->{attributeId})
|
||||||
|
. ' '
|
||||||
|
. $attribute->{name}
|
||||||
|
."<br />\n";
|
||||||
}
|
}
|
||||||
return $self->getAdminConsole->render($output, $i18n->get('list attributes title'));
|
$console->addSubmenuItem($self->getUrl("func=editAttribute;attributeId=new"), $i18n->get('add attribute label'));
|
||||||
|
$console->addSubmenuItem($self->getUrl, $i18n->get('Return to Matrix'));
|
||||||
|
return $console->render($output, $i18n->get('list attributes title'));
|
||||||
}
|
}
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue