changeset 391:8a750c0d229a

classic theme: added GUI editor link, general: footer code cleanup imported from: moin--main--1.5--patch-395
author Thomas Waldmann <tw@waldmann-edv.de>
date Sat, 21 Jan 2006 16:13:30 +0000
parents d1c0103a408b
children 4680a68ccfb6
files ChangeLog MoinMoin/Page.py MoinMoin/action/AttachFile.py MoinMoin/action/Despam.py MoinMoin/action/SubscribeUser.py MoinMoin/action/backup.py MoinMoin/action/fullsearch.py MoinMoin/action/links.py MoinMoin/theme/classic.py MoinMoin/wikiaction.py MoinMoin/wikiutil.py docs/CHANGES wiki/htdocs/classic/css/common.css wiki/htdocs/classic/css/screen.css
diffstat 14 files changed, 73 insertions(+), 38 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri Jan 20 19:39:13 2006 +0000
+++ b/ChangeLog	Sat Jan 21 16:13:30 2006 +0000
@@ -2,6 +2,26 @@
 # arch-tag: automatic-ChangeLog--arch@arch.thinkmo.de--2003-archives/moin--main--1.5
 #
 
+2006-01-21 17:13:30 GMT	Thomas Waldmann <tw@waldmann-edv.de>	patch-395
+
+    Summary:
+      classic theme: added GUI editor link, general: footer code cleanup
+    Revision:
+      moin--main--1.5--patch-395
+
+    classic theme: added GUI editor link, general: footer code cleanup
+    
+
+    modified files:
+     ChangeLog MoinMoin/Page.py MoinMoin/action/AttachFile.py
+     MoinMoin/action/Despam.py MoinMoin/action/SubscribeUser.py
+     MoinMoin/action/backup.py MoinMoin/action/fullsearch.py
+     MoinMoin/action/links.py MoinMoin/theme/classic.py
+     MoinMoin/wikiaction.py MoinMoin/wikiutil.py docs/CHANGES
+     wiki/htdocs/classic/css/common.css
+     wiki/htdocs/classic/css/screen.css
+
+
 2006-01-20 20:39:13 GMT	Thomas Waldmann <tw@waldmann-edv.de>	patch-394
 
     Summary:
--- a/MoinMoin/Page.py	Fri Jan 20 19:39:13 2006 +0000
+++ b/MoinMoin/Page.py	Sat Jan 21 16:13:30 2006 +0000
@@ -1253,8 +1253,7 @@
         if not content_only:
             # send the page footer
             if self.default_formatter:
-                wikiutil.send_footer(request, self.page_name,
-                                     print_mode=print_mode)
+                wikiutil.send_footer(request, self.page_name, print_mode=print_mode)
 
             request.write(doc_trailer)
 
--- a/MoinMoin/action/AttachFile.py	Fri Jan 20 19:39:13 2006 +0000
+++ b/MoinMoin/action/AttachFile.py	Sat Jan 21 16:13:30 2006 +0000
@@ -506,7 +506,7 @@
     request.write('<div id="content">\n') # start content div
     send_uploadform(pagename, request)
     request.write('</div>\n') # end content div
-    wikiutil.send_footer(request, pagename, showpage=1)
+    wikiutil.send_footer(request, pagename)
 
 
 def do_upload(pagename, request):
--- a/MoinMoin/action/Despam.py	Fri Jan 20 19:39:13 2006 +0000
+++ b/MoinMoin/action/Despam.py	Sat Jan 21 16:13:30 2006 +0000
@@ -184,5 +184,5 @@
 
     # End content and send footer
     request.write(request.formatter.endContent())
-    wikiutil.send_footer(request, pagename, editable=0, showactions=0, form=request.form)
+    wikiutil.send_footer(request, pagename)
 
