Skip to content

Commit

Permalink
Search form works; Basic style for search results page
Browse files Browse the repository at this point in the history
Signed-off-by: Akash Manohar J <akash@akash.im>
  • Loading branch information
HashNuke committed Mar 28, 2012
1 parent 552f761 commit d7a941b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
1 change: 1 addition & 0 deletions app/assets/stylesheets/application.css.scss
Expand Up @@ -263,6 +263,7 @@ body {
padding-top: 10px;
padding-bottom: 10px;
border-bottom: 1px solid #DEE6E8;
background: #FFF;

.avatar {
float: left;
Expand Down
2 changes: 1 addition & 1 deletion app/views/main/index.html.erb
Expand Up @@ -11,7 +11,7 @@
<div class="header">
<div class="search">
<form method="get" action="/search" target="_blank">
<input type="text" class="query"/>
<input type="text" class="query" name="query"/>
</form>
</div>
<div class="logo">Kandan</div>
Expand Down
13 changes: 6 additions & 7 deletions app/views/main/search.html.erb
@@ -1,18 +1,17 @@
<%= javascript_tag do %>
$(document).ready(function(){
Kandan.Plugins.init_all()
Kandan.Plugins.initAll()
activities = <%= @activities.to_json(:include => :user).html_safe %>;

$.each(activities, function(index, activity_attributes) {
activity = new Kandan.Models.Activity(activity_attributes)
activity_view = new Kandan.Views.ShowActivity({activity: activity});
$('.activities').html(activity_view.render().el);
$.each(activities, function(index, activityAttributes) {
activity = new Kandan.Models.Activity(activityAttributes);
activityView = new Kandan.Views.ShowActivity({activity: activity});
$(".activities").append(activityView.render().el);
})
})

<%- end %>

<div class='activities'>
<div class="activities">
</div>


0 comments on commit d7a941b

Please sign in to comment.