Mailinglist Archive: yast-devel (34 mails)

< Previous Next >
Re: [yast-devel] Yast webclient - template helpers (translations, output formatters)
  • From: Stefan Schubert <schubi@xxxxxxx>
  • Date: Fri, 22 May 2009 11:47:26 +0200
  • Message-id: <4A1674AE.3030704@xxxxxxx>
Ladislav Slezak schrieb:
Hi,

Another thing I noticed is that the webclient plugins do
not use any shared code for generating HTML output or for translations.

I defined some helpers in web-client/webclient/app/helpers/application_helper.rb
file. These helpers are automatically available in all webclient templates.

There is e.g. 'delete' => _("Delete") helper, and more should be added. The
translators will translate the common texts just once not per plugin package.


Moreover I added 'simple_table' helper for generating overview table
(optionally with
Add/Edit/Delete links), it's already used in samba_server plugin. It's not a
generic
function for creating any table layout, but for major yast overview dialogs it
should
be sufficient.
Yes, an "UI building set" would be very nice. (e.g. for tables, lists, comboxes, ...)
I can imaging that we will have less effort then when we are changing the UI e.g.
stylesheets.
Please go on here. I suggest that we should begin to document this on
http://en.opensuse.org/YaST/Web
I wanted to define some namespaces for the helpers, like Label for delete, but I
failed. Rails could not find the functions in the namespace, any idea why?
(I can send a patch if needed...)
Duncan should know more about. He has already played with namespaces. :-)

Again, we should share as much code as possible. So if you think that the code
which
you just have written could be used in some other plugin move it to the base
webclient package (and don't forget to document it well).


--

Best Regards

Ladislav Slezák
Yast Developer
------------------------------------------------------------------------
SUSE LINUX, s.r.o. e-mail: lslezak@xxxxxxx
Lihovarská 1060/12 tel: +420 284 028 960
190 00 Prague 9 fax: +420 284 028 951
Czech Republic http://www.suse.cz/


--
*******************************************************************************
Stefan Schubert
SUSE LINUX GmbH - Maxfeldstrasse 5 - D-90409 Nuernberg, Germany
e-mail: schubi@xxxxxxx
-------------------------------------------------------------------------------
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)


--
To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-devel+help@xxxxxxxxxxxx

< Previous Next >
References