Skip to content

Commit

Permalink
Item11145: Add topic restriction to template search
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.foswiki.org/branches/Release01x01@12618 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
GeorgeClark authored and GeorgeClark committed Sep 23, 2011
1 parent 5077027 commit a573e5b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/data/System/WebCreateNewTopicTemplate.txt
Expand Up @@ -59,7 +59,7 @@

%TMPL:DEF{"topicparent"}%%IF{"defined pickparent" then="<select name='topicparent' size='10' class='foswikiSelect'>$percentTOPICLIST{$quot<option $marker value='$name'>$name</option>$quot marker=$quotselected=\$quotselected\$quot$quot separator=$quot$quot selection=$quot$percentURLPARAM{ $quottopicparent$quot default=$quot%MAKETEXT{"(no parent, orphaned topic)"}%$quot }$percent$quot}$percent<option value=$quot$quot>$percentMAKETEXT{$quot(no parent, orphaned topic)$quot}$percent</option></select>" else="<input type='text' size='40' name='topicparent' class='foswikiInputField' value='%URLPARAM{topicparent}%' />&nbsp;<span class='foswikiUnvisited'><a id='pickparent' href='$percentSCRIPTURLPATH{view}$percent/$percentBASEWEB$percent/$percentBASETOPIC$percent?pickparent=1;$percentQUERYSTRING$percent;#NewTopic'>%MAKETEXT{"Pick from a list"}%</a></span>"}%%TMPL:END%

%TMPL:DEF{"topictemplate"}%<select name="templatetopic" class="foswikiSelect">%IF{"'%URLPARAM{"templatetopic"}%'" then='<option selected="selected">%URLPARAM{"templatetopic"}%</option>'}%<option value="">%MAKETEXT{"Default template"}%</option>%SEARCH{"name~'*Template'" scope="topic" web="%BASEWEB%" excludetopic="*EditTemplate,*WebCreateNewTopicTemplate,*ViewTemplate" type="query" nonoise="on" format="<option value=\"$web.$topic\">$topic</option>"}%</select>%SEARCH{"name~'*Template'" scope="topic" web="%BASEWEB%" limit="1" excludetopic="WebTopicEditTemplate,*WebCreateNewTopicTemplate,*ViewTemplate" type="query" nonoise="on" format=" <span class='foswikiUnvisited'><a id='viewtemplates' href='%SCRIPTURL{view}%/%SYSTEMWEB%/WebTemplateTopics?web=%BASEWEB%'>%MAKETEXT{"View templates"}%</a></span>"}% %TMPL:END%
%TMPL:DEF{"topictemplate"}%<select name="templatetopic" class="foswikiSelect">%IF{"'%URLPARAM{"templatetopic"}%'" then='<option selected="selected">%URLPARAM{"templatetopic"}%</option>'}%<option value="">%MAKETEXT{"Default template"}%</option>%SEARCH{"name~'*Template'" scope="topic" topic="*Template" web="%BASEWEB%" excludetopic="*EditTemplate,*WebCreateNewTopicTemplate,*ViewTemplate" type="query" nonoise="on" format="<option value=\"$web.$topic\">$topic</option>"}%</select>%SEARCH{"name~'*Template'" scope="topic" topic="*Template" web="%BASEWEB%" limit="1" excludetopic="WebTopicEditTemplate,*WebCreateNewTopicTemplate,*ViewTemplate" type="query" nonoise="on" format=" <span class='foswikiUnvisited'><a id='viewtemplates' href='%SCRIPTURL{view}%/%SYSTEMWEB%/WebTemplateTopics?web=%BASEWEB%'>%MAKETEXT{"View templates"}%</a></span>"}% %TMPL:END%

%TMPL:DEF{"submit"}%<input id="submit" type="submit" class="foswikiSubmit" value='%MAKETEXT{"Create this topic"}%' />%TMPL:END%

Expand Down
2 changes: 1 addition & 1 deletion core/data/System/WebTemplateTopics.txt
Expand Up @@ -5,4 +5,4 @@
*%MAKETEXT{"A topic template defines the initial content of a newly created topic."}%*

%MAKETEXT{"Available templates in [_1] Web:" args="%URLPARAM{"web" default="%WEB%"}%"}%
%SEARCH{"name~'*Template'" scope="topic" web="%URLPARAM{"web" default="%WEB%"}%" excludetopic="WebTopicEditTemplate,*WebCreateNewTopicTemplate,*ViewTemplate" type="query" nosearch="on" nonoise="on" format=" * [[$web.$topic][$topic]]"}%
%SEARCH{"name~'*Template'" scope="topic" topic="*Template" web="%URLPARAM{"web" default="%WEB%"}%" excludetopic="WebTopicEditTemplate,*WebCreateNewTopicTemplate,*ViewTemplate" type="query" nosearch="on" nonoise="on" format=" * [[$web.$topic][$topic]]"}%

0 comments on commit a573e5b

Please sign in to comment.