*** menesis has quit IRC | 00:05 | |
*** Lumiere_ has joined #schooltool | 00:12 | |
*** Lumiere has quit IRC | 00:16 | |
*** th1a has quit IRC | 03:58 | |
*** aelkner has quit IRC | 04:00 | |
*** aelkner has joined #schooltool | 04:13 | |
*** replaceafill has joined #schooltool | 05:46 | |
*** replaceafill has quit IRC | 07:51 | |
*** menesis has joined #schooltool | 08:31 | |
*** alga has joined #schooltool | 08:45 | |
aelkner | yvl: ayt? | 09:50 |
---|---|---|
yvl | yes | 09:50 |
aelkner | hey there | 09:50 |
aelkner | i have a question | 09:50 |
aelkner | you know you got me to thinking a different way about page templates during one of our sprints | 09:51 |
aelkner | in that we don't want to have logic and python: stuff in the page templates | 09:51 |
aelkner | but rather have them call into the view class | 09:51 |
aelkner | and you may have noticed in your merges that | 09:52 |
aelkner | i've been creating def some_heading(self) | 09:52 |
aelkner | and return _('some heading') | 09:52 |
aelkner | rather than putting the heading in the page template | 09:53 |
yvl | yes, that looked a bit odd to me | 09:53 |
aelkner | and using the i18n:translate="" | 09:53 |
aelkner | should i stop doing that | 09:53 |
aelkner | ? | 09:53 |
aelkner | i never liked the looks of i18n:translate="" | 09:53 |
aelkner | in a page template | 09:54 |
yvl | well, that you have to get used to :) | 09:54 |
aelkner | so ineligant and repeated all over | 09:54 |
yvl | I agree, it looks quirky | 09:55 |
aelkner | i can get used it if i have to | 09:55 |
yvl | but it's really reasonable | 09:55 |
aelkner | and it did seem like a lot of effort to write python for the headings | 09:55 |
aelkner | but you understand why the point about removing content from the page template | 09:56 |
aelkner | lead me to frown away from having headings there | 09:56 |
yvl | yes, I do | 09:56 |
yvl | still, it's the syntax to do that | 09:56 |
aelkner | it's really this scenario that lead me there | 09:56 |
aelkner | i put a heading somewhere | 09:56 |
aelkner | then the idea that the heading is conditional comes up | 09:57 |
aelkner | so i want to put python: there | 09:57 |
aelkner | it's practical, right? | 09:57 |
yvl | for those cases I'd prefer to avoid putting python | 09:57 |
yvl | if possible | 09:57 |
aelkner | i understand that | 09:58 |
yvl | there's no rule of the thumb I'm afraid | 09:58 |
aelkner | i guess i just took it further in my mind than i had to | 09:58 |
yvl | yeah | 09:58 |
yvl | I'd put python checks in the views | 09:58 |
yvl | and use tal:condition="view/something" | 09:58 |
yvl | and keep in mind that bool(something) usually is sufficient | 09:59 |
yvl | say, @property def schoolyear(self): return ISchoolYear(self.context, None) | 10:00 |
yvl | and then tal:condition="view/schoolyear" | 10:00 |
yvl | wait, that's a bad example | 10:00 |
yvl | scholyears are containers | 10:00 |
yvl | and empty containers evaluate to false :) | 10:00 |
aelkner | :), that's ok | 10:00 |
aelkner | i get the point | 10:01 |
aelkner | view methods (or properties if one prefers) | 10:01 |
aelkner | are best used for conditional content | 10:01 |
aelkner | but headings that are certain should us i18n:translate="" | 10:01 |
aelkner | as replacing that with conditional view method is straightforward | 10:02 |
yvl | yes | 10:02 |
aelkner | yeah, thanks, i have to adjust my habits | 10:02 |
aelkner | and i'm sick of writing the python for all these headings | 10:02 |
aelkner | oh, btw, good news | 10:03 |
yvl | it worked? :) | 10:03 |
yvl | (rotation) | 10:03 |
aelkner | you knew | 10:03 |
yvl | umm, more like - I hoped ;) | 10:04 |
aelkner | you didn't even give me a chance to say it :) | 10:04 |
yvl | apologies | 10:04 |
aelkner | i had a lot of playing around to do with alignments and blockTable styles | 10:04 |
aelkner | but I'm able to get the pdf that i want | 10:04 |
aelkner | so that's the great news | 10:05 |
yvl | cool :) | 10:05 |
aelkner | i can get the pdf for the Niepa project | 10:05 |
yvl | table styling is a bit... ackward in rml | 10:05 |
yvl | but doing that in python, like we used to do is much worse :) | 10:06 |
aelkner | and my Jeff will be hapy that the gradebook will eventually have it, too | 10:06 |
aelkner | yeah, rml is labor intensive | 10:06 |
aelkner | i agree, python is worse | 10:06 |
yvl | :) | 10:06 |
aelkner | just being able to hit F-5 n the browser because all i changed is the template is gold in itself | 10:06 |
aelkner | i'm getting greedy now, but wouldn't it be great it F-5 returned a html equivalent of the pdf | 10:08 |
aelkner | instead of the dialog box asking you to open the pdf? | 10:08 |
aelkner | then you have to hit F-4 to close that | 10:08 |
yvl | chromium is a bit friendlier in that matter | 10:09 |
aelkner | how so? | 10:10 |
yvl | downloads it automatically without asking and puts a box below the page :) | 10:10 |
yvl | also, at least on Windows machines, there are integrated pdf viewers | 10:11 |
yvl | into browsers I mean | 10:11 |
aelkner | ooh, that's reason enough to use chromium | 10:11 |
aelkner | i don't use windows, but in ubuntu ti still sounds really useful | 10:11 |
aelkner | thing is, usually i would want firebug | 10:12 |
aelkner | i suppose, for pdf projects, i could use chromium, and for html ones, firefox | 10:12 |
yvl | Chromium's blog announced that the latest Google Chrome dev build for Windows and Mac includes a plug-in for viewing PDF files. | 10:14 |
yvl | (2010 June) | 10:15 |
aelkner | boo, neither a windows nor a mac user | 10:19 |
yvl | we'll have to wait until built-in pdf viewer becomes available | 10:19 |
*** yvl has quit IRC | 11:26 | |
*** menesis has quit IRC | 12:33 | |
*** Aiste has joined #schooltool | 12:46 | |
*** menesis has joined #schooltool | 12:51 | |
*** yvl has joined #schooltool | 13:05 | |
*** menesis has quit IRC | 13:26 | |
*** menesis has joined #schooltool | 14:10 | |
*** Aiste has quit IRC | 16:12 | |
*** alga has quit IRC | 16:13 | |
*** alga has joined #schooltool | 16:18 | |
*** th1a has joined #schooltool | 17:14 | |
*** ignas has joined #schooltool | 17:26 | |
*** menesis has quit IRC | 17:35 | |
*** menesis has joined #schooltool | 17:41 | |
*** ignas has quit IRC | 18:45 | |
*** replaceafill has joined #schooltool | 18:49 | |
*** menesis has quit IRC | 19:16 | |
*** alga_ has joined #schooltool | 19:38 | |
*** alga has quit IRC | 19:38 | |
*** menesis has joined #schooltool | 20:16 | |
*** ignas has joined #schooltool | 20:37 | |
*** menesis1 has joined #schooltool | 21:23 | |
*** menesis has quit IRC | 21:23 | |
*** menesis1 has quit IRC | 22:17 |
Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!