--- a/MoinMoin/action/SubscribeUser.py	Fri Jan 20 19:39:13 2006 +0000
+++ b/MoinMoin/action/SubscribeUser.py	Sat Jan 21 16:13:30 2006 +0000
@@ -27,7 +27,7 @@
 <input type="submit" value="Subscribe">
 </form>
 """)
-    wikiutil.send_footer(request, pagename, showpage = 1)
+    wikiutil.send_footer(request, pagename)
 
 def show_result(pagename, request):
     _ = request.getText
@@ -42,7 +42,7 @@
 
     # print result
     request.write(result)
-    wikiutil.send_footer(request, pagename, showpage=1)
+    wikiutil.send_footer(request, pagename)
 
 
 def subscribe_users(request, usernamelist, pagename, formatter):
--- a/MoinMoin/action/backup.py	Fri Jan 20 19:39:13 2006 +0000
+++ b/MoinMoin/action/backup.py	Sat Jan 21 16:13:30 2006 +0000
@@ -112,7 +112,7 @@
 })
     
     request.write(request.formatter.endContent())
-    wikiutil.send_footer(request, pagename, editable=0, showactions=0, form=request.form)
+    wikiutil.send_footer(request, pagename)
 
 def sendMsg(request, pagename, msg):
     from MoinMoin import Page
--- a/MoinMoin/action/fullsearch.py	Fri Jan 20 19:39:13 2006 +0000
+++ b/MoinMoin/action/fullsearch.py	Sat Jan 21 16:13:30 2006 +0000
@@ -107,5 +107,4 @@
 
     # End content and send footer
     request.write(request.formatter.endContent())
-    wikiutil.send_footer(request, pagename, editable=0, showactions=0,
-                         form=request.form)
+    wikiutil.send_footer(request, pagename)
--- a/MoinMoin/action/links.py	Fri Jan 20 19:39:13 2006 +0000
+++ b/MoinMoin/action/links.py	Sat Jan 21 16:13:30 2006 +0000
@@ -52,7 +52,7 @@
 
     if mimetype == "text/html":
         request.write('</pre>')
-        wikiutil.send_footer(request, pagename, editable=0, showactions=0, form=form)
+        wikiutil.send_footer(request, pagename)
     else:
         raise MoinMoinNoFooter
 
--- a/MoinMoin/theme/classic.py	Fri Jan 20 19:39:13 2006 +0000
+++ b/MoinMoin/theme/classic.py	Sat Jan 21 16:13:30 2006 +0000
@@ -52,7 +52,7 @@
             return ''
         parts = [u'<div id="footer">',
                  self.footer_fragments(d, **keywords),
-                 self.edittext_link(d, **keywords),
+                 self.edit_link(d, **keywords),
                  self.availableactions(d),
                  u'</div>',]
         return ''.join(parts)
@@ -139,6 +139,7 @@
         dict = {
             'config_header1_html': self.emit_custom_html(self.cfg.page_header1),
             'config_header2_html': self.emit_custom_html(self.cfg.page_header2),
+            'title_html': self.title(d),
             'msg_html': self.msg(d),
             'startpage_html': self.startPage(),
         }
@@ -147,6 +148,7 @@
         html = """
 %(config_header1_html)s
 
+%(title_html)s
 %(msg_html)s
 
 %(config_header2_html)s
@@ -157,7 +159,7 @@
 
     # Footer stuff #######################################################
     
-    def edittext_link(self, d, **keywords):
+    def edit_link(self, d, **keywords):
         """
         Assemble EditText link (or indication that page cannot be edited)
         
@@ -165,29 +167,9 @@
         @rtype: string
         @return: edittext link html
         """
-        _ = self.request.getText
         page = d['page']
