Skip to content

Commit

Permalink
Item8219: use YUI tooltips to show descriptions Item8218: move skills…
Browse files Browse the repository at this point in the history
… descriptions into a topic, where they are more accessible

git-svn-id: http://svn.foswiki.org/trunk/SkillsPlugin@4513 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
CrawfordCurrie authored and CrawfordCurrie committed Jul 20, 2009
1 parent bd5c9b0 commit 3f3fb84
Show file tree
Hide file tree
Showing 12 changed files with 348 additions and 128 deletions.
5 changes: 5 additions & 0 deletions data/System/SkillsCreateNewCategory.txt
Expand Up @@ -36,6 +36,11 @@ Create a new category.
<div class="foswikiFormStep">
Name of new category: %BR% <input name="newcategory" type="text" class="twikiInputField" size="20" value="%URLPARAM{"createcategory"}%" />
</div>
<div class="foswikiFormStep">
<strong>Description</strong><br />
<textarea name="description" class="foswikiTextarea" cols=80 rows=5>
</textarea>
</div>
<div class="foswikiFormStep foswikiLast">
<input name="createcategory" type="submit" class="foswikiSubmit" value="%MAKETEXT{"Create"}%" />
<input type="hidden" name="topic" value="%WEB%.%TOPIC%" />
Expand Down
7 changes: 7 additions & 0 deletions data/System/SkillsCreateNewSkill.txt
Expand Up @@ -43,13 +43,20 @@ In category: %BR%
%SKILLS{action="showcategories" format="<option value='$category'>$category</option>" }%
</select>
</div>
<div class="foswikiFormStep">
<strong>Description</strong><br />
<textarea name="description" class="foswikiTextarea" cols=80 rows=5>
</textarea>
</div>
<div class="foswikiFormStep foswikiLast">
<input name="createskill" type="submit" class="foswikiSubmit" value="%MAKETEXT{"Create"}%" />
</div>
</div>
</form>
%ENDSECTION{"createskill"}%

%IF{"$ SKILLSPLUGIN_SKILLSTOPIC" then="Note: You can modify existing skills by manually editing the skills topic %SKILLSPLUGIN_SKILLSTOPIC%"}%

%STARTSECTION{"existingskills"}%
Existing skills:
%SKILLS{action="showskills" prefix=" * *$category:* " format="$skill" separator=", "}%
Expand Down
43 changes: 32 additions & 11 deletions data/System/SkillsPlugin.txt
Expand Up @@ -63,34 +63,55 @@ The Plugin handles a =%<nop>SKILLS{}%= variable that performs different actions.
| =prefix= | Prefix before each category. Tokens =$category=, =$n=. | none |
| =suffix= | Suffix after each category. Tokens =$category=, =$n=. | none |

---++ Plugin Settings
---

Plugin settings are stored as preferences variables in %LOCALSITEPREFS%.
* =%<nop>SKILLRATINGS{ ... }%= - shows a list of the skill levels, as set by %<nop>SKILLSPLUGIN_RATINGS% (see below). Parameters are:
* =format="..."= - set the format of each skill name, where "..." is a string that may contain the following placeholders:
* =$name= - the skill name. You can replace whitespace in the string by providing a replacement in brackets e.g =$name(&nbsp;)= will expand to the level name with all whitespace replaced by =&amp;nbsp=.
* =$value= - the numeric value of the skill level
* =$marker= - the selection marker
* Standard placeholders as described in FormatTokens
* =separator="$n"= - output list separator
* =selection="..."= - Entry to be selected in list (integer). If one of the skills matches this selection, then =$marker= in the =format= will be expanded.
* =marker="selected" - Text for =$marker= if the item matches =selection=
* Example: (if plugin is enabled)
=%<nop>SKILLRATINGS{"$name(+)=$value$marker" separator="; " selection="3" marker=" (selected)"}%= expands to %SKILLRATINGS{"$name(+)=$value$marker" separator="; " selection="3" marker=" (selected)"}%

* By default, anyone can add new skills/categories. To limit this to a list of people/groups, add the following to %LOCALSITEPREFS%:
* Set ALLOWADDSKILLS = Main.UnknownUser
---++ Plugin Settings

* You can override the default skill levels by setting the global
preference =SKILLSPLUGIN_RATINGS to a comma-separated list of
level names e.g.
* Set SKILLSPLUGIN_RATINGS = None,Child,Adolescent,Adult,Crusty
Plugin settings are stored as preferences variables in %LOCALSITEPREFS% (or in Web<nop>Preferences, or in individual topics).

* By default, the styles using in the plugins forms are found in the =style.css=, attached to this topic. To define your own style sheet, add the following to %LOCALSITEPREFS%:
* Set STYLEURL = %PUBURL%/%SYSTEMWEB%/SkillsPlugin/style.css
* By default, skills are taken from / added to an external file. You
can use a standard Foswiki topic instead, by defining the
=SKILLSPLUGIN_SKILLSTOPIC= preference to be a fully qualified topic
name e.g.
* =S<nop>et SKILLSPLUGIN_SKILLSTOPIC = My<nop>Web.My<nop>SkillSet=
Normal Foswiki protections on this topic are respected.

* You can override the default skill levels by setting the preference
=SKILLSPLUGIN_RATINGS= to a comma-separated list of level names e.g.
* =S<nop>et SKILLSPLUGIN_RATINGS = None,Child,Adolescent,Adult,Crusty=
The default is =None,Ancient Knowledge,Working Knowledge,Expert,Guru=
<!--
* Short description of plugin
* Set SHORTDESCRIPTION = Allows users to list their skills, which can then be searched
-->

---++ Installation Instructions

%$INSTALL_INSTRUCTIONS%

Next:
* If needed, customise the styles by creating a new style sheet and adding the setting above to %LOCALSITEPREFS%

* Start adding some categories and skills
* SkillsCreateNewCategory
* SkillsCreateNewSkill

IMPORTANT! If you used the ALLOWADDSKILLS preference with a prior version,
please note that the name of this preference has changed to
SKILLSPLUGIN_ALLOWADDSKILLS. This is to avoid possible conflicts with names
defined by other Foswiki extensions.

---++ Plugin Info

| Plugin Author: | Foswiki:Main.AndrewJones |
Expand Down

0 comments on commit 3f3fb84

Please sign in to comment.