Changeset 198
- Timestamp:
- 09/03/08 21:19:24 (3 months ago)
- Files:
-
- trunk/microfacts/controllers/thread.py (modified) (1 diff)
- trunk/microfacts/templates/thread/read.html (modified) (1 diff)
- trunk/microfacts/templates/thread/update.html (modified) (2 diffs)
- trunk/microfacts/tests/functional/test_thread.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/microfacts/controllers/thread.py
r180 r198 46 46 if self.mode.response_code == 200: 47 47 c.thread = self.mode.entity 48 return render('thread/create') 48 # return render('thread/create') 49 h.redirect_to(controller='thread', action='update', 50 id=c.thread.id) 49 51 else: 50 52 abort(self.mode.response_code) trunk/microfacts/templates/thread/read.html
r197 r198 53 53 <p py:otherwise=""> 54 54 There are no factlets in this thread. Would you like to 55 ${h.link_to("add a new one", h.url_for(controller='factlet', action='new'))}? 55 ${h.link_to("add a new one", h.url_for(controller='thread', 56 action='update'))}? 56 57 </p> 57 58 </py:choose> trunk/microfacts/templates/thread/update.html
r186 r198 31 31 32 32 <body> 33 <aside id="thread-control-${c.thread.id}"> 34 <h2>Adding Factlets:</h2> 35 <ol> 36 <li>Search for the factlets you want to add using the search 37 facility.</li> 38 <li>Then click on append</li> 39 </ol> 40 41 <h2>Deleting Factlets:</h2> 42 <ol> 43 <li>Select it (by clicking on it in the list)</li> 44 <li>Click the delete button</li> 45 </ol> 46 </aside> 47 33 48 <div id="thread-${c.thread.id}" class="thread"> 34 49 35 50 <h2 id="thread-title">Editing Thread: ${c.thread.title}</h2> 36 37 <py:choose> 38 <div py:when="len(c.thread.factlets) > 0" class="thread-factlets"> 39 51 <h3>Thread Factlets</h3> 52 <div class="thread-factlets"> 40 53 <py:for each="factlet in c.thread.factlets"> 41 54 <div id="factlet-${factlet['id']}" class="factlet"> … … 46 59 47 60 </div><!--! /thread-factlets --> 48 <p py:otherwise="">49 There are no factlets in this thread. Would you like to50 ${h.link_to("add a new one", h.url_for(controller='factlet', action='new'))}?51 </p>52 </py:choose>53 61 </div><!--! /thread --> 54 62 trunk/microfacts/tests/functional/test_thread.py
r184 r198 96 96 form = response.forms[0] 97 97 form['title'] = self.title 98 response = form.submit(status=[200]) 99 assert 'Create successful.' in response 98 response = form.submit(status=[302]) 99 response = response.follow() 100 assert 'Editing Thread' in response 100 101 self.thread = model.Thread.query.filter_by(title=self.title).one() 101 102
