Skip to content

Commit

Permalink
Item12865: improved display of revision info
Browse files Browse the repository at this point in the history
also:
- added back Clear button to category editor
- made list of buttons on category editor configurable



git-svn-id: http://svn.foswiki.org/trunk/ClassificationPlugin@17550 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
MichaelDaum authored and MichaelDaum committed Apr 23, 2014
1 parent 98ed69e commit 996e60d
Show file tree
Hide file tree
Showing 12 changed files with 60 additions and 27 deletions.
Expand Up @@ -22,15 +22,15 @@ a summary for an object listed within the Category topic.
<div class='foswikiTopicInfo'>
<span class='clsAuthorDateInfo'>
<!-- -->$formatTime(info.date)
<span class='natRevisionSep'>&#124;</span>
<span class='foswikiRevisionSep'>&#124;</span>
<nop>$percntGETTOPICTITLE{\"
$percntUSERINFO{\"$expand(info.author)\"
format=\"$wikiusername\"
}$percnt\"
}$percnt
</span>
$percntCATINFO{\"$web.$topic\"
header=\" <span class='natRevisionSep'>&#124;</span> <span class='clsCatInfo'>\"
header=\" <span class='foswikiRevisionSep'>&#124;</span> <span class='clsCatInfo'>\"
separator=\"&#44; \"
footer=\"</span>\"
}$percnt<!-- -->
Expand Down
3 changes: 2 additions & 1 deletion data/Applications/ClassificationApp/Category.txt
@@ -1,4 +1,4 @@
%META:TOPICINFO{author="ProjectContributor" comment="reprev" date="1390903057" format="1.1" reprev="20" version="21"}%
%META:TOPICINFO{author="micha" comment="reprev" date="1397729650" format="1.1" reprev="20" version="22"}%
%META:TOPICPARENT{name="TopicType"}%
%TOC%
%DBCALL{"Applications.RenderTopicInstaller"
Expand Down Expand Up @@ -33,6 +33,7 @@ See also: See [[CategorizedTopic]], [[ClassifiedTopic]], [[TaggedTopic]], [[Cate
%DBCALL{"Applications.ClassificationApp.RenderCategoryBrowser"
THEWEB="%URLPARAM{"web" default="%BASEWEB%"}%"
MODE="edit"
BUTTONS="filter, refresh"
}%<!-- -->%STOPINCLUDE%

---++ %TOPIC% form
Expand Down
Expand Up @@ -27,19 +27,19 @@ a summary for an object of type ClassifiedTopic.
<div class='foswikiTopicInfo'>
<span class='clsAuthorDateInfo'>
<!-- -->$formatTime(info.date)
<span class='natRevisionSep'>&#124;</span>
<span class='foswikiRevisionSep'>&#124;</span>
<nop>$percntGETTOPICTITLE{\"
$percntUSERINFO{\"$expand(info.author)\"
format=\"$wikiusername\"
}$percnt\"
}$percnt
</span>
$percntCATINFO{\"$web.$topic\"
header=\" <span class='natRevisionSep'>&#124;</span> <span class='clsCatInfo'>\"
header=\" <span class='foswikiRevisionSep'>&#124;</span> <span class='clsCatInfo'>\"
separator=\"&#44; \"
footer=\"</span>\"
}$percnt$percntTAGINFO{\"$web.$topic\"
header=\" <span class='natRevisionSep'>&#124;</span> <span class='clsTagInfo'>\"
header=\" <span class='foswikiRevisionSep'>&#124;</span> <span class='clsTagInfo'>\"
separator=\"&#44; \"
limit=\"5\"
footer=\"</span>\"
Expand Down
@@ -1,4 +1,4 @@
%META:TOPICINFO{author="ProjectContributor" comment="reprev" date="1390384358" format="1.1" reprev="16" version="16"}%
%META:TOPICINFO{author="micha" comment="reprev" date="1398188320" format="1.1" reprev="17" version="17"}%
%META:TOPICPARENT{name="TopicView"}%
%{<verbatim class="tml">}%
%TMPL:INCLUDE{"Applications.WikiTopicView"}%
Expand Down
27 changes: 18 additions & 9 deletions data/Applications/ClassificationApp/RenderCategoryBrowser.txt
@@ -1,4 +1,4 @@
%META:TOPICINFO{author="ProjectContributor" comment="reprev" date="1393259686" format="1.1" reprev="13" version="14"}%
%META:TOPICINFO{author="micha" comment="reprev" date="1397729628" format="1.1" reprev="15" version="15"}%
%META:TOPICPARENT{name="TopicFunction"}%
%TOC{depth="2"}%

Expand All @@ -14,7 +14,7 @@
* =edit=: allows to modify the hierarchy
* =select=: select one or more categories; specify the name of the formfield to be used in the NAME parameter
* =browse=: navigate among categories
* BUTTONS: =on=, =off= - toggle the display of the buttons, defaults to =on=
* BUTTONS: =on=, =off= - toggle the display of the buttons, defaults to =on=; you may also switch on individual buttons using a comma separated lists of ids =filter=, =refresh=, =undo= and/or =clear=

%ENDSECTION{name="documentation" type="section"}%

Expand All @@ -25,8 +25,8 @@
%IF{"'%MODE%'='select'"
then="<input type='hidden' name='%NAME{default="Category"}%' value='%VALUE{default=""}%' />"
else="<!-- -->"
}%%IF{"'%BUTTONS{default="on"}%'='on'"
then="$percntDBCALL{\"%WEB%.%TOPIC%\" section=\"buttons\"}$percnt"
}%%IF{"'%BUTTONS{default="on"}%'!='off'"
then="$percntDBCALL{\"%WEB%.%TOPIC%\" section=\"buttons\" buttons=\"%BUTTONS{default="on"}%\"}$percnt"
else="<!-- -->"
}%
<div class="jqHierarchyContainer jqUITooltip" data-theme='default' data-position="right" data-arrow="true"></div>
Expand All @@ -48,10 +48,19 @@
<verbatim class="tml">
%STARTSECTION{"buttons"}%<div class="jqHierarchyButtons jqUITooltip" data-theme="info" data-position="top" data-arrow="true">
<input type="text" size="28" class="foswikiInputField jqHierarchySearchField" style="display:none" />
%BUTTON{"%MAKETEXT{"Filter"}%" icon="find" class="simple jqHierarchySearchButton" title="%MAKETEXT{"Search for matching categories"}%"}%
%IF{"'%USERNAME%' ingroup 'AdminGroup'"
%IF{"'%buttons%'=~'\bfilter\b' or '%buttons%'='on'"
then="%BUTTON{"%MAKETEXT{"Filter"}%" icon="find" class="simple jqHierarchySearchButton" title="%MAKETEXT{"Search for matching categories"}%"}%"
}%<!-- -->
%IF{"'%USERNAME%' ingroup 'AdminGroup' and ('%buttons%'=~'\brefresh\b' or '%buttons%'='on')"
then="%BUTTON{"%MAKETEXT{"Refresh"}%" icon="arrow_refresh" class="jqHierarchyRefreshButton simple" title="%MAKETEXT{"Refresh hierarchy cache on the backend"}%"}%"
}%%CLEAR%
}%<!-- -->
%IF{"'%buttons%'=~'\bclear\b' or '%buttons%'='on'"
then="%BUTTON{"%MAKETEXT{"Clear"}%" icon="application" class="simple jqHierarchyClearButton" title="%MAKETEXT{"Empty the selection"}%""}%"
}%<!-- -->
%IF{"'%buttons%'=~'\bundo\b' or '%buttons%'='on'"
then="%BUTTON{"%MAKETEXT{"Undo"}%" icon="arrow_refresh" class="simple jqHierarchyResetButton" title="%MAKETEXT{"Reset the selection"}%""}%"
}%<!-- -->
%CLEAR%
</div>%ENDSECTION{"buttons"}%
</verbatim>

Expand All @@ -60,10 +69,10 @@
%DBCALL{"%TOPIC%" MODE="select"}%

---+++ browse
%DBCALL{"%TOPIC%" MODE="browse"}%
%DBCALL{"%TOPIC%" MODE="browse" BUTTONS="off"}%

---+++ edit
%DBCALL{"%TOPIC%" MODE="edit"}%
%DBCALL{"%TOPIC%" MODE="edit" BUTTONS="filter, refresh"}%

%DBCALL{"Applications.RenderFunctionCallers"}%

Expand Down
Expand Up @@ -19,12 +19,12 @@ showing its category and tagging info in the top.
%DBCALL{"Applications.RenderWikiTopicView" TITLE_EXTRA="%TITLE_EXTRA%"}%
%CATINFO{
"%BASEWEB%.%BASETOPIC%"
header="<span class='natRevisionSep'>&#124;</span> %JQICON{"fa-folder"}% "
header="<span class='foswikiRevisionSep'>&#124;</span> %JQICON{"fa-folder"}% "
format="<a href='$url' rel='tag' itemprop='keywords' class='$name'><noautolink>$title</noautolink></a>"
}% <!-- -->
%TAGINFO{
"%BASEWEB%.%BASETOPIC%"
header="<span class='natRevisionSep'>&#124;</span> %JQICON{"fa-tag"}% "
header="<span class='foswikiRevisionSep'>&#124;</span> %JQICON{"fa-tag"}% "
format="<a href='$url' rel='tag' itemprop='keywords' class='$class'><noautolink>$name</noautolink></a>"
limit="30"
footer="$percntIF{\"$count > $index\"
Expand Down
Expand Up @@ -22,15 +22,15 @@ a summary for an object listed within the TaggedTopic.
<div class='foswikiTopicInfo'>
<span class='clsAuthorDateInfo'>
<!-- -->$formatTime(info.date)
<span class='natRevisionSep'>&#124;</span>
<span class='foswikiRevisionSep'>&#124;</span>
<nop>$percntGETTOPICTITLE{\"
$percntUSERINFO{\"$expand(info.author)\"
format=\"$wikiusername\"
}$percnt\"
}$percnt
</span>
$percntTAGINFO{\"$web.$topic\"
header=\" <span class='natRevisionSep'>&#124;</span> <span class='clsTagInfo'>\"
header=\" <span class='foswikiRevisionSep'>&#124;</span> <span class='clsTagInfo'>\"
separator=\"&#44; \"
limit=\"5\"
footer=\"</span>\"
Expand Down
1 change: 1 addition & 0 deletions data/System/ClassificationPlugin.txt
Expand Up @@ -353,6 +353,7 @@ Note however that for now only the =%DBQUERY= language is supported (see [[Foswi
| Release: | %$RELEASE% |
| Version: | %$VERSION% |
| Change History: | <!-- versions below in reverse order -->&nbsp; |
| 23 Apr 2014: | improved topic info layout; added <nop>WebTagList; added back Clear button to category editor |
| 04 Apr 2014: | fixed compatibility with foswiki >= 1.2.0; flag rest handlers that don't require authentication |
| 18 Mar 2014: | fixed syntax error in jstree combponent (Foswiki:Main/DanieleGondoni);\
added =sort= paramteter to HIERARCHY macro;\
Expand Down
4 changes: 2 additions & 2 deletions lib/Foswiki/Plugins/ClassificationPlugin.pm
Expand Up @@ -17,8 +17,8 @@ use strict;
use warnings;
use Foswiki::Contrib::DBCacheContrib::Search ();

our $VERSION = '3.00';
our $RELEASE = '3.00';
our $VERSION = '3.01';
our $RELEASE = '3.01';
our $NO_PREFS_IN_TOPIC = 1;
our $SHORTDESCRIPTION = 'A topic classification plugin and application';

Expand Down
1 change: 0 additions & 1 deletion lib/Foswiki/Plugins/ClassificationPlugin/Access.pm
Expand Up @@ -18,7 +18,6 @@ use strict;
use Foswiki::Plugins::ClassificationPlugin;

use constant TRACE => 0; # toggle m

use constant NO_CATACL => 0;
use constant DENY_ALLOW => 1;
use constant ALLOW_DENY => 2;
Expand Down
2 changes: 2 additions & 0 deletions lib/Foswiki/Plugins/ClassificationPlugin/MANIFEST
Expand Up @@ -153,6 +153,7 @@ data/Applications/ClassificationApp/WebRss.txt 0644
data/Applications/ClassificationApp/WebSearchAdvanced.txt 0644
data/Applications/ClassificationApp/WebSearch.txt 0644
data/Applications/ClassificationApp/WebStatistics.txt 0644
data/Applications/ClassificationApp/WebTagList.txt 0644
data/Applications/ClassificationApp/WebTool.txt 0644
data/Applications/ClassificationApp/WebTopicEditTemplate.txt 0644
data/Applications/ClassificationApp/WebTopicList.txt 0644
Expand All @@ -176,6 +177,7 @@ data/_ClassificationTemplate/WebPreferences.txt 0644
data/_ClassificationTemplate/WebRss.txt 0644
data/_ClassificationTemplate/WebSearch.txt 0644
data/_ClassificationTemplate/WebStatistics.txt 0644
data/_ClassificationTemplate/WebTagList.txt 0644
data/_ClassificationTemplate/WebTopicEditTemplate.txt 0644
data/_ClassificationTemplate/WebTopicList.txt 0644
data/System/ClassificationPlugin.txt 0644
Expand Down
29 changes: 25 additions & 4 deletions pub/System/ClassificationPlugin/styles.uncompressed.css
Expand Up @@ -283,6 +283,10 @@ a:hover.tag_todo {
color:#fff !important;
}

.clsHilight {
background-color:#FFFFC0;
color:black;
}

/* pattern skin tweaks */
#patternMainContents h1 a,
Expand All @@ -293,8 +297,25 @@ a:hover.tag_todo {
#patternMainContents h6 a {
text-decoration:none !important;
}

.clsHilight {
background-color:#FFFFC0;
color:black;
#patternMainContents h1 .foswikiTopicSummary {
font-size: 65%;
line-height: 1.5;
color:#a1a1a1;
}
#patternMainContents .foswikiTopicInfo {
margin-bottom:2em;
}
#patternMainContents .foswikiTopicInfo h1 {
margin:0.5em 0;
border-bottom:1px solid #dfdfdf;
}
#patternMainContents .foswikiTopicInfo,
#patternMainContents .foswikiTopicInfo a {
color:#a1a1a1;
}
#patternMainContents .foswikiTopicInfo h1 a {
color:inherit;
}
.patternTop .patternRevInfo {
display:none;
}

0 comments on commit 996e60d

Please sign in to comment.