[wiki-lenny] Débuggage du portail (les liens sont parsés après) + pimpage
darcs-hash:20081211174112-bd074-5d5f6992aae94438a7333d53f2b55a5e00cbbc17.gz
This commit is contained in:
parent
4b169a49e9
commit
7e755aa879
4 changed files with 83 additions and 10 deletions
|
@ -1009,7 +1009,7 @@ document.write('<a href="#" onclick="return togglenumber(\'%s\', %d, %d);" \
|
|||
|
||||
format_pe = '''
|
||||
<div style="background:transparent url('%s') center left no-repeat;
|
||||
width: 38%%; height: 5em; padding: 0 20px 0 60px; float:left;">
|
||||
width: 38%%; height: 5em; padding: 1.5em 20px 0 60px; float:left;">
|
||||
<ul style="list-style: none;">
|
||||
<li>%s</li>
|
||||
<li>%s</li>
|
||||
|
@ -1019,9 +1019,9 @@ document.write('<a href="#" onclick="return togglenumber(\'%s\', %d, %d);" \
|
|||
format_pne = '''
|
||||
<div style="width: 38%%; height: 5em; padding: 10px 20px 0 0px; float:left;">
|
||||
<div style="float: left; padding-top: 1.5em; width: 20%%;">
|
||||
<a href="%s" style="font-size: 5pt" alt="cliquez ici pour envoyer l'image">%s</a>
|
||||
<a href="%s" style="font-size: 5pt" alt="envoyer l'image">envoyer<br>%s</a>
|
||||
</div>
|
||||
<div style="float: left; width: 80%%;">
|
||||
<div style="float: left; width: 75%%; padding: 0; margin: 0;">
|
||||
<ul style="list-style: none;">
|
||||
<li>%s</li>
|
||||
<li>%s</li>
|
||||
|
@ -1029,25 +1029,34 @@ document.write('<a href="#" onclick="return togglenumber(\'%s\', %d, %d);" \
|
|||
</div>
|
||||
</div>'''
|
||||
|
||||
pn = self.page.page_name
|
||||
|
||||
while len(entries) != 0:
|
||||
pic0, tit0, bod0 = entries[0]
|
||||
|
||||
fname= urllib.url2pathname(pic0.split('=')[-1])
|
||||
if AttachFile.exists(self.request, self.page.page_name, fname):
|
||||
fname = urllib.url2pathname(pic0)
|
||||
if AttachFile.exists(self.request, pn, fname):
|
||||
pic0 = AttachFile.getAttachUrl(pn, pic0, self.request)
|
||||
pic0 = pic0.replace('& ','&')
|
||||
html += [ format_pe % (pic0, tit0, bod0) ]
|
||||
else:
|
||||
html += [ format_pne % (pic0, pic0.split('=')[-1], tit0, bod0) ]
|
||||
pic0 = AttachFile.getAttachUrl(pn, pic0, self.request, upload=True)
|
||||
pic0 = pic0.replace('& ','&')
|
||||
html += [ format_pne % (pic0, fname, tit0, bod0) ]
|
||||
|
||||
if len(entries) >= 2:
|
||||
pic1, tit1, bod1 = entries[1]
|
||||
entries = entries[2:]
|
||||
|
||||
fname = urllib.url2pathname(pic1.split('=')[-1])
|
||||
fname = urllib.url2pathname(pic1)
|
||||
if AttachFile.exists(self.request, self.page.page_name, fname):
|
||||
pic1 = AttachFile.getAttachUrl(pn, pic1, self.request)
|
||||
# pic1 = pic1.replace('& ','&')
|
||||
html += [ format_pe % (pic1, tit1, bod1) ]
|
||||
else:
|
||||
html += [ format_pne % (pic1, pic1.split('=')[-1], tit1, bod1) ]
|
||||
pic1 = AttachFile.getAttachUrl(pn, pic1, self.request, upload=True)
|
||||
# pic1 = pic.replace('& ','&')
|
||||
html += [ format_pne % (pic1, fname, tit1, bod1) ]
|
||||
|
||||
else:
|
||||
entries = [] # plus propre que {{{ break() }}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue