Skip to content

Commit

Permalink
searching posts: results template
Browse files Browse the repository at this point in the history
  • Loading branch information
garu committed Jun 14, 2010
1 parent 7bc3ebf commit 57a4857
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tweetylicious.pl
Expand Up @@ -361,6 +361,24 @@ package main;
</form>
</div>
@@ search.html.ep
% layout 'main';
% use Mojo::ByteStream 'b';
<div id="content" class="full ui-corner-all" style="text-align:left">
<h1>Results for '<%= param 'query' %>'</h1>
<ul class="messages">
% foreach my $post (@$post_results) {
<li class="ui-corner-all">
%# the author of the post can delete it
% if ($post->{username} eq session('name') ) {
<a href="/<%= $post->{username} %>/post/<%= $post->{id} %>/delete" class="ui-icon ui-icon-trash" title="delete this post"></a>
% }
<a class="who" href="/<%= $post->{username} %>"><img src="http://www.gravatar.com/avatar/<%= $post->{gravatar} %>?s=60.jpg" /><%= $post->{username} %></a><span class="what"><%= b($post->{content})->decode('UTF-8')->to_string %></span><span class="when"><%= $post->{date} %></span></li>
% }
</ul>
</div>
@@ index.html.ep
% layout 'main';
<div id="content" class="info full ui-corner-all">
Expand Down

0 comments on commit 57a4857

Please sign in to comment.