a bunch of bug fixes and ease of use modifications for workflow/versioning

This commit is contained in:
JT Smith 2006-03-20 21:07:26 +00:00
parent 00a1db29a1
commit 3931d8dcd2
8 changed files with 19 additions and 14 deletions

View file

@ -154,7 +154,7 @@ sub getAdminFunction {
},
"versions"=>{
title=>{
id=>"content versioning",
id=>"version tags",
namespace=>"VersionTag"
},
icon=>"versionTags.gif",

View file

@ -116,7 +116,7 @@ sub process {
}
if (scalar(@tags)) {
push(@adminbar, {
label => $i18n->get("version tags"),
label => $i18n->get("version tags","VersionTag"),
name => "versions",
items => \@tags
});

View file

@ -280,7 +280,7 @@ sub www_manageVersions {
$ac->setHelp("versions manage");
$ac->addSubmenuItem($session->url->page('op=editVersionTag'), $i18n->get("add a version tag"));
$ac->addSubmenuItem($session->url->page('op=manageCommittedVersions'), $i18n->get("manage committed versions")) if ($session->user->isInGroup(3));
my ($tag) = $session->db->quickArray("select name from assetVersionTag where tagId=?",[$session->scratch->get("versionTag")]);
my ($tag,$workingTagId) = $session->db->quickArray("select name,tagId from assetVersionTag where tagId=?",[$session->scratch->get("versionTag")]);
$tag ||= "None";
my $rollback = $i18n->get("rollback");
my $commit = $i18n->get("commit");
@ -301,8 +301,11 @@ sub www_manageVersions {
<td><a href="'.$session->url->page("op=manageRevisionsInTag;tagId=".$id).'">'.$name.'</a></td>
<td>'.$session->datetime->epochToHuman($date).'</td>
<td>'.$u->username.'</td>
<td>
<a href="'.$session->url->page("op=setWorkingVersionTag;tagId=".$id).'">'.$setTag.'</a> |
<td>';
unless ($workingTagId eq $id) {
$output .= '<a href="'.$session->url->page("op=setWorkingVersionTag;tagId=".$id).'">'.$setTag.'</a> | ';
}
$output .='
<a href="'.$session->url->page("op=commitVersionTag;tagId=".$id).'" onclick="return confirm(\''.$commitPrompt.'\');">'.$commit.'</a></td></tr>';
}
$sth->finish;
@ -381,7 +384,7 @@ sub www_manageRevisionsInTag {
my $asset = WebGUI::Asset->new($session,$id,$class,$date);
$output .= '<tr><td>'
.$session->icon->delete("func=purgeRevision;proceed=manageRevisionsInTag;tagId=".$tag->getId.";revisionDate=".$date,$asset->get("url"),$i18n->get("purge revision prompt"))
.$session->icon->view("func=viewRevision;revisionDate=".$date)
.$session->icon->view("func=viewRevision;revisionDate=".$date, $asset->get("url"))
.'</td>
<td>'.$asset->getTitle.'</td>
<td><img src="'.$asset->getIcon(1).'" alt="'.$asset->getName.'" />'.$asset->getName.'</td>

View file

@ -158,7 +158,7 @@ sub www_editWorkflow {
label=>$i18n->get("title"),
hoverHelp=>$i18n->get("title help")
);
$f->text(
$f->textarea(
name=>"description",
value=>$workflow->get("description"),
label=>$i18n->get("description"),

View file

@ -361,7 +361,9 @@ sub processPropertiesFromFormPost {
}
}
$data{title} = $fullDefinition->[0]{name} if ($data{title} eq "" || lc($data{title}) eq "untitled");
$self->set(\%data);
foreach my $key (keys %data) {
$self->set($key, $data{$key});
}
}
#-------------------------------------------------------------------

View file

@ -73,11 +73,6 @@ The URL of an icon to associate with this item.
lastUpdated => 1031514049
},
'version tags' => {
message => q|Version Tags|,
lastUpdated => 0
},
'12' => {
message => q|Turn admin off.|,
lastUpdated => 1031514049

View file

@ -1,6 +1,11 @@
package WebGUI::i18n::English::VersionTag;
our $I18N = {
'version tags' => {
message => q|Version Tags|,
lastUpdated => 0
},
'commit accepted' => {
message => q|Your tag has been submitted for approval and commit. It may take some time before it appears live on the site. Where would you like to go next?|,
lastUpdated => 0,

View file

@ -26,7 +26,7 @@ our $I18N = {
},
'is serial help' => {
message => q|If yes is selected then only one instance of this workflow will be allowed to be created at one time. Generally speaking this would be a bad idea for approval workflows, but is probably a good idea for workflows the download emails from a remote server, to avoid getting duplicates.|,
message => q|If yes is selected then only one instance of this workflow will be allowed to be created at one time. Generally speaking this would be a bad idea for approval workflows, but is probably a good idea for workflows that download emails from a remote server, to avoid getting duplicates.|,
context => q|the hover help for the is serial field|,
lastUpdated => 0,
},