Changeset 14759
- Timestamp:
- 05/07/12 11:33:39 (14 months ago)
- Location:
- trunk/WikiWorkbenchContrib/lib/Foswiki
- Files:
-
- 2 edited
-
Contrib/WikiWorkbenchContrib/build.pl (modified) (1 diff)
-
Form/Wikiapp.pm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/WikiWorkbenchContrib/lib/Foswiki/Contrib/WikiWorkbenchContrib/build.pl
r14680 r14759 2 2 3 3 BEGIN { 4 foreach my $pc ( split( /:/, $ENV{FOSWIKI_LIBS} )) {5 unshift @INC, $pc;6 }4 foreach my $pc (split(/:/, $ENV{FOSWIKI_LIBS})) { 5 unshift @INC, $pc; 6 } 7 7 } 8 8 9 9 use Foswiki::Contrib::Build; 10 10 $build = new Foswiki::Contrib::Build('WikiWorkbenchContrib'); 11 $build->build( $build->{target});11 $build->build($build->{target}); 12 12 -
trunk/WikiWorkbenchContrib/lib/Foswiki/Form/Wikiapp.pm
r14686 r14759 10 10 11 11 sub getOptions { 12 my $this = shift;12 my $this = shift; 13 13 14 my $vals = $this->{_options};15 return $vals if $vals;14 my $vals = $this->{_options}; 15 return $vals if $vals; 16 16 17 require Foswiki::WebFilter;18 my $f= new Foswiki::WebFilter('allowed');19 my @apps = ();17 require Foswiki::WebFilter; 18 my $f = new Foswiki::WebFilter('allowed'); 19 my @apps = (); 20 20 21 foreach my $app ( $Foswiki::Plugins::SESSION->deepWebList($f)) {22 next unless $app =~ /^$APPLICATIONS/;23 $app =~ s/\//./g;24 $app =~ s/.*\.(.+?)$/$1/;21 foreach my $app ($Foswiki::Plugins::SESSION->deepWebList($f)) { 22 next unless $app =~ /^$APPLICATIONS/; 23 $app =~ s/\//./g; 24 $app =~ s/.*\.(.+?)$/$1/; 25 25 26 $app = 'WikiWorkbench' if $app eq $APPLICATIONS;27 push @apps, $app;28 }26 $app = 'WikiWorkbench' if $app eq $APPLICATIONS; 27 push @apps, $app; 28 } 29 29 30 @apps = sort @apps;31 unshift @apps, 'none';30 @apps = sort @apps; 31 unshift @apps, 'none'; 32 32 33 $this->{_options} = \@apps;33 $this->{_options} = \@apps; 34 34 35 return $this->{_options};35 return $this->{_options}; 36 36 } 37 37 38 38 sub renderForDisplay { 39 my ( $this, $format, $value, $attrs) = @_;39 my ($this, $format, $value, $attrs) = @_; 40 40 41 unless ( $value eq 'none' ) {42 my $label = $value;43 41 44 if ( $value eq 'WikiWorkbench' ) { 45 $value = $APPLICATIONS; 46 } 47 else { 48 $value = $APPLICATIONS . '.' . $value; 49 } 42 unless ($value eq 'none') { 43 my $label = $value; 50 44 51 $value = 52 '<a href="%SCRIPTURLPATH{"view"}%/' 53 . $value . '/' 54 . $Foswiki::cfg{HomeTopicName} . '">' 55 . $label . '</a>'; 45 if ($value eq 'WikiWorkbench') { 46 $value = $APPLICATIONS; 47 } else { 48 $value = $APPLICATIONS . '.' . $value; 56 49 } 57 50 58 return $this->SUPER::renderForDisplay( $format, $value, $attrs ); 51 $value = '<a href="%SCRIPTURLPATH{"view"}%/' . $value . '/' . $Foswiki::cfg{HomeTopicName} . '">' . $label . '</a>'; 52 } 53 54 return $this->SUPER::renderForDisplay($format, $value, $attrs); 59 55 } 60 56
Note: See TracChangeset
for help on using the changeset viewer.
