modify log

pull/26/head
ibuler@qq.com 2015-10-21 22:39:53 +08:00
parent 4baffed481
commit 79e81340dc
2 changed files with 20 additions and 4 deletions

View File

@ -204,7 +204,8 @@ def _public_perm_api(info):
new_assets.extend(user_group_permed(user_group).get('assets', []))
perm_info = {
'new': {'action': 'new user: ' + user.name, 'users': [user], 'assets': new_assets}
'action': 'new user: ' + user.name,
'new': {'users': [user], 'assets': new_assets}
}
elif info.get('type') == 'edit_user':
new_assets = []

View File

@ -40,7 +40,8 @@
<thead>
<tr>
<th class="text-center">日期</th>
<th class="text-center">结果</th>
<th class="text-center">动作</th>
<th class="text-center">成功</th>
<th class="text-center">完成</th>
</tr>
</thead>
@ -48,10 +49,13 @@
{% for log in logs %}
<tr class="gradeX">
<td class="text-center"> {{ log.datetime | date:"Y-n-d G:i:s" }} </td>
<td class="text-center"> {{ log.action }} </td>
<td class="text-center">
{{ log.result | result2bool | safe }}
<a class="log_result" value="{{ log.results }}">
{{ log.is_success | yesno:"是,否,为止" }}
</a>
</td>
<td class="text-center"> {{ log.is_finished | yesno:"是,否,为止" }} </td>
<td class="text-center"> {{ log.is_finish | yesno:"是,否,为止" }} </td>
</tr>
{% endfor %}
</tbody>
@ -71,3 +75,14 @@
</div>
{% endblock %}
{% block self_footer_js %}
<script>
$('document').ready(function(){
$('.log_result').click(function(){
alert($(this).attr('value'))
})
})
</script>
{% endblock %}