Changeset 1221

Show
Ignore:
Timestamp:
08/15/08 17:05:17 (3 months ago)
Author:
kovit
Message:

Add recent journal entries into front page

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/app/views/home/index.html.erb

    r1014 r1221  
    2020  <% end -%> 
    2121 
    22   <% unless (recent_posts = Post.recent_posts(5)).nil? -%> 
     22  <% unless (recent_posts = Post.recent_posts(3)).nil? -%> 
    2323    <%= render :partial => "post/posts", :object => recent_posts, :locals => { 
    2424      :title => _("Latest Post"), 
    2525      :more_url => post_recent_url, 
    26       :full_num => 5
     26      :full_num => 3
    2727      :short => true 
    2828    } %> 
     
    9696    </tr> 
    9797  </table> 
    98  
     98    <div class="main_title"><%= _("Journal") %></div> 
     99      <% unless (recent_journal_entries = JournalEntry.recent_journal_entries(3)).nil? -%> 
     100        <%= render :partial => "journal_entries/recent_journal_entries",  
     101                   :locals => { 
     102                      :recent_journal_entries => recent_journal_entries, 
     103                      :title => _("Recent Journal Entries"), 
     104                      :more_url => journals_url 
     105                   } 
     106        %> 
     107      <% end %> 
    99108<% end -%> 
    100109