Shitiz Garg avatar Shitiz Garg committed 0edcdc5

Treat feed_title as unicode, also some cosmetic fixes

Comments (0)

Files changed (5)

MoinMoin/apps/feed/views.py

                 logging.exception("content rendering crashed")
                 content = _(u'MoinMoin feels unhappy.')
                 content_type = 'text'
+            author = get_editor_info(rev.meta, external=True)
             rev_comment = rev.meta.get(COMMENT, '')
             if rev_comment:
                 # Trim down extremely long revision comment
                 if len(rev_comment) > 80:
                     content = render_template('atom.html', get='comment_cont_merge', comment=rev_comment[79:], content=Markup(content))
                     rev_comment = u"{0}...".format(rev_comment[:79])
-            author = get_editor_info(rev.meta, external=True)
-            if rev_comment is not '':
-                feed_title = "{0} - {1}".format(author.get(NAME, ''), rev_comment)
+                feed_title = u"{0} - {1}".format(author.get(NAME, ''), rev_comment)
             else:
-                feed_title = "{0}".format(author.get(NAME, ''))
+                feed_title = u"{0}".format(author.get(NAME, ''))
             if not item_name:
-                feed_title = "{0} - {1}".format(name, feed_title)
+                feed_title = u"{0} - {1}".format(name, feed_title)
             feed.add(title=feed_title, title_type='text',
                      summary=content, summary_type=content_type,
                      author=author,
         if cid is not None:
             app.cache.set(cid, content)
     return Response(content, content_type='application/atom+xml')
+

MoinMoin/items/__init__.py

 class Image(Binary):
     """ Base class for image/* """
     def _render_data_diff(self, oldrev, newrev):
-        print 'test'
         print self._internal_representation()
 item_registry.register(Image._factory, Type('image/*'))
 

MoinMoin/templates/atom.html

 {%- if get == 'xml' -%}
     <?xml-stylesheet type="text/xsl" href="{{ theme_static('atom.xslt') }}"?>
 {%- elif get == 'comment_cont_merge' -%}
-    <p style="font-size: 14px">...{{ comment }}</p> <br /> {{ content }}
+    <p style="font-size: 1.2em">…{{ comment }}</p> <br /> {{ content }}
 {%- elif get == 'first_revision' -%}
     {{ content }}
     <br />
             </td>
         </tr>
     </table>
-    <strong>{{ safe_style() }}</strong>
+    {{ safe_style() }}
 {%- elif get == 'binary' -%}
     {{ content }}
     <br />
         </tr>
     </table>
     {{ safe_style() }}
-{%- endif -%}
+{%- endif -%}
+

MoinMoin/templates/diff_text_atom.html

     .moin-diff-added span { background-color: #80FF80; }
     .moin-diff-removed span { background-color: #FFFF80; }
 </style>
+

MoinMoin/themes/modernized/static/atom.xslt

             <div style="padding: 0px 30px 0px 30px;" class="summary"><xsl:value-of select="atom:summary" /></div>
         </div>
     </xsl:template>
-</xsl:stylesheet>
+</xsl:stylesheet>
+
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.