Skip to content

Commit

Permalink
#5 Add date field for static pages table
Browse files Browse the repository at this point in the history
  • Loading branch information
marjinal1st committed Jan 21, 2014
1 parent 81ab3ea commit db7e8ba
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/controllers/kebapage/static_pages_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class StaticPagesController < ApplicationController
skip_before_filter :authenticate_admin!, only: [:show]

def index
@static_pages = StaticPage.all
@static_pages = StaticPage.order('updated_at DESC')
end

def show
Expand Down
3 changes: 3 additions & 0 deletions app/views/kebapage/static_pages/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
%tr
%th #
%th #{I18n.t('kebapage.title')}
%th #{I18n.t('kebapage.date')}
%th.actions
#{I18n.t('kebapage.action')}
%tbody.success
Expand All @@ -17,6 +18,8 @@
= (@static_pages.index static_page) + 1
%td
= static_page.title
%td
= static_page.updated_at.to_date
%td.action
%a.btn.btn-success{href: main_app.pages_path(static_page), data: { toggle: 'tooltip'}, title: I18n.t('kebapage.show')}
%i.icon-zoom-in
Expand Down
1 change: 1 addition & 0 deletions config/locales/kebapage.en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ en:
file_type: 'File Type'
file_size: 'File Size'
upload_date: 'Upload Date'
date: 'Date'
3 changes: 2 additions & 1 deletion config/locales/kebapage.tr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ tr:
media_manager: 'Ortam Yöneticisi'
file_type: 'Dosya Tipi'
file_size: 'Dosya Büyüklüğü'
upload_date: 'Yükleme Tarihi'
upload_date: 'Yükleme Tarihi'
date: 'Tarih'

0 comments on commit db7e8ba

Please sign in to comment.