.yui-b = render :partial => 'shared/admin_nav' if current_user.admin? #yui-main .yui-b .box %h3= :contests.l = link_to :new_contest.l, new_contest_path %table{:width=>"100%"} %tr %th= :date.l %th= :title.l %th= :description.l %th= :begin.l %th= :end.l %th= :actions.l - for contest in @contests %tr %td=h contest.created_at.strftime("%m/%d/%y") %td=h contest.title %td=h truncate(contest.post, 250) %td=h contest.begin.strftime("%m/%d/%y") %td=h contest.end.strftime("%m/%d/%y") %td = link_to :show.l, contest_path(contest) %br = link_to :edit.l, edit_contest_path(contest) %br = link_to :destroy.l, contest_path(contest), :confirm => :are_you_sure.l, :method => :delete