schooltool-developers team mailing list archive
-
schooltool-developers team
-
Mailing list archive
-
Message #00359
Re: Section linkage views
-
To:
schooltool-developers@xxxxxxxxxxxxxxxxxxx
-
From:
Justas <justas@xxxxxx>
-
Date:
Mon, 11 Apr 2011 10:43:12 +0300
-
In-reply-to:
<BANLkTi=y_Rj5T2DhO1g8hHO7T8o2WoSFCA@mail.gmail.com>
-
User-agent:
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.14) Gecko/20110223 Thunderbird/3.1.8
Hey,
On 04/11/2011 08:16 AM, Alan Elkner wrote:
Hey Guys,
In my latest commit to my section term linkage branch,
lp:~aelkner/schooltool/term_linkage, I created the 'All Terms' view
that has a complete overview of the section for the whole schoolyear
as described in the functional test, section_linkage.txt:
<...>
I've attached a screenshot of an example which demonstrates the
statements above. Though I mention the view for linking to an
existing section, I haven't created that one yet. I'll be adding that
in an upcoming commit.
I added CSS classes to schooltool.css that make the table follow the
guidelines laid out on page 27 of the Ubuntu style guide. That
includes the dotted line as border-bottom of table cells. I chose
220px as column width rather than 140px because it seemed too narrow,
and people will rarely use more than four terms.
Umm.. why 220px? Just couldn't figure out the reasoning behind this
number.
Page 26 also says "Table width: 100%. Table should use the whole
width of the content area." This of course works pretty well when your
content area is 544px (as in the guidelines), and may look quirky when
it is whole page width, like we have now. So no objections, just curious.
The content-header slot at the top has a table with course and year,
with links to each. I used border-right of 40px rather than cramming
them together with only a tightly squeezed-in vertical bar to separate
them. Since each term's section roster is proceeded by a title link,
the user can easily navigate to the section for the desired term. The
only question is whether the term title in the table headings should
be links to the terms as well.
Anyway, I also attached a screenshot of the changed section index.html
view which now has a table at the top describing the section, then an
All Terms link to get to the section linkage view, followed by a list
of links for the sections in the the other terms that the section is
linked to. The links are listed with the text being the term's title,
but clicking the link takes the user to the section. Perhaps the link
should say 'Math (1) of Third' instead of just 'Third'. I can't
decide which would be best. What makes me want to change the text is
that there is a link to the section's term view that has the term's
title right above the All Terms link. That could be confusing.
Please make any comments or suggestions, and any code review prior to
our meeting would help me make any adjustments this week.
In SectionLinkageView, please remove everything except year
property. Most of it should be done in tal.
Instead of terms property, you could use something like this:
@property
def columns(self):
linked_sections = dict([(ITerm(section), section) for section in
self.linked_sections])
columns = []
for for term in sorted(self.year.values(), key=lambda t: t.first):
columns.append({
'term': term,
'section': linked_sections.get(term),
})
return columns
Then use tal:repeat="column view/term_columns",
tal:condition="column/section", tal:condition="repeat/column/last", <a
tal:attributes="href
string:${column/section/@@absolute_url}/extend_term.html?term=${column/term/__name__}">Extend
to smth</a> and so on.
If you really need to limit "extend section" functionality to later
terms, you can add bool 'allow_extend' to the column dict. Frankly,
this limitation bothers me. Though it is properly guiding user towards
what he should do, it backfires weirdly in some scenarios.
Say, we have Math in term1 and term2, not linked. It is possible to
link them if you navigate to All Terms view from section in term 1, it
is not possible to link them if you navigate to the *same view* from
term 2. Hmm.. I wonder how it works with linking sections in term1 and
term3.
As a compromise, maybe we could have "link existing section" in all
unlinked terms, and "extend to term" only in terms after the last linked
one? Get the best of both worlds - soft hint what user should do +
possibility to fix mistakes.
I'd also like if ExtendTermView had a confirmation button. In my
experience, links that create content without confirmation bite users
hard (in javascripty implementations you usually have to use at least
two mouse clicks, see assigning a developer to a bug in Launchpad).
Cheers,
Justas
Follow ups
References