Make creating a Storage object with a short ID an error.
Add a test to check for that. Beginning of documentation for VersionTag.
This commit is contained in:
parent
e6ef875b51
commit
b02386064d
5 changed files with 83 additions and 6 deletions
15
lib/WebGUI/Help/VersionTag.pm
Normal file
15
lib/WebGUI/Help/VersionTag.pm
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
package WebGUI::Help::VersionTag;
|
||||
|
||||
our $HELP = {
|
||||
'versions manage' => {
|
||||
title => 'manage version tags',
|
||||
body => 'manage version tags body',
|
||||
fields => [
|
||||
],
|
||||
related => [
|
||||
],
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
1; ##All perl modules must return true
|
||||
|
|
@ -337,7 +337,7 @@ sub www_manageVersions {
|
|||
return $session->privilege->insufficient() unless ($session->user->isInGroup(12));
|
||||
my $ac = WebGUI::AdminConsole->new($session,"versions");
|
||||
my $i18n = WebGUI::International->new($session,"VersionTag");
|
||||
$ac->setHelp("versions manage");
|
||||
$ac->setHelp("versions manage", "VersionTag");
|
||||
$ac->addSubmenuItem($session->url->page('op=editVersionTag'), $i18n->get("add a version tag"));
|
||||
$ac->addSubmenuItem($session->url->page('op=managePendingVersions'), $i18n->get("manage pending versions")) if ($session->user->isInGroup(3));
|
||||
$ac->addSubmenuItem($session->url->page('op=manageCommittedVersions'), $i18n->get("manage committed versions")) if ($session->user->isInGroup(3));
|
||||
|
|
|
|||
|
|
@ -432,10 +432,17 @@ sub get {
|
|||
my $session = shift;
|
||||
my $id = shift;
|
||||
return undef unless $id;
|
||||
$id =~ m/^(.{2})(.{2})/;
|
||||
my $self = {_session=>$session, _id => $id, _part1 => $1, _part2 => $2, _errors => []};
|
||||
my $self;
|
||||
$self = {_session=>$session, _id => $id, _errors => []};
|
||||
bless $self, ref($class)||$class;
|
||||
$self->_makePath unless (-e $self->getPath); # create the folder in case it got deleted somehow
|
||||
if (my ($part1, $part2) = $id =~ m/^(.{2})(.{2})/) {
|
||||
$self->{_part1} = $part1;
|
||||
$self->{_part2} = $part2;
|
||||
$self->_makePath unless (-e $self->getPath); # create the folder in case it got deleted somehow
|
||||
}
|
||||
else {
|
||||
$self->_addError("Illegal ID: $id");
|
||||
}
|
||||
return $self;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -310,6 +310,23 @@ our $I18N = {
|
|||
context => q|The prompt for purging a revision from the manage revisios screen.|
|
||||
},
|
||||
|
||||
'manage version tags' => {
|
||||
message => q|Manage Version Tags|,
|
||||
lastUpdated => 1148359381,
|
||||
},
|
||||
|
||||
'manage version tags body' => {
|
||||
message => q|<p>This screen lists all uncommitted version tags in WebGUI, their status and an interface to manage them. If you are currently working under a tag, the name of the tag is prominently displayed for reference.</p>
|
||||
<p>The icons next to each tag allow each tag to be edited, or deleted. The name of the tag is a link to manage work done in the tag. The date the tag was created and the username of the user who created are shown as well. A link is provided so that the tag can be committed</p>
|
||||
<p>Links are also provided to set any version tag that is not your version tag your new current working version tag. From that point forward, all work will be done under the new tag.</p>|,
|
||||
lastUpdated => 1148359381,
|
||||
},
|
||||
|
||||
'topicName' => {
|
||||
message => q|Version Control|,
|
||||
lastUpdated => 1148360141,
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue