fix category setiing new problem and add ask time for admin index
This commit is contained in:
parent
e54a180511
commit
96b601074b
|
@ -92,7 +92,7 @@ class Admin::AsksController < OrbitAdminController
|
|||
@categories = @module_app.categories
|
||||
@filter_fields = filter_fields(@categories, @tags)
|
||||
# 列表欄位
|
||||
@table_fields = [:situation, :category, 'title' , 'ask.name', 'ask.phone', 'ask.appointment']
|
||||
@table_fields = [:situation, :category, 'title' , 'ask.name', 'ask.phone', 'ask.appointment','ask.created_at']
|
||||
# 列表排序
|
||||
# debugger
|
||||
if filter2("situation").blank? and filter2("identity").blank?
|
||||
|
|
|
@ -133,7 +133,9 @@
|
|||
<tr>
|
||||
<td colspan="2" style="text-align: center;">
|
||||
<%= hidden_field_tag :delete_field, nil,{'class'=> 'delete_field' } %>
|
||||
<% if !ask_setting.new_record? %>
|
||||
<%= f.hidden_field :id, value: ask_setting.id %>
|
||||
<% end %>
|
||||
<input class="btn btn-primary" type="submit" value="<%= submit_text %>">
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -17,6 +17,9 @@
|
|||
.input-area tr td {
|
||||
text-align: center;
|
||||
}
|
||||
.form-horizontal .control-label {
|
||||
padding-top: 0;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
|
@ -53,7 +56,7 @@
|
|||
<!-- <td><%# AskQuestion.human_attribute_name(:fax) %>:<%# @ask_question.fax %></td> -->
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="5"><%= t('title') %>:<%= f.text_field :title %></td>
|
||||
<td colspan="5"><%= t('title') %>:<%= @ask_question.title %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="5"><%= AskQuestion.human_attribute_name(:appointment) %>:<%= @ask_question.appointment.strftime("%Y-%m-%d %H:%M") rescue nil %></td>
|
||||
|
@ -72,18 +75,20 @@
|
|||
<tr>
|
||||
<td colspan="5">
|
||||
<%= f.label :comment %>
|
||||
<br/> <%= f.text_field :comment, style: 'width: 500px' %></td>
|
||||
<br/> <%= @ask_question.comment %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="5"><%= f.label :agree_show %><%= f.select :agree_show,[[t('ask.no'),false],[t('ask.yes'),true]] %></td>
|
||||
<td colspan="5"><%= f.label :agree_show %><%= @ask_question.agree_show ? t('ask.yes') : t('ask.no') %>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="5"><%= f.label t('situation') %> <%= f.select :situation, [
|
||||
[t('ask.is_waiting'), 'is_waiting'],
|
||||
[t('ask.is_processed'), 'is_processed'],
|
||||
[t('ask.is_referral'), 'is_referral'],
|
||||
[t('ask.is_published'),'is_published']
|
||||
] %></td>
|
||||
<td colspan="5"><%= f.label t('situation') %>
|
||||
<% tmp = {'is_waiting'=>t('ask.is_waiting'),
|
||||
'is_processed'=>t('ask.is_processed'),
|
||||
'is_referral'=>t('ask.is_referral'),
|
||||
'is_published'=>t('ask.is_published')} %>
|
||||
<%= tmp[@ask_question.situation] %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
@ -99,7 +104,7 @@
|
|||
"<div class=\"control-group\">
|
||||
<label class=\"control-label\">#{required_pattern}#{v['field'][I18n.locale]}</label>
|
||||
<div class=\"controls\">
|
||||
#{show_on_front(k,v,@ask_question.custom_values[k])}
|
||||
#{show_on_front(k,v,@ask_question.custom_values[k],true)}
|
||||
</div>
|
||||
</div>"
|
||||
end.join.html_safe %>
|
||||
|
|
|
@ -51,6 +51,7 @@
|
|||
<% if @ask_setting.default_setting['appointment'] %>
|
||||
<td><%= b.appointment.strftime("%Y-%m-%d %H:%M") rescue nil %></td>
|
||||
<% end %>
|
||||
<td><%= b.created_at.strftime("%Y-%m-%d %H:%M") rescue nil %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
|
|
|
@ -13,6 +13,7 @@ en:
|
|||
select_category: '-----Select a category-----'
|
||||
save_data: Save as pdf
|
||||
print: Print
|
||||
created_at: Ask Time
|
||||
ask_time: Ask Time
|
||||
custom_format_explain: use checkbox format to show custom-field's value
|
||||
output_result: Output result
|
||||
|
|
Loading…
Reference in New Issue