Changeset 186:7b8834c6118d
- Timestamp:
- 09/03/08 20:19:24 (2 years ago)
- Author:
- rgrp
- Branch:
- default
- convert_revision:
- svn:10edda23-d834-0410-9182-b00384516d49/trunk@198
- Message:
-
[thread][m]: various misc fixes to thread user experience.
- Fix it so successful thread create now leads dirctly to thread update/edit page.
- Add docs to side of thread edit page
- Fix up template when no factlets in thread.
- Location:
- microfacts
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r170
|
r186
|
|
| 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) |
-
|
r185
|
r186
|
|
| 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> |
-
|
r174
|
r186
|
|
| 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 to |
| 50 | | ${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 | |
-
|
r172
|
r186
|
|
| 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 | |