half-assed attempt at tagclouds

git-svn-id: http://yolanda.mister-muffin.de/svn@416 7eef14d0-6ed0-489d-bf55-20463b2d70db
main
erlehmann 16 years ago
parent 665c2ebf0d
commit 513e106e74

@ -7,5 +7,9 @@ log = logging.getLogger(__name__)
class IndexController(BaseController):
def index(self):
raise(RuntimeError)
c.tagcloud = model.DC_Subject.query.all()
return render('/xhtml/index.mako')

@ -63,6 +63,7 @@ class UploadController(BaseController):
# Dublin Core terms
dc_title = request.params['dc_title'],
dc_alternative = request.params['dc_title'],
dc_subject = [model.DC_Subject(name=subject.lstrip()) for subject in request.params['dc_subject'].split(',')],
dc_creator = model.DC_Creator(name = request.params['dc_creator']),

@ -5,6 +5,7 @@ class Video(Entity):
# Dublin Core terms
dc_title = Field(Unicode(255))
dc_alternative = Field(Unicode(255))
dc_creator = ManyToOne('DC_Creator')
dc_subject = ManyToMany('DC_Subject')

@ -61,15 +61,21 @@ label
#results li
{
display: inline-block;
width: 216px;
}
#results li img
{
border-width: 1px;
display: block;
opacity: 0.8;
}
#results li a.title
#results li img:hover
{
opacity: 1;
}
#results li .title
{
display: block;
height: 1em;

@ -81,81 +81,13 @@ method="post">
<h1>Tagcloud</h1>
<ul>
% for tag in c.tagcloud:
<li>
<a href="" class="tag6">Proin</a>
</li>
<li>
<a href="" class="tag5">lectus</a>
</li>
<li>
<a href="" class="tag2">orci</a>
</li>
<li>
<a href="" class="tag6">venenatis</a>
</li>
<li>
<a href="" class="tag5">pharetra</a>
</li>
<li>
<a href="" class="tag6">egestas</a>
</li>
<li>
<a href="" class="tag1">id</a>
</li>
<li>
<a href="" class="tag6">tincidunt</a>
</li>
<li>
<a href="" class="tag5">vel</a>
</li>
<li>
<a href="" class="tag3">eros</a>
</li>
<li>
<a href="" class="tag6">Integer</a>
</li>
<li>
<a href="" class="tag6">risus</a>
</li>
<li>
<a href="" class="tag6">velit</a>
</li>
<li>
<a href="" class="tag2">facilisis</a>
</li>
<li>
<a href="" class="tag4">eget</a>
</li>
<li>
<a href="" class="tag5">viverra</a>
</li>
<li>
<a href="" class="tag6">et</a>
</li>
<li>
<a href="" class="tag6">leo</a>
</li>
<li>
<a href="" class="tag1">Suspendisse</a>
</li>
<li>
<a href="" class="tag3">potenti</a>
</li>
<li>
<a href="" class="tag5">Phasellus</a>
</li>
<li>
<a href="" class="tag4">auctor</a>
</li>
<li>
<a href="" class="tag6">enim</a>
</li>
<li>
<a href="" class="tag3">eget</a>
</li>
<li>
<a href="" class="tag4">sem</a>
<a href="" class="tag4">${tag.name}</a>
</li>
% endfor
</ul>
</div>

@ -13,12 +13,10 @@
% for result in c.results:
<li>
<a href="${h.url_for('video_page', video=result)}">
<img src="${result['thumbnail']}" alt='thumbnail for "${result['dc_title']}"'/>
</a>
<br />
<a href="${h.url_for('video_page', video=result)}" class="title">
${result['dc_title']}
<span class="title">
${result['dc_title']}
</span>
</a>
</li>
% endfor

@ -40,7 +40,7 @@
</div>
<div>
<label for="dc_temporal">temporal</label>
<label for="dc_temporal">time the document describes (YYYY-MM-DD HH:MM:SS)</label>
<input name="dc_temporal" type="datetime"/>
</div>

Loading…
Cancel
Save