Skip to content

Commit

Permalink
show records
Browse files Browse the repository at this point in the history
  • Loading branch information
qinmingyuan committed Oct 26, 2023
1 parent 901c7eb commit 1e9e140
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 19 deletions.
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ GIT

GIT
remote: https://github.com/work-design/rails_design.git
revision: 8347a39a95ad59f0c87446b5360db06d1da4b339
revision: 92878d618942ec4127535949fc5f4b84cc8c8d83
specs:
rails_design (0.0.1)
rails

GIT
remote: https://github.com/work-design/rails_extend.git
revision: ced020805eda08fd8ab8c93c408fe2ce5439bd1f
revision: 06f605135a1f7eb8a4c94d36400c759ed60c76d9
specs:
rails_extend (1.0.1)
rails (>= 5.0)
Expand Down
25 changes: 13 additions & 12 deletions app/views/auditor/panel/audits/_index_tbody.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,19 @@
<p><%= model.remote_ip %></p>
</td>
<td><%= model.note %></td>
<td class="ui list">
<% model.audited_changes_i18n.each do |key, value| %>
<div class="item">
<div class="ui label">
<%= key %>:
<div class="detail">
<span><%= value %></span>
<i class="arrow circle right icon grey"></i>
</div>
</div>
</div>
<% end %>
<td>
<% model.audited_changes_i18n.each do |key, value| %>
<div>
<span><%= key %>:</span>
<% if value.is_a?(Array) %>
<span><%= value[0] %></span>
<i class="fa-solid fa-arrow-right"></i>
<span><%= value[1] %></span>
<% else %>
<span><%= value %></span>
<% end %>
</div>
<% end %>
</td>
<td>
<% model.related_changes.each do |key, value| %>
Expand Down
10 changes: 10 additions & 0 deletions app/views/panel/_audit_nav.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<div class="<%= active_helper(modules: 'auditor/panel', active: 'menu ex-accordion is-active', item: 'menu ex-accordion') %>" data-controller="menu empty">
<a class="menu-label" data-action="menu#toggle">
<i class="fa-solid fa-fw fa-tape"></i>
<span><%= t('auditor.panel.title') %></span>
<i class="fa-solid dropdown"></i>
</a>
<div class="menu-list" data-empty-target="content">
<%= link_to t('auditor.panel.audits.index.title'), { controller: 'auditor/panel/audits' }, class: active_helper(controllers: ['audits'], active: 'is-active') %>
</div>
</div>
18 changes: 18 additions & 0 deletions config/locales/en.controller.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
en:
auditor:
title: 操作审计
admin:
approvals:
index:
title: 待审核
audits:
index:
title: 操作日志
verifications:
new:
title: 审核
panel:
title: Audits
audits:
index:
title: Audits Log
4 changes: 0 additions & 4 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
en:
audit/admin:
checks:
new:
check: 审核
activerecord:
models:
check: 审核
Expand Down
2 changes: 1 addition & 1 deletion package.gemspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Gem::Specification.new do |s|
s.name = 'rails_audit'
s.version = '1.0.4'
s.authors = ['qinmingyuan']
s.authors = ['Mingyuan Qin']
s.email = ['[email protected]']
s.homepage = 'https://github.com/work-design/rails_audit'
s.summary = 'Audit changes for model with operator'
Expand Down

0 comments on commit 1e9e140

Please sign in to comment.