Changeset 107
- Timestamp:
- 08/06/08 16:21:20 (5 months ago)
- Files:
-
- trunk/microfacts/controllers/thread.py (modified) (1 diff)
- trunk/microfacts/templates/thread/read.html (modified) (2 diffs)
- trunk/microfacts/templates/thread/read_timeline.html (copied) (copied from trunk/microfacts/templates/thread/read.html)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/microfacts/controllers/thread.py
r91 r107 71 71 abort(mode.response_code) 72 72 73 def read_timeline(self, id): 74 c.has_inline_edit = False 75 try: 76 id = int(id) 77 except: 78 id = 0 79 mode = EntityGet('/thread/%s' % id).execute() 80 if mode.response_code == 200: 81 c.thread = mode.entity 82 if len(c.thread.factlets) > 0: 83 import microfacts.controllers.factlet 84 id = c.thread.factlets[0].id 85 fc = microfacts.controllers.factlet.FactletController() 86 html = fc.read_core(id) 87 c.factlet_info = genshi.XML(html) 88 return render('thread/read_timeline') 89 else: 90 abort(mode.response_code) 91 73 92 def update(self, id): 74 93 c.has_inline_edit = True trunk/microfacts/templates/thread/read.html
r103 r107 28 28 </aside> 29 29 30 <aside id="thread-timeline-control-${c.thread.id}">31 <h2>Timeline control:</h2>32 <p>To scroll the timeline click and drag horizontally (in any band). To resize the timeline click and drag vertically.</p>33 <p><strong>TODO: make these buttons functional (js only)</strong></p>34 <form>35 <input type="button" value="Show Timeline" class="show" />36 <input type="button" value="Hide Timeline" class="hide" />37 </form>38 <p><strong>TODO: might want to move to having an explicit thread timeline view in which timeline is vertical and replaces the factlet-info box on the right ...</strong></p>39 </aside>40 41 30 <div id="thread-${c.thread.id}" class="thread"> 42 31 … … 45 34 (${h.link_to("Edit", h.url_for(controller='thread', action='update'))}) 46 35 </h2> 47 <div id="thread-timeline" style="height: 150px; border: 1px solid #aaa; margin-bottom: 20px;"></div> 48 36 49 37 <py:choose> 50 38 <div py:when="len(c.thread.factlets) > 0" class="thread-factlets">
