Ejemplo n.º 1
0
def imagesLinks():
  print "<div id='editorLinks' class='adminLinks'>"
  keysAndTitles = algaePython.keysAndTitles('algaeImage', 'postTime DESC')
  for keyAndTitle in keysAndTitles:
    theImage = algaeModels.algaeImage.get(keyAndTitle[0])
    print '<div class="imageEditThumb">'
    print '<a href="admin?edit=image&amp;key=' + str(keyAndTitle[0]) + '"><img src="/images/' + theImage.cleanURL + '_sm' + theImage.fileExt() + '" alt="' + theImage.postTitle + '" /></a>'
    print "</div>"
  print "</div>"
Ejemplo n.º 2
0
def allLinksOfType(contentType, orderBy='postTime DESC'):
	print "<div id='editorLinks' class='adminLinks'>"
	keysAndTitles = algaePython.keysAndTitles(contentType, orderBy)
	for keyAndTitle in keysAndTitles:
		print '<p><a href="admin?edit=' + contentType + '&amp;key=' + str(keyAndTitle[0]) + '">' + cgi.escape(keyAndTitle[1]) + '</a></p>'
	print "</div>"