diff options
| author | mo khan <mo@mokhan.ca> | 2014-09-02 09:49:38 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2014-09-02 09:49:38 -0600 |
| commit | 4c8b8389b45dc63b4e8ca0ea12d18446ce5a53e4 (patch) | |
| tree | 327d7a187f048f1e4be8704f2451b3a56acd4f6d | |
| parent | 8ce01b913e403dc79e27f6205a49325f1a7bb942 (diff) | |
copy the activity partials for the dashboard.
| -rw-r--r-- | app/views/my/dashboard/_comment.html.erb | 9 | ||||
| -rw-r--r-- | app/views/my/dashboard/_favorite.html.erb | 9 | ||||
| -rw-r--r-- | app/views/my/dashboard/_tutorial.html.erb | 2 | ||||
| -rw-r--r-- | app/views/my/dashboard/index.html.erb | 2 |
4 files changed, 20 insertions, 2 deletions
diff --git a/app/views/my/dashboard/_comment.html.erb b/app/views/my/dashboard/_comment.html.erb new file mode 100644 index 00000000..42567551 --- /dev/null +++ b/app/views/my/dashboard/_comment.html.erb @@ -0,0 +1,9 @@ +<div> + <i class="icon-comment icon-large"></i> + <%= avatar_for(subject.user, size: 24) %> + <%= link_to subject.user.name, profile_path(subject.user) %> commented on <%= link_to subject.creation.name, my_root_path(anchor: "cakes/#{subject.creation.id}") %> + <small><%= time_ago_in_words(subject.created_at) %> ago.</small> + <blockquote> + <%= subject.text %> + </blockquote> +</div> diff --git a/app/views/my/dashboard/_favorite.html.erb b/app/views/my/dashboard/_favorite.html.erb new file mode 100644 index 00000000..3061e33c --- /dev/null +++ b/app/views/my/dashboard/_favorite.html.erb @@ -0,0 +1,9 @@ +<div> + <p> + <i class="icon-heart icon-large"></i> + <%= avatar_for(subject.user, size: 24) %> + <%= link_to subject.user.name, profile_path(subject.user) %> added + <%= link_to subject.creation.name, my_root_path(anchor: "cakes/#{subject.creation.id}") %> to their favorites + <small><%= time_ago_in_words(subject.created_at) %> ago.</small> + </p> +</div> diff --git a/app/views/my/dashboard/_tutorial.html.erb b/app/views/my/dashboard/_tutorial.html.erb index c3a772e2..19802278 100644 --- a/app/views/my/dashboard/_tutorial.html.erb +++ b/app/views/my/dashboard/_tutorial.html.erb @@ -1,5 +1,5 @@ <div class="media"> - <%= link_to item, class: 'pull-left' do %> + <%= link_to my_root_path(anchor: "tutorials/#{item.id}"), class: 'pull-left' do %> <img class="media-object" data-src="<%= item.image_url %>" alt="64x64" style="width: 64px; height: 64px;" src="<%= item.image_url %>"> <% end %> <div class="media-body"> diff --git a/app/views/my/dashboard/index.html.erb b/app/views/my/dashboard/index.html.erb index afb17292..3dc653a1 100644 --- a/app/views/my/dashboard/index.html.erb +++ b/app/views/my/dashboard/index.html.erb @@ -31,7 +31,7 @@ <p>No new activity to report.</p> <% else %> <% @activities.each do |activity| %> - <%= render "activities/#{activity.subject.class.to_s.downcase}", subject: activity.subject %> + <%= render activity.subject.class.to_s.downcase, subject: activity.subject %> <% end %> <% end %> </div> |
