From: gezzzan <ge...@ya...> - 2014-10-11 15:18:14
|
cc dev hi! i am aiming to keep the icon function only to manage the presentation of the icon itself, so I would leave out the urls and keep it simple. Is there any drawback for this? Example in parent tpls with this approach:<button type="submit" name="zip" title="{tr}Zip{/tr}>{icon name="file-archive"} {tr}Generate zip{/tr}</button> This seems easy to follow and understand, plus Bootstrap&Tiki seems to manage well icons for buttons this way. What is the benefit of having/using the button smarty_tiki function? I am not against it, just dont see yet the reason :) cheers,gezza On Saturday, October 11, 2014 1:05 PM, Jonny Bradley <jo...@ti...> wrote: Hi all, That's just what i was going to suggest Luci, +1 for connecting the {button} _icon param to the new buttons if it's not already (by magic) and using that for, all buttons? Only i think the URL param is either href or _script, and i would hope the get escaped automagically in the function somewhere, so this might be {button _icon='permission' href='$permission_link.url'} Hmm, after a little experimentation it looks like the {button} function needs a bit of work to be able to do this, currently if you have _text and _icon set it only shows the icon (and the _text becomes the title attribute), also it only uses the old {icon _id=... format which is fixable, and the auto args thing has been broken for a long time imho (maybe for ever - i never worked out why you have to add _auto_args='do' when you've already specified a param). Maybe adding an _iconpos param that could be 'start' or 'end' which would maintain the current behaviour. I've been playing with replacing the "clear all caches" one at templates/tiki-admin_system.tpl:10 and i think we should be able to replace the <a> tag with {button _icon='trash' _iconpos='start' _text='{tr}Clear all caches{/tr}' _type='primary' do='all'} What do you think? Should we change the way button works a bit so this "just works"? This might be our only chance to do this for several releases... Finally, maybe this should move the the dev list? Cheers, jb On 10 Oct 2014, at 20:03, luciash d' being <lu...@ti...> wrote: > hI gEZZA > > I think it would be better like this: > > > {icon name="permission" link="$permission_link.url|escape"} > > When needed in a button: > > {button _icon="permission" action="$permission_link.url|escape"} > > Not sure button does link or href or action or whatever... > > luci > > > > On 10/10/2014 05:58 PM, gezzzan wrote: >> Hi >> >> working with icon sets I came across this question: it is inconsistent in Tiki how icons are sorrounded, sometimes it is a button style (btn bootstrap class), sometimes it is link style (link bootstrap class) >> >> do you think it makes sense to make a setting for this this at iconset and icon level? Or we should keep it "hardcoded" for btn or link style? >> >> Example: >> >> //currently >> <a class="btn btn-default btn-sm" href="{$permission_link.url|escape}"> >> {icon name="permission"} >> </a> >> >> //proposed->the class of the <a> would be empty in the tpl and a span generated by the icon function would sorround the icon, so the tpl would look like this: >> <a href="{$permission_link.url|escape}"> >> {icon name="permission"} >> </a> >> >> the class of the span (which is set in the icon set) would than decide if it is btn or a link styled >> >> what do you think? >> >> thanks&cheers, >> gezza >> >> >> ------------------------------------------------------------------------------ >> Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer >> Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports >> Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper >> Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer >> >> http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk >> >> >> _______________________________________________ >> Tikiwiki-artwork mailing list >> >> Tik...@li... >> https://lists.sourceforge.net/lists/listinfo/tikiwiki-artwork > > ------------------------------------------------------------------------------ > Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer > Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports > Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper > Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer > http://p.sf.net/sfu/Zoho_______________________________________________ > Tikiwiki-artwork mailing list > Tik...@li... > https://lists.sourceforge.net/lists/listinfo/tikiwiki-artwork ------------------------------------------------------------------------------ Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer http://p.sf.net/sfu/Zoho _______________________________________________ Tikiwiki-artwork mailing list Tik...@li... https://lists.sourceforge.net/lists/listinfo/tikiwiki-artwork |