Attachment 'text_html.diff'

Download

   1 --- text_html_old.py	2007-02-18 22:01:18.000000000 +0100
   2 +++ text_html.py	2007-02-19 12:25:38.000000000 +0100
   3 @@ -682,7 +682,7 @@
   4  
   5          # check whether attachment exists, possibly point to upload form
   6          if not os.path.exists(fpath):
   7 -            linktext = _('Create new drawing "%(filename)s"')
   8 +            linktext = _('Create new drawing "%(filename)s (opens in new window)"')
   9              return wikiutil.link_tag(
  10                  self.request,
  11                  ('%s?action=AttachFile&rename=%s%s' %
  12 @@ -713,21 +713,23 @@
  13                  # add alt and title tags to areas
  14                  map = re.sub('href\s*=\s*"((?!%TWIKIDRAW%).+?)"', r'href="\1" alt="\1" title="\1"', map)
  15                  # add in edit links plus alt and title attributes
  16 -                map = map.replace('%TWIKIDRAW%"', edit_link + '" alt="' + _('Edit drawing %(filename)s') % {'filename': self.text(fname)} + '" title="' + _('Edit drawing %(filename)s') % {'filename': self.text(fname)} + '"')
  17 +                map = map.replace('%TWIKIDRAW%"', edit_link +
  18 +                                  '" alt="' + _('Edit drawing %(filename)s (opens in new window)') % {'filename': self.text(fname)} +
  19 +                                  '" title="' + _('Edit drawing %(filename)s (opens in new window)') % {'filename': self.text(fname)} + '"')
  20                  # unxml, because 4.01 concrete will not validate />
  21                  map = map.replace('/>', '>')
  22 -                return (map + self.image(
  23 -                    alt=drawing,
  24 -                    src=AttachFile.getAttachUrl(
  25 -                    pagename, filename, self.request,
  26 -                    addts=1),
  27 -                    usemap='#'+mapid, css="drawing"))
  28 +                return (map + self.image(alt="%s" % (_('Clickable drawing: %(filename)s') % {'filename': self.text(fname)}),
  29 +                                         title="",
  30 +                                         src=AttachFile.getAttachUrl(pagename, filename, self.request,addts=1),
  31 +                                         usemap='#'+mapid, css="drawing"))
  32 +  
  33          else:
  34              return wikiutil.link_tag(self.request,
  35                                       edit_link,
  36 -                                     self.image(alt=url,
  37 +                                     self.image(alt="%s" % (_('Edit drawing %(filename)s (opens in new window)') % {'filename': self.text(fname)}),
  38 +                                                title="%s" % (_('Edit drawing %(filename)s (opens in new window)') % {'filename': self.text(fname)}),                                             
  39                                                  src=AttachFile.getAttachUrl(pagename, filename, self.request, addts=1), css="drawing"),
  40 -                                     title="%s" % (_('Edit drawing %(filename)s') % {'filename': self.text(fname)}))
  41 +                                     title="%s" % (_('Edit drawing %(filename)s (opens in new window)') % {'filename': self.text(fname)}))
  42  
  43  
  44      # Text ##############################################################

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.
  • [get | view] (2007-04-18 13:48:56, 3.2 KB) [[attachment:new_patch.diff]]
  • [get | view] (2007-02-19 11:38:10, 3.0 KB) [[attachment:text_html.diff]]
 All files | Selected Files: delete move to page copy to page

You are not allowed to attach a file to this page.