On Nov 19, 2009, at 3:53 PM, tmortagne (SVN) wrote:

> Author: tmortagne
> Date: 2009-11-19 15:53:25 +0100 (Thu, 19 Nov 2009)
> New Revision: 25217
>
> Modified:
>   platform/web/trunk/standard/src/main/webapp/templates/rightsUI.vm
> Log:
> [cleanup] Apply codestyle
>
> Modified: platform/web/trunk/standard/src/main/webapp/templates/ 
> rightsUI.vm
> ===================================================================
> --- platform/web/trunk/standard/src/main/webapp/templates/ 
> rightsUI.vm   2009-11-19 14:43:57 UTC (rev 25216)
> +++ platform/web/trunk/standard/src/main/webapp/templates/ 
> rightsUI.vm   2009-11-19 14:53:25 UTC (rev 25217)
> @@ -110,15 +110,15 @@
>                  </tr>
>                  <tr id="usersandgroupstable-filters">
>                    <td>$msg.get("rightsmanager.searchfilter") <input  
> name="name" type="text" style="width:65%"/>
> -                     #if($context.database != "xwiki") #set($mainwk  
> = false) #else #set($mainwk = true) #end
> -                       #if(!$mainwk) ## display the combobox only  
> in a local wiki
> +                     #if(!$context.isMainWiki()) #set($mainwk =  
> false) #else #set($mainwk = true) #end
> +                     #if(!$mainwk) ## display the combobox only in  
> a local wiki
>                        <select name="wiki" style="margin-left:10px;">

This will create some extra spaces in the generated HTML. It would be  
great if we could find a way to have nice indentation and nice  
generated HTML output too.

I tried to imagine a good solution and couldn't so far (apart from  
running the generated HTML to a pretty printer but this is going to  
cause some overhead - Maybe it's minor enough to do it though). We  
could also have our own pre-processor that would remove spaces at  
beginning of velocity lines (as we're doing in the {{velocity}} macro)

WDYT?

Thanks
-Vincent

>                          <option value="local" selected="selected"> 
> $msg.get("rightsmanager.local")</option>
>                          <option value="global"> 
> $msg.get("rightsmanager.global")</option>
>                          <option value="both"> 
> $msg.get("rightsmanager.both")</option>
>                        </select>
> -                       #else<input type="hidden" name="wiki"  
> value="local"/>#end
> -                       #set($colsp = $maxlevel + 1)
> +                     #else<input type="hidden" name="wiki"  
> value="local"/>#end
> +                     #set($colsp = $maxlevel + 1)
>                    </td>
>                    <td colspan="$colsp"><input type="hidden"  
> name="clsname" value="$clsname" /></td>
>                  </tr>
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to