Watchlist Layout Application

Last modified by Ecaterina Moraru (Valica) on 2021/03/17 21:50

cogChanges the look and feel of your Watchlist Application
TypeXAR
Category
Developed by

Oana Florea, Ecaterina Moraru (Valica)

Rating
0 Votes
LicenseGNU Lesser General Public License 2.1
Compatibility

2.1

Installable with the Extension Manager

Description

This application changes the default look and feel for the WatchList Application:

  • The items in the watchlist are displayed using the livetable.
  • The Add to Watchlist action is using the autosuggest widget. 

autocomplete.png

  • If All Pages is selected, the Add to Watchlist action will add a watch for the entire space.

allpages.png

  • Add custom links for your page and toggle between Watch and Unwatch actions.

custom.png

The WatchList Layout Application allows you to change the look and feel for your Watchlist Application, but also to add custom Watch/Unwatch links to any of your pages.

To add a custom Watch/Unwatch link to your page, just use the code snippet below: 


#set($ok=$xwiki.jsx.use("XWiki.WatchListSheet"))
#set ($wdocs = $xwiki.watchlist.getWatchedElements())
<span id="wdoc-name" style="display:none">$doc.name</span>
<span id="wdoc-space" style="display:none">$doc.space</span>
#if(!$listtool.contains($wdocs, "$doc.wiki:$doc.fullName"))
 <a id="watch-link-icon" class="wlink-icon" href="#" title='$msg.get("xe.watchlist.watch")'><img src="/xwiki/resources/icons/silk/page_white_add.gif" style="border:0px;" alt="" /></a><a href="#" id="watch-link" class="wlink" title='$msg.get("xe.watchlist.watch")'>$msg.get("xe.watchlist.watch")</a>
#else
 <a class="watch-link-icon" class="" href="#" title='$msg.get("xe.watchlist.unwatch")'  ><img src="/xwiki/resources/icons/silk/page_white_delete.gif" style="border:0px;" alt="" /></a><a href="#" id="watch-link" title='$msg.get("xe.watchlist.unwatch")' >$msg.get("xe.watchlist.unwatch")</a>
#end

Prerequisites & Installation Instructions

We recommend using the Extension Manager to install this extension (Make sure that the text "Installable with the Extension Manager" is displayed at the top right location on this page to know if this extension can be installed with the Extension Manager). Note that installing Extensions when being offline is currently not supported and you'd need to use some complex manual method.

You can also use the following manual method, which is useful if this extension cannot be installed with the Extension Manager or if you're using an old version of XWiki that doesn't have the Extension Manager:

  1. Log in the wiki with a user having Administration rights
  2. Go to the Administration page and select the Import category
  3. Follow the on-screen instructions to upload the downloaded XAR
  4. Click on the uploaded XAR and follow the instructions
  5. You'll also need to install all dependent Extensions that are not already installed in your wiki

To use the WatchList Layout Application in your wiki, follow these steps:

  • Click on the "Administration" link at the top right corner
  • Step 1 : Import the application
    • Click on the "import" tab
    • Upload the WatchList.xar file
    • Click on its name once it can be seen in the list
    • Click on "Import" -> the application is now available on your wiki
  • Step 2 : Tell the wiki where to find the right languages resources
    • In the administration menu, click on "Programming"
    • Scroll in this menu until you see "Internationalization Document Bundles"
    • In that field, add the following text : "XWiki.WatchListTranslations"
    • Save the page.
  • Step 2 : Use the new layout in your wiki
    • Edit the wiki content for the XWiki.WatchListManager page
    • Replace the content with {{include document="XWiki.WatchListSheet" /}} while your page syntax is 2.0
    • Save the page and enjoy the new look and feel for your WatchList.

Release Notes

v1.1

The WatchList Layout Application allows you to change the look and feel for your Watchlist Application, but also to add custom Watch/Unwatch links to any of your pages.

To add a custom Watch/Unwatch link to your page, just use the code snippet below:

#set($ok=$xwiki.jsx.use("XWiki.WatchListSheet"))
#set ($wdocs = $xwiki.watchlist.getWatchedElements())
<span id="wdoc-name" style="display:none">$doc.name</span>
<span id="wdoc-space" style="display:none">$doc.space</span>
#if(!$listtool.contains($wdocs, "$doc.wiki:$doc.fullName"))
 <a id="watch-link-icon" class="wlink-icon" href="#" title='$msg.get("xe.watchlist.watch")'><img src="/xwiki/resources/icons/silk/page_white_add.gif" style="border:0px;" alt="" /></a><a href="#" id="watch-link" class="wlink" title='$msg.get("xe.watchlist.watch")'>$msg.get("xe.watchlist.watch")</a>
#else
 <a class="watch-link-icon" class="" href="#" title='$msg.get("xe.watchlist.unwatch")'  ><img src="/xwiki/resources/icons/silk/page_white_delete.gif" style="border:0px;" alt="" /></a><a href="#" id="watch-link" title='$msg.get("xe.watchlist.unwatch")' >$msg.get("xe.watchlist.unwatch")</a>
#end

 

    

Get Connected