-        if keywords.get('editable', 1):
-
-            # Add edit link
-            editable = (self.request.user.may.write(d['page_name']) and
-                        page.isWritable())
-            if editable:
-                title = _('EditText', formatted=False)
-                edit = wikiutil.link_tag(self.request, d['q_page_name'] +
-                                         '?action=edit', title)
-            else:
-                edit = _('Immutable page')
-
-            # Add last edit info
-            info = page.lastEditInfo()
-            if info:
-                if info.get('editor'):
-                    info = _("last edited %(time)s by %(editor)s") % info
-                else:
-                    info = _("last modified %(time)s") % info
-                return '<p>%s (%s)</p>' % (edit, info)
-        return ''
+        return  u'<ul class="editbar"><li>%s</li><li>%s</li></ul>' % (
+                    self.editorLink(page), self.pageinfo(page))
 
     def footer_fragments(self, d, **keywords):
         """
--- a/MoinMoin/wikiaction.py	Fri Jan 20 19:39:13 2006 +0000
+++ b/MoinMoin/wikiaction.py	Sat Jan 21 16:13:30 2006 +0000
@@ -190,7 +190,7 @@
             request.write('</pre>')
 
     request.write('</div>\n') # end content div
-    wikiutil.send_footer(request, pagename, showpage=1)
+    wikiutil.send_footer(request, pagename)
 
 
 def do_info(pagename, request):
@@ -419,7 +419,7 @@
         history(page, pagename, request)
         
     request.write('</div>\n') # end content div
-    wikiutil.send_footer(request, pagename, showpage=1)
+    wikiutil.send_footer(request, pagename)
 
 
 def do_recall(pagename, request):
--- a/MoinMoin/wikiutil.py	Fri Jan 20 19:39:13 2006 +0000
+++ b/MoinMoin/wikiutil.py	Sat Jan 21 16:13:30 2006 +0000
@@ -1385,8 +1385,6 @@
 
     @param request: the request object
     @param pagename: WikiName of the page
-    @keyword editable: true, when page is editable (default: true)
-    @keyword showpage: true, when link back to page is wanted (default: false)
     @keyword print_mode: true, when page is displayed in Print mode
     """
     d = request.themedict
--- a/docs/CHANGES	Fri Jan 20 19:39:13 2006 +0000
+++ b/docs/CHANGES	Sat Jan 21 16:13:30 2006 +0000
@@ -26,6 +26,8 @@
       footer.
     * Include a CSS workaround for yet another IE bug, see:
       MoinMoinBugs:InternetExplorerPeekABooBugInRightSideBar
+    * classic theme: added GUI editor link
+    * classic theme: added pagename header to editor screen
 
   Other changes:
     * Updated FCKeditor to current CVS (2006-01-08 == 2.2+)
@@ -35,6 +37,7 @@
       MoinMoin:FileLinks
     * cfg.mail_smarthost now supports "server:port" syntax, the default port
       is 25, of course.
+    * removed unused kwargs showpage/editable/form from wikiutil.send_footer
 
 
 Version 1.5.0:
--- a/wiki/htdocs/classic/css/common.css	Fri Jan 20 19:39:13 2006 +0000
+++ b/wiki/htdocs/classic/css/common.css	Sat Jan 21 16:13:30 2006 +0000
@@ -77,6 +77,18 @@
     /* end css 3 or browser specific rules */
 }
 
+pre.comment {
+    background-color: #CCCCCC;
+    color: red;
+    padding: 0;
+    margin: 0;
+    border: 0;
+}
+
+pre.comment:before {
+    content: url(../img/attention.png);
+}
+
 table {
 	margin: 0.5em 0 0 0.5em;
 	border-collapse: collapse;
--- a/wiki/htdocs/classic/css/screen.css	Fri Jan 20 19:39:13 2006 +0000
+++ b/wiki/htdocs/classic/css/screen.css	Sat Jan 21 16:13:30 2006 +0000
@@ -255,6 +255,28 @@
 	color: black; 
 }
 
+.editbar {
+    clear: both;
+    display: block;
+    margin: 0;
+    padding: 0;
+    white-space: nowrap;
+}
+
+.editbar li {
+    display: inline;
+    padding: 0;
+    margin: 0 6px 0 0;
+}
+
+*[dir="rtl"] .editbar li {
+    float: right;
+}
+
+.editbar li p {
+    display: inline;
+}
+
 #message {
 	clear: both;
 	border: 2px solid #c0c0c0;