Fix PostDate && View Count Title

This commit is contained in:
JiangRu 2015-03-16 16:56:53 +08:00
parent cd5de45183
commit d5e85823fe
4 changed files with 15 additions and 0 deletions

View File

@ -51,6 +51,7 @@ class AnnouncementsController < ApplicationController
"category-head" => t('announcement.table.category'),
"link-head" => t('announcement.table.link'),
"file-head" => t('announcement.table.file'),
"view-count-head" => t('announcement.table.view_count'),
"display" => display
},
"total_pages" => announcements.total_pages

View File

@ -320,7 +320,19 @@
<% content_for :page_specific_javascript do %>
<script>
function Appendzero(obj)
{
if(obj<10) return "0" +""+ obj;
else return obj;
}
$(function() {
if (location.pathname.substr(-3)=='new'){
var getDate = new Date();
var toDay = getDate.getFullYear()+"/"+ (Appendzero(getDate.getMonth()+1))+"/"+Appendzero(getDate.getDate())+" "+Appendzero(getDate.getHours())+":"+Appendzero(getDate.getMinutes());
$('input[name="bulletin[postdate]"]').val(toDay);
}
$("#main-wrap").after("");
$(document).on('click', '#add_link', function(){

View File

@ -10,6 +10,7 @@ en:
author: Author
link: Link
File: File
view_count: View Count
add_new: Add New
approve: Approve
all_articles: All Articles

View File

@ -10,6 +10,7 @@ zh_tw:
author: 張貼人
link: 超連結
file: 檔案下載
view_count: 瀏覽人次
add_new: 新建
approve: 通過
all_articles: 文章列表