annotate env/ui/title.lua @ 1185:fef745f9e22f
Updated translation files
 | author | bsw | 
 | date | Thu Mar 26 21:01:05 2015 +0100 (2015-03-26) | 
 | parents | 701a5cf6b067 | 
 | children | 32cc544d5a5b | 
 
 | rev | line source | 
| bsw@1045 | 1 function ui.title ( content ) | 
| bsw@1045 | 2 | 
| bsw@1045 | 3   slot.select ( "title", function () | 
| bsw@1045 | 4 | 
| bsw@1045 | 5     -- home link | 
| bsw@1045 | 6     ui.link { | 
| bsw@1045 | 7       module = "index", view = "index", | 
| bsw@1045 | 8       attr = { class = "home", title = _"Home" }, | 
| bsw@1045 | 9       content = function () | 
| bsw@1045 | 10         ui.image { | 
| bsw@1045 | 11           attr = { class = "icon24", alt = title }, | 
| bsw@1045 | 12           static = "icons/48/home.png" | 
| bsw@1045 | 13         } | 
| bsw@1045 | 14       end | 
| bsw@1045 | 15     } | 
| bsw@1045 | 16 | 
| bsw@1045 | 17     if content then | 
| bsw@1045 | 18       ui.tag { attr = { class = "spacer" }, content = function() | 
| bsw@1045 | 19         slot.put ( " ยป " ) | 
| bsw@1045 | 20       end } | 
| bsw@1045 | 21       ui.tag { tag = "span", content = content } | 
| bsw@1045 | 22     else | 
| bsw@1045 | 23       ui.tag { attr = { class = "spacer" }, content = function() | 
| bsw@1045 | 24         slot.put ( " " ) | 
| bsw@1045 | 25       end } | 
| bsw@1045 | 26       ui.tag { tag = "span", content = _"Home" } | 
| bsw@1045 | 27     end | 
| bsw@1045 | 28 | 
| bsw@1045 | 29   end ) | 
| bsw@1045 | 30 | 
| bsw@1045 | 31 end |