This commit is contained in:
lizanle 2015-01-22 16:45:18 +08:00
parent c82722c220
commit c668b72dac
1 changed files with 36 additions and 14 deletions

View File

@ -3,27 +3,49 @@
@nav_dispaly_main_project_label = 1 @nav_dispaly_main_project_label = 1
@nav_dispaly_main_contest_label = 1 %> @nav_dispaly_main_contest_label = 1 %>
<% @nav_dispaly_forum_label = 1%> <% @nav_dispaly_forum_label = 1%>
<h1>日志</h1>
<div id='tool'> <div id='tool'>
<form action="/system_log/index" style="float:right" >
<input type="text" name="search" size="36" maxlength="100" /> <script>
<input type="submit" value="搜索" id="search"/> function redo() {
window.location.reload()
}
</script>
<div id='tool-bar' style="float: left">
<%=link_to l(:label_log_detail), system_log_path %> |
<%=link_to l(:label_log_delete_log), system_log_clear_path, {:confirm => l(:label_log_delete_confirm),:day=>params[:day].nil? ? Time.now.strftime("%Y-%m-%d") : params[:day]}%> |
<%=link_to l(:label_log_access_analysis), system_log_access_analysis_path %> |
<%=link_to l(:label_log_time_analysis), system_log_time_analysis_path %> |
<%=link_to_function l(:label_log_refresh), 'redo()' %>
</div>
<div id="search-bar" style="float: right">
<form action="/system_log" style="float:right" >
<p>
<%= l(:label_log_key) %><input type="text" name="search" size="36" value="<%= params[:search] %>" maxlength="100" style="margin-right: 12px" />
</p>
<p>
&nbsp;&nbsp;&nbsp;<%=l(:label_log_time)%><input name="day" type="text" id="day" size="36" value="<%= params[:day].nil? ? Time.now.strftime("%Y-%m-%d") : params[:day] %>" maxlength="100" readonly="true" onclick="HS_setDate(this)"/>
<input type="submit" value="<%=l(:label_search_member)%>" size="30" id="search"/>
</p>
</form> </form>
<div id='tool-bar'>
<%=link_to '所有日志', :action=>:index %> |
<%=link_to '清空日志', {:action=>:clear}, {:confirm => '确认清除所有日志?'} %> |
<%=link_to_function '刷新', 'window.location.reload();' %>
</div> </div>
</div> </div>
<div>&nbsp;&nbsp;</div> <div style="clear: both">&nbsp;&nbsp;</div>
<%= paginate @logs %><br/> <div>
<%= paginate @logs unless @logs.empty? %><br/>
<% unless @logs.empty? %>
<table border="2" >
<caption font-size="30px"><%=l(:label_log_detail)%></caption>
<% @logs.each do |log| %> <% @logs.each do |log| %>
<% unless log.blank? %> <% unless log.blank? %>
<p><%= raw log %></p><hr/> <tr><td><%= raw log %></td></tr>
<% end %> <% end %>
<%end %> <%end %>
</table>
<%= paginate @logs %> <%end %>
<%= paginate @logs unless @logs.empty? %>
</div>