Skip to content

Commit

Permalink
Item13354: De-clutter some default pages
Browse files Browse the repository at this point in the history
 - Statistics link should not be shown at all if statistics are not
   available.
 - WikiUsers link should not be shown if the topic doesn't exist
 - Don't link to Registraion page on Main/WebHome if registration is
   disabled.
  • Loading branch information
gac410 committed May 11, 2015
1 parent 6422464 commit 823b2d5
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
10 changes: 5 additions & 5 deletions PatternSkin/data/Main/WebLeftBarExample.txt
@@ -1,4 +1,4 @@
%META:TOPICINFO{author="ProjectContributor" date="1289333272" format="1.1" version="1"}%
%META:TOPICINFO{author="ProjectContributor" date="1431315343" format="1.1" version="1"}%
%META:TOPICPARENT{name="WebHome"}%
%INCLUDE{"%IF{"context can_login" then="%SYSTEMWEB%.WebLeftBarLogin" else="<nop>"}%" warn="off"}%

Expand All @@ -9,10 +9,10 @@
* [[%BASEWEB%.WebSearch][ %ICON{"searchtopic"}% %MAKETEXT{"Search"}%]]
* [[WebChanges][ %ICON{"changes"}% %MAKETEXT{"Changes"}%]]
* [[WebNotify][ %ICON{"notify"}% %MAKETEXT{"Notifications"}%]]
* [[WebRss][ %ICON{"feed"}% %MAKETEXT{"RSS Feed"}%]]
* %IF{"istopic '%STATISTICSTOPIC%'" else=" $percntICON{\"statistics\"}$percnt $percntMAKETEXT{\"Statistics\"}$percnt" then="[[$percntSTATISTICSTOPIC$percnt][ $percntICON{\"statistics\"}$percnt $percntMAKETEXT{\"Statistics\"}$percnt]]"}%
* [[WebPreferences][ %ICON{"wrench"}% %MAKETEXT{"Preferences"}%]]
* %IF{"istopic '%USERSWEB%.%WIKIUSERSTOPIC%'" else=" $percntICON{\"person\"}$percnt $percntMAKETEXT{\"Users\"}$percnt" then="[[$percntUSERSWEB$percnt.$percntWIKIUSERSTOPIC$percnt][ $percntICON{\"person\"}$percnt $percntMAKETEXT{\"Users\"}$percnt]]"}%
* [[WebRss][ %ICON{"feed"}% %MAKETEXT{"RSS Feed"}%]] %IF{"istopic '%STATISTICSTOPIC%'" then="
* [[$percntSTATISTICSTOPIC$percnt][ $percntICON{\"statistics\"}$percnt $percntMAKETEXT{\"Statistics\"}$percnt]]"}%
* [[WebPreferences][ %ICON{"wrench"}% %MAKETEXT{"Preferences"}%]] %IF{"istopic '%USERSWEB%.%WIKIUSERSTOPIC%'" then="
* [[$percntUSERSWEB$percnt.$percntWIKIUSERSTOPIC$percnt][ $percntICON{\"person\"}$percnt $percntMAKETEXT{\"Users\"}$percnt]]"}%
* [[%USERSWEB%.WikiGroups][ %ICON{"group"}% %MAKETEXT{"Groups"}%]]
%ENDSECTION{"topics"}%

Expand Down
6 changes: 3 additions & 3 deletions PatternSkin/data/System/WebLeftBarExample.txt
@@ -1,4 +1,4 @@
%META:TOPICINFO{author="ProjectContributor" date="1423445948" format="1.1" version="1"}%
%META:TOPICINFO{author="ProjectContributor" date="1431315343" format="1.1" version="1"}%
%META:TOPICPARENT{name="WebHome"}%
%INCLUDE{"%IF{"context can_login" then="%SYSTEMWEB%.WebLeftBarLogin" else="<nop>"}%" warn="off"}%

Expand All @@ -10,8 +10,8 @@
* [[%BASEWEB%.WebSearch][ %ICON{"searchtopic"}% %MAKETEXT{"Search"}%]]
* [[WebChanges][ %ICON{"changes"}% %MAKETEXT{"Changes"}%]]
* [[WebNotify][ %ICON{"notify"}% %MAKETEXT{"Notifications"}%]]
* [[WebRss][ %ICON{"feed"}% %MAKETEXT{"RSS Feed"}%]]
* %IF{"istopic '%STATISTICSTOPIC%'" else=" $percntICON{\"statistics\"}$percnt $percntMAKETEXT{\"Statistics\"}$percnt" then="[[$percntSTATISTICSTOPIC$percnt][ $percntICON{\"statistics\"}$percnt $percntMAKETEXT{\"Statistics\"}$percnt]]"}%
* [[WebRss][ %ICON{"feed"}% %MAKETEXT{"RSS Feed"}%]] %IF{"istopic '%STATISTICSTOPIC%'" then="
* [[$percntSTATISTICSTOPIC$percnt][ $percntICON{\"statistics\"}$percnt $percntMAKETEXT{\"Statistics\"}$percnt]]"}%
* [[WebPreferences][ %ICON{"wrench"}% %MAKETEXT{"Preferences"}%]]

* <b>%MAKETEXT{"User Reference"}%</b>
Expand Down
8 changes: 4 additions & 4 deletions core/data/Main/WebHome.txt
@@ -1,4 +1,4 @@
%META:TOPICINFO{author="ProjectContributor" date="1421599902" format="1.1" version="1"}%
%META:TOPICINFO{author="ProjectContributor" date="1431315343" format="1.1" version="1"}%
---+!! Welcome to the <nop>%USERSWEB% web
Congratulations, you have finished installing Foswiki.

Expand All @@ -10,9 +10,9 @@ and [[%LOCALSITEPREFS%]]). Replace this text with a description of your new
%IF{"defined WIKITOOLNAME" then="<nop>%WIKITOOLNAME%" else="Foswiki"}% site.

---++ <nop>%WEB% Web Utilities
* [[%SYSTEMWEB%.WelcomeGuest][WelcomeGuest]] - for first time visitors
* [[%SYSTEMWEB%.UserRegistration][Registration]] - become a <nop>%WIKITOOLNAME% user
* [[%WIKIUSERSTOPIC%]] - list of users of this <nop>%WIKITOOLNAME% site
* [[%SYSTEMWEB%.WelcomeGuest][WelcomeGuest]] - for first time visitors %IF{"context registration_enabled" then="
* [[%SYSTEMWEB%.UserRegistration][Registration]] - become a <nop>%WIKITOOLNAME% user"}% %IF{"istopic '%WIKIUSERSTOPIC%'" then="
* [[%WIKIUSERSTOPIC%]] - list of users of this <nop>%WIKITOOLNAME% site"}%
* [[WikiGroups]] - list of groups used for access control
* [[WebTopicList]] - all topics in alphabetical order
* [[WebChanges]] - recent topic changes in this web
Expand Down

0 comments on commit 823b2d5

Please sign in to comment.