Fixed a bug in the Event view where the link to the Calendar Search
was wrong. Added a new template variable, urlSearch to the Event view template. I added a new method to the Calendar to handle this, getUrlSearch.
This commit is contained in:
parent
1ed783b2c5
commit
3d5763269a
5 changed files with 35 additions and 1 deletions
|
|
@ -1303,6 +1303,7 @@ sub getTemplateVars {
|
|||
$var{"urlWeek"} = $self->getParent->getUrl("type=week;start=".$dtStart->toMysql);
|
||||
$var{"urlMonth"} = $self->getParent->getUrl("type=month;start=".$dtStart->toMysql);
|
||||
$var{"urlParent"} = $self->getParent->getUrl;
|
||||
$var{"urlSearch"} = $self->getParent->getSearchUrl;
|
||||
|
||||
|
||||
# Related links
|
||||
|
|
|
|||
|
|
@ -748,6 +748,21 @@ ENDSQL
|
|||
|
||||
|
||||
|
||||
####################################################################
|
||||
|
||||
=head2 getSearchUrl ( )
|
||||
|
||||
Convenience method to be shared with the Event.
|
||||
|
||||
=cut
|
||||
|
||||
sub getSearchUrl {
|
||||
my $self = shift;
|
||||
return $self->getUrl('func=search');
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
####################################################################
|
||||
|
||||
|
|
@ -918,7 +933,7 @@ sub view {
|
|||
$var->{"urlDay"} = $self->getUrl("type=day;start=".$params->{start});
|
||||
$var->{"urlWeek"} = $self->getUrl("type=week;start=".$params->{start});
|
||||
$var->{"urlMonth"} = $self->getUrl("type=month;start=".$params->{start});
|
||||
$var->{"urlSearch"} = $self->getUrl("func=search");
|
||||
$var->{"urlSearch"} = $self->getSearchUrl;
|
||||
$var->{"urlPrint"} = $self->getUrl("type=".$params->{type}.";start=".$params->{start}.";print=1");
|
||||
|
||||
# Parameters
|
||||
|
|
|
|||
|
|
@ -217,6 +217,12 @@ our $HELP = {
|
|||
{
|
||||
'name' => 'urlMonth',
|
||||
},
|
||||
{
|
||||
'name' => 'urlParent',
|
||||
},
|
||||
{
|
||||
'name' => 'urlSearch',
|
||||
},
|
||||
{
|
||||
'name' => 'relatedLinks',
|
||||
variables => [
|
||||
|
|
|
|||
|
|
@ -341,6 +341,16 @@ our $I18N = {
|
|||
lastUpdated => 1171043883,
|
||||
},
|
||||
|
||||
'urlParent' => {
|
||||
message => q|A URL the Calendar that contains this Event.|,
|
||||
lastUpdated => 1172693361,
|
||||
},
|
||||
|
||||
'urlSearch' => {
|
||||
message => q|A URL to the Search form for the Calendar that contains this Event.|,
|
||||
lastUpdated => 1172693363,
|
||||
},
|
||||
|
||||
'relatedLinks' => {
|
||||
message => q|This loop contains all links from this Event's set of related links.|,
|
||||
lastUpdated => 1171043883,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue