Attachment 'new_patch.diff'

Download

   1 --- text_html_old.py	2007-04-18 15:34:02.000000000 +0200
   2 +++ text_html.py	2007-04-17 23:06:26.000000000 +0200
   3 @@ -684,14 +684,14 @@
   4  
   5          # check whether attachment exists, possibly point to upload form
   6          if not exists:
   7 -            linktext = _('Create new drawing "%(filename)s (opens in new window)"')
   8 -            return wikiutil.link_tag(
   9 +            linktext = _('Create new drawing %(filename)s')
  10 +            return (wikiutil.link_tag(
  11                  self.request,
  12                  ('%s?action=AttachFile&rename=%s%s' %
  13                   (wikiutil.quoteWikinameURL(pagename),
  14                    wikiutil.url_quote_plus(fname),
  15                    drawing and ('&drawing=%s' % wikiutil.url_quote(drawing)) or '')),
  16 -                linktext % {'filename': self.text(fname)})
  17 +                linktext % {'filename': self.text(fname)}) +  '<span class="screenreader_info"> %s</span>' % _('(opens in new window)'))
  18  
  19          mappath = AttachFile.getFilename(self.request, pagename, drawing + u'.map')
  20          edit_link = ('%s?action=AttachFile&rename=%s&drawing=%s' % (
  21 @@ -715,24 +715,25 @@
  22                  # add alt and title tags to areas
  23                  map = re.sub('href\s*=\s*"((?!%TWIKIDRAW%).+?)"', r'href="\1" alt="\1" title="\1"', map)
  24                  # add in edit links plus alt and title attributes
  25 -                alt = title =  _('Edit drawing %(filename)s (opens in new window)') % {'filename': self.text(fname)}
  26 +                alt = title =  _('Edit drawing %(filename)s %(hint)s') % {'filename': self.text(fname),
  27 +                                                                          'hint': _('(opens in new window)') }
  28                  map = map.replace('%TWIKIDRAW%"', '%s" alt="%s" title="%s"' % (edit_link, alt, title))
  29                  # unxml, because 4.01 concrete will not validate />
  30                  map = map.replace('/>', '>')
  31 -                alt = title = _('Clickable drawing: %(filename)s') % {'filename': self.text(fname)}
  32 +                alt = _('Clickable drawing: %(filename)s') % {'filename': self.text(fname)}
  33                  return (map + self.image(
  34                      alt=alt,
  35 -                    title=title,
  36 +                    title="",
  37                      src=AttachFile.getAttachUrl(pagename, filename, self.request, addts=1),
  38                      usemap='#'+mapid, css="drawing"))
  39          else:
  40 -            alt = title =  _('Edit drawing %(filename)s (opens in new window)') % {'filename': self.text(fname)}
  41 -            return wikiutil.link_tag(self.request,
  42 +            alt = title =  _('Edit drawing %(filename)s') % {'filename': self.text(fname)}
  43 +            return (wikiutil.link_tag(self.request,
  44                                       edit_link,
  45                                       self.image(alt=alt,
  46                                                  title=title,
  47                                                  src=AttachFile.getAttachUrl(pagename, filename, self.request, addts=1), css="drawing"),
  48 -                                     title=title)
  49 +                                     title=title) + '<span class="screenreader_info"> %s</span>' % _('(opens in new window)'))
  50  
  51  
  52      # 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.