[Building Sakai] Sitebrowser description
Daniel Merino
daniel.merino at unavarra.es
Thu Jun 11 05:41:19 PDT 2009
Hi, Savitha.
These steps that you gave me a few days ago are for a different version
of Sakai of the one we have here (2.5.3) so I have modified them and I
have created a patch in the JIRA
http://bugs.sakaiproject.org/jira/browse/SAK-13149 to solve the problem
described there.
I'm a newcomer in Sakai programming, so I don't know if my patch could
be done better than is, but it solves the problem.
Thanks and regards.
Prakash, Savitha escribió:
> Daniel,
> These are things you have to do to incorporate stripped and trimmed
> description for sitebrowser-
>
> 1. You have to add
> http://bugs.sakaiproject.org/jira/secure/attachment/17753/SiteTextEditUtil.java
> file into site-manage-util/src/java
>
> 2. In
> site-manage-tool/tool/src/java/org/sakaiproject/site/tool/SiteBrowserAction.java,
>
> [a] replace “context.put("siteBrowserTextEdit", new
> SiteBrowserTextEditAction());” with
> “context.put("siteBrowserTextEdit", new SiteTextEditUtil());” in
> buildListContext method.
> [b] you will have import the package import
> org.sakaiproject.site.util.SiteTextEditUtil;
>
> 3. In
> /site-manage-tool/tool/src/webapp/vm/sitebrowser/chef_sitebrowser_list.vm,
> replace the description
> “<td headers="description"> #set ($desc = $site.Description) </td>” with
> “ <td headers="description"> #set ($desc = $site.Description)
> $siteBrowserTextEdit.doPlainTextAndLimit($desc,50,$tlang.getString("list.desc.ellipse"))
> </td>”
>
> Where $tlang.getString("list.desc.ellipse") refers to the ellipse
> pattern you would like to end the description with, like “....”; and
> second parameter refers to the number of characters you would like to
> restrict for the description.
>
> Hope this helps,
> Savitha
>
>
> On 5/28/09 4:29 AM, "Daniel Merino" <daniel.merino at unavarra.es> wrote:
>
> Hi all.
>
> We are experiencing the problems described in the JIRA
> http://bugs.sakaiproject.org/jira/browse/SAK-13149 . This JIRA is
> related to another one
> (http://bugs.sakaiproject.org/jira/browse/SAK-15823)
> <http://bugs.sakaiproject.org/jira/browse/SAK-15823%29> where is a
> patch,
> but I think that this patch is for Sakai 2.6 and we need to apply
> it to
> 2.5.3. The problem is that, in the Site Browser tool, the descriptions
> of the sites are made with HTML and this umbalance all the display.
>
> I have been tracking the code and in the velocity file
> /site-manage-tool/tool/src/webapp/vm/sitebrowser/chef_sitebrowser_list.vm
> there is this:
>
> $validator.escapeHtml($desc)
>
> And AFAIK, in the class
> site-manage/tags/sakai_2-5-3/site-manage-tool/tool/src/java/org/sakaiproject/site/tool/SiteBrowserAction.java
> is implemented the logic of the application.
>
> I would like to know how could I add in SiteBrowserAction.java some
> plainText method to convert the HTML to plain text, as in the patch's
> class
> (http://bugs.sakaiproject.org/jira/secure/attachment/17753/SiteTextEditUtil.java)
> <http://bugs.sakaiproject.org/jira/secure/attachment/17753/SiteTextEditUtil.java%29>
> and after, how could I pass this new text to the vm file.
>
> I don't know very much of Velocity, I'm sorry if this question is
> too basic.
>
> Of course, if somebody has patched this already in their 2.5.X, I
> would
> be very grateful to try his patch.
>
> Thanks in advance.
> Regards.
> --
> Daniel Merino
> daniel.merino at unavarra.es
> Gestor de teleformación - Centro Superior de Innovación Educativa.
> Tfno: 948-168489 - Universidad Pública de Navarra.
> _______________________________________________
> sakai-dev mailing list
> sakai-dev at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>
> TO UNSUBSCRIBE: send email to
> sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of
> "unsubscribe"
>
--
Daniel Merino
daniel.merino at unavarra.es
Gestor de teleformación - Centro Superior de Innovación Educativa.
Tfno: 948-168489 - Universidad Pública de Navarra.
--
Muchas personas son lo bastante educadas como para no hablar con la boca
llena, pero no les preocupa hacerlo con la cabeza vacía. (Orson Welles)
More information about the sakai-dev
mailing list