Skip to content

Commit

Permalink
Merged in feature/improve_views (pull request #44)
Browse files Browse the repository at this point in the history
Feature/improve views

Approved-by: İsmail Akbudak <[email protected]>
  • Loading branch information
Kemal AKIN authored and İsmail Akbudak committed Feb 27, 2019
2 parents 77c3dc5 + b6c0d0d commit f290325
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 82 deletions.
26 changes: 20 additions & 6 deletions templates/app_files/app/views/hq/audits/show.html.haml
Original file line number Diff line number Diff line change
@@ -1,8 +1,22 @@
.card
.card-header
%i.fas.fa-microchip
= t('activerecord.models.audits')
.card-body
- @audit.audited_changes.each_key do |key|
%p
%strong
- if @audit.try(:auditable_type).present?
= t("activerecord.attributes.#{@audit.try(:auditable_type).try(:underscore)}.#{key}")
= @audit.audited_changes[key]
%table.table.table-striped.table-bordered
%thead
%tr
%th{scope: 'col'}= t('activerecord.attributes.audit.action')
%th{scope: 'col'}= t('view.previous_value')
%th{scope: 'col'}= t('view.current_value')
%tbody
- @audit.audited_changes.each_key do |key|
%tr
- if @audit.try(:auditable_type).present?
%th{scope: 'row'}= t("activerecord.attributes.#{@audit.try(:auditable_type).try(:underscore)}.#{key}")
- if @audit.audited_changes[key].is_a?(Array)
%td= @audit.audited_changes[key][0]
%td= @audit.audited_changes[key][1]
- else
%td= @audit.audited_changes[key]
%td= @audit.audited_changes[key]
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
%meta{ name: 'author', content: '<%= app_name.capitalize %>' }
%link{ rel: 'shortcut icon', href: '/images/favicon.png' }

= stylesheet_link_tag 'https://use.fontawesome.com/releases/v5.0.8/css/all.css',
= stylesheet_link_tag 'https://use.fontawesome.com/releases/v5.7.0/css/all.css',
'application', media: 'all', 'data-turbolinks-track': 'reload'
= javascript_include_tag 'application',
'data-turbolinks-track': 'reload'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@
%html.no-js{ lang: I18n.locale }
%head
%title
- if content_for?(:title)
= "#{yield(:title)} - <%= app_name.capitalize %>"
- else
= '<%= app_name.capitalize %>'
= content_for?(:title) ? "#{yield(:title)} - <%= app_name.capitalize %>" : '<%= app_name.capitalize %>'
%meta{ 'http-equiv': 'content-type', content: 'text/html', charset: 'utf-8' }
%meta{ 'http-equiv': 'x-ua-compatible', content: 'ie=edge,chrome=1' }
%meta{ name: 'description', content: '<%= app_name.capitalize %>' }
Expand All @@ -25,7 +22,7 @@
= csrf_meta_tags

/ Stylesheets (Don't change include order)
= stylesheet_link_tag 'https://use.fontawesome.com/releases/v5.0.8/css/all.css',
= stylesheet_link_tag 'https://use.fontawesome.com/releases/v5.7.0/css/all.css',
'hq/application', media: 'all', 'data-turbolinks-track': 'reload'

/ Javascripts
Expand Down
34 changes: 0 additions & 34 deletions templates/config/locales/en.yml

This file was deleted.

1 change: 0 additions & 1 deletion templates/config/locales/show_for.tr.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
---
tr:
show_for:
blank: "Belirtilmemiş"
Expand Down
1 change: 0 additions & 1 deletion templates/config/locales/simple_form.tr.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
---
tr:
simple_form:
"yes": 'Evet'
Expand Down
34 changes: 0 additions & 34 deletions templates/config/locales/tr.yml

This file was deleted.

2 changes: 2 additions & 0 deletions templates/config/locales/view.en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ en:
reset: Reset
quick_search: Search...
reload: Reload
current_value: Current Value
previous_value: Previous Value
hello: "Hello %{user}"
there_is_no_data: "There is no %{resource}."
create_resource_mail_info: "When you add a new %{resource}, login information will be sent to your e-mail address."
Expand Down
2 changes: 2 additions & 0 deletions templates/config/locales/view.tr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ tr:
reset: Temizle
quick_search: Arama yap..
reload: Yeniden yükle
current_value: Şuanki Değeri
previous_value: Önceki Değeri
hello: "Merhaba %{user}"
there_is_no_data: "Hiç %{resource} eklenmemiş."
create_resource_mail_info: "Yeni bir %{resource} eklediğinizde e-posta adresine giriş bilgileri gönderilecektir."
Expand Down

0 comments on commit f290325

Please sign in to comment.