Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
warm_city
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Mykhailo Makohin
warm_city
Commits
669352b5
Commit
669352b5
authored
Sep 30, 2019
by
Mykhailo Makohin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
finish to translate adctiveadmin projects
parent
99124ecf
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
168 additions
and
119 deletions
+168
-119
Gemfile.lock
Gemfile.lock
+0
-4
projects.rb
app/admin/projects.rb
+0
-0
users.rb
app/admin/users.rb
+2
-2
project.rb
app/models/project.rb
+23
-25
user.rb
app/models/user.rb
+1
-1
active_admin.en.yml
config/locales/active_admin/active_admin.en.yml
+71
-2
active_admin.uk.yml
config/locales/active_admin/active_admin.uk.yml
+71
-2
projects.en.yml
config/locales/active_admin/projects/projects.en.yml
+0
-40
projects.uk.yml
config/locales/active_admin/projects/projects.uk.yml
+0
-43
Screenshot_from_2019-09-04_11-54-53.png
.../project/photo/18/Screenshot_from_2019-09-04_11-54-53.png
+0
-0
thumb_small_Screenshot_from_2019-09-04_11-54-53.png
...to/18/thumb_small_Screenshot_from_2019-09-04_11-54-53.png
+0
-0
Screenshot_from_2019-09-30_14-04-28.png
.../project/photo/19/Screenshot_from_2019-09-30_14-04-28.png
+0
-0
thumb_small_Screenshot_from_2019-09-30_14-04-28.png
...to/19/thumb_small_Screenshot_from_2019-09-30_14-04-28.png
+0
-0
Screenshot_from_2019-09-30_14-04-28.png
.../photo_preview/18/Screenshot_from_2019-09-30_14-04-28.png
+0
-0
thumb_small_Screenshot_from_2019-09-30_14-04-28.png
...ew/18/thumb_small_Screenshot_from_2019-09-30_14-04-28.png
+0
-0
Screenshot_from_2019-09-27_14-43-18.png
.../photo_preview/19/Screenshot_from_2019-09-27_14-43-18.png
+0
-0
thumb_small_Screenshot_from_2019-09-27_14-43-18.png
...ew/19/thumb_small_Screenshot_from_2019-09-27_14-43-18.png
+0
-0
No files found.
Gemfile.lock
View file @
669352b5
...
...
@@ -77,8 +77,6 @@ GEM
image_processing (~> 1.1)
mimemagic (>= 0.3.0)
mini_mime (>= 0.1.3)
ckeditor (5.0.0)
orm_adapter (~> 0.5.0)
cocoon (1.2.14)
coffee-rails (4.2.2)
coffee-script (>= 2.2.0)
...
...
@@ -294,7 +292,6 @@ DEPENDENCIES
byebug
cancancan
carrierwave
ckeditor
cocoon
coffee-rails (~> 4.2)
devise
...
...
@@ -303,7 +300,6 @@ DEPENDENCIES
jbuilder (~> 2.5)
jquery-rails
listen (~> 3.0.5)
mini_magick
mysql2 (>= 0.3.18, < 0.6.0)
omniauth
omniauth-facebook
...
...
app/admin/projects.rb
View file @
669352b5
This diff is collapsed.
Click to expand it.
app/admin/users.rb
View file @
669352b5
...
...
@@ -34,7 +34,7 @@ ActiveAdmin.register User do
u
.
updated_at
end
column
I18n
.
t
"active_admin.attributes.user.role"
do
|
u
|
(
t
"active_admin.attributes.user/role.
#{
u
.
role
}
"
)
"
#{
t
"active_admin.user/role.
#{
u
.
role
}
"
}
"
end
actions
end
...
...
@@ -52,7 +52,7 @@ ActiveAdmin.register User do
u
.
location
end
row
I18n
.
t
"active_admin.attributes.user.role"
do
|
u
|
(
t
"active_admin.attributes.user/role.
#{
u
.
role
}
"
)
"
#{
t
"active_admin.user/role.
#{
u
.
role
}
"
}
"
end
row
I18n
.
t
"active_admin.attributes.user.created_at"
do
|
u
|
u
.
created_at
...
...
app/models/project.rb
View file @
669352b5
class
Project
<
ApplicationRecord
mount_uploader
:photo
,
AvatarUploader
mount_uploader
:photo_preview
,
AvatarUploader
mount_uploader
:photo_before
,
AvatarUploader
mount_uploader
:photo_after
,
AvatarUploader
mount_uploader
:footer_photo
,
AvatarUploader
mount_uploader
:photo
,
AvatarUploader
mount_uploader
:photo_preview
,
AvatarUploader
mount_uploader
:photo_before
,
AvatarUploader
mount_uploader
:photo_after
,
AvatarUploader
mount_uploader
:footer_photo
,
AvatarUploader
enum
types:
[
:program
,
:project
]
enum
status:
[
:in_progress
,
:implemented
]
enum
types:
[
:program
,
:project
]
enum
status:
[
:in_progress
,
:implemented
]
has_many
:project_galeries
,
inverse_of: :project
,
dependent: :destroy
has_many
:project_qoutes
,
inverse_of: :project
,
dependent: :destroy
has_many
:project_photos
,
inverse_of: :project
,
dependent: :destroy
has_many
:project_links
,
inverse_of: :project
,
dependent: :destroy
has_many
:project_documents
,
inverse_of: :project
,
dependent: :destroy
has_many
:project_videos
,
inverse_of: :project
,
dependent: :destroy
accepts_nested_attributes_for
:project_galeries
,
reject_if: :all_blank
,
allow_destroy:
true
accepts_nested_attributes_for
:project_qoutes
,
reject_if: :all_blank
,
allow_destroy:
true
accepts_nested_attributes_for
:project_photos
,
reject_if: :all_blank
,
allow_destroy:
true
accepts_nested_attributes_for
:project_links
,
reject_if: :all_blank
,
allow_destroy:
true
accepts_nested_attributes_for
:project_documents
,
reject_if: :all_blank
,
allow_destroy:
true
accepts_nested_attributes_for
:project_videos
,
reject_if: :all_blank
,
allow_destroy:
true
has_many
:project_galeries
,
inverse_of: :project
,
dependent: :destroy
has_many
:project_qoutes
,
inverse_of: :project
,
dependent: :destroy
has_many
:project_photos
,
inverse_of: :project
,
dependent: :destroy
has_many
:project_links
,
inverse_of: :project
,
dependent: :destroy
has_many
:project_documents
,
inverse_of: :project
,
dependent: :destroy
has_many
:project_videos
,
inverse_of: :project
,
dependent: :destroy
accepts_nested_attributes_for
:project_galeries
,
reject_if: :all_blank
,
allow_destroy:
true
accepts_nested_attributes_for
:project_qoutes
,
reject_if: :all_blank
,
allow_destroy:
true
accepts_nested_attributes_for
:project_photos
,
reject_if: :all_blank
,
allow_destroy:
true
accepts_nested_attributes_for
:project_links
,
reject_if: :all_blank
,
allow_destroy:
true
accepts_nested_attributes_for
:project_documents
,
reject_if: :all_blank
,
allow_destroy:
true
accepts_nested_attributes_for
:project_videos
,
reject_if: :all_blank
,
allow_destroy:
true
validates
:photo
,
:photo_preview
,
:types
,
:status
,
:title_uk
,
:short_description_uk
,
validates
:photo
,
:photo_preview
,
:types
,
:status
,
:title_uk
,
:short_description_uk
,
:description_uk
,
:required_amount
,
presence:
true
validates_length_of
:individual_type_uk
,
:individual_type_en
,
:title_uk
,
:title_en
,
validates_length_of
:individual_type_uk
,
:individual_type_en
,
:title_uk
,
:title_en
,
:heading_uk
,
:heading_en
,
:site
,
:link_to_facebook
,
:related_links_uk
,
:related_links_en
,
maximum:
200
validates_length_of
:short_description_uk
,
:short_description_en
,
maximum:
2000
validates_length_of
:description_uk
,
:description_en
,
maximum:
5000
validates_length_of
:short_description_uk
,
:short_description_en
,
maximum:
2000
validates_length_of
:description_uk
,
:description_en
,
maximum:
5000
end
app/models/user.rb
View file @
669352b5
class
User
<
ApplicationRecord
attr_accessor
:skip_password_validation
after_initialize
:set_default_role
,
:if
=>
:new_record?
mount_uploader
:avatar
,
AvatarUploader
enum
role:
[
:user
,
:admin
]
after_initialize
:set_default_role
,
:if
=>
:new_record?
def
set_default_role
self
.
role
||=
:user
...
...
config/locales/active_admin/
users/users
.en.yml
→
config/locales/active_admin/
active_admin
.en.yml
View file @
669352b5
en
:
user
:
"
User"
admin
:
"
Admin"
formtastic
:
actions
:
create
:
"
Create
my
%{model}"
...
...
@@ -9,6 +7,12 @@ en:
cancel
:
"
Cancel
and
go
back"
dummie
:
"
Launch!"
active_admin
:
project/types
:
program
:
"
Program"
project
:
"
Project"
project/status
:
in_progress
:
"
In
progress"
implemented
:
"
Implemented"
user/role
:
admin
:
"
Admin"
user
:
"
User"
...
...
@@ -16,6 +20,9 @@ en:
user
:
one
:
"
User"
other
:
"
Users"
project
:
one
:
"
Project"
other
:
"
Projects"
attributes
:
user
:
email
:
"
Email"
...
...
@@ -27,6 +34,68 @@ en:
password
:
"
Password"
password_confirmation
:
"
Password
confirmation"
avatar
:
"
Avatar"
project
:
photo
:
"
Photo"
photo_preview
:
"
Preview
for
main
page"
photo_before
:
"
Photo
for
blinds
(before)"
remove_photo
:
"
Remove
photo"
photo_after
:
"
Photo
for
blinds
(after)"
types
:
"
Type"
status
:
"
Status"
individual_type_uk
:
"
Individual
type"
individual_type_en
:
"
Individual
type
(en)"
title_uk
:
"
Title"
title_en
:
"
Title
(en)"
heading_uk
:
"
Heading"
heading_en
:
"
Heading
(en)"
slug
:
"
Slug"
short_description_uk
:
"
Short
description"
short_description_en
:
"
Short
description
(en)"
description_uk
:
"
Description"
description_en
:
"
Description
(en)"
site
:
"
Site"
link_to_facebook
:
"
Link
to
Facebook"
required_amount
:
"
Required
amount"
related_links_uk
:
"
Related
links"
related_links_en
:
"
Related
links
(en)"
footer_photo
:
"
Footer
photo"
created_at
:
"
Created"
updated_at
:
"
Updated"
_destroy
:
"
Destroy"
project_galeries
:
photo
:
"
Photo"
name_uk
:
"
Name"
name_en
:
"
Name
en"
project_photos
:
photo
:
"
Photo"
title_uk
:
"
Name"
title_en
:
"
Name
en"
project_qoutes
:
text_over_quote_uk
:
"
Text
over
quote"
text_over_quote_en
:
"
Text
over
quote
(en)"
background_color_quote_text
:
"
Color"
icon
:
"
Icon"
text_quote_uk
:
"
Text
quote"
text_quote
:
"
Text
quote
(en)"
text_below_quote_uk
:
"
Text
below
quote"
text_below_quote
:
"
Text
below
quote
(en)"
project_links
:
site
:
"
Site"
title_uk
:
"
Title"
title_en
:
"
Title
(en)"
project_videos
:
video_file
:
"
Video
file"
video_link
:
"
Video
link"
short_description_uk
:
"
Short
description"
short_description_en
:
"
Short
description
(en)"
description_uk
:
"
Description"
description_en
:
"
Description
(en)"
project_documents
:
document_uk
:
"
Document"
document_en
:
"
Document
(en)"
document_name_uk
:
"
Document
name"
document_name_en
:
"
Document
name
(en)"
dashboard
:
Dashboard
dashboard_welcome
:
welcome
:
"
Welcome
to
Active
Admin.
This
is
the
default
dashboard
page."
...
...
config/locales/active_admin/
users/users
.uk.yml
→
config/locales/active_admin/
active_admin
.uk.yml
View file @
669352b5
uk
:
user
:
"
Користувач"
admin
:
"
Адмін"
formtastic
:
actions
:
create
:
"
Створити"
...
...
@@ -16,9 +14,18 @@ uk:
user
:
one
:
"
Користувач"
other
:
"
Користувачі"
project
:
one
:
"
Проект"
other
:
"
Проекти"
user/role
:
admin
:
"
Адмін"
user
:
"
Користувач"
project/types
:
program
:
"
Програма"
project
:
"
Проект"
project/status
:
in_progress
:
"
Триває"
implemented
:
"
Реалізовано"
attributes
:
user
:
email
:
"
Email"
...
...
@@ -30,6 +37,68 @@ uk:
password
:
"
Пароль"
password_confirmation
:
"
Підтвердження
паролю"
avatar
:
"
Аватар"
project
:
photo
:
"
Фото"
photo_preview
:
"
Прев'ю
для
головної"
photo_before
:
"
Фото
для
шторки
(до)"
remove_photo
:
"
Видалити
фото"
photo_after
:
"
Фото
для
шторки
(після)"
types
:
"
Тип"
status
:
"
Статус"
individual_type_uk
:
"
Індивідуальний
тип"
individual_type_en
:
"
Індивідуальний
тип
(анг)"
title_uk
:
"
Назва"
title_en
:
"
Назва
(анг)"
heading_uk
:
"
Заголовок"
heading_en
:
"
Заголовок
(анг)"
slug
:
"
Slug"
short_description_uk
:
"
Короткий
опис"
short_description_en
:
"
Короткий
опис
(анг)"
description_uk
:
"
Опис"
description_en
:
"
Опис
(анг)"
site
:
"
Сайт"
link_to_facebook
:
"
Посилання
Facebook"
required_amount
:
"
Необхідна
сума"
related_links_uk
:
"
Корисні
лінки"
related_links_en
:
"
Корисні
лінки
(анг)"
footer_photo
:
"
Фото
для
футера"
created_at
:
"
Створено"
updated_at
:
"
Оновлено"
_destroy
:
"
Видалити"
project_galeries
:
photo
:
"
Фото"
name_uk
:
"
Назва"
name_en
:
"
Назва
(анг)"
project_photos
:
photo
:
"
Фото"
title_uk
:
"
Назва"
title_en
:
"
Назва
(анг)"
project_qoutes
:
text_over_quote_uk
:
"
Текст
над
цитатою"
text_over_quote_en
:
"
Текст
над
цитатою
(анг)"
background_color_quote_text
:
"
Color"
icon
:
"
Іконка"
text_quote_uk
:
"
Текст
цитати"
text_quote
:
"
Текст
цитати
(анг)"
text_below_quote_uk
:
"
Текст
після
цитати"
text_below_quote
:
"
Текст
після
цитати
(анг)"
project_links
:
site
:
"
Сайт"
title_uk
:
"
Назва"
title_en
:
"
Назва
(анг)"
project_videos
:
video_file
:
"
Відео
файл"
video_link
:
"
Посилання
на
відео"
short_description_uk
:
"
Короткий
опис"
short_description_en
:
"
Короткий
опис
(анг)"
description_uk
:
"
Опис"
description_en
:
"
Опис
(анг)"
project_documents
:
document_uk
:
"
Документ"
document_en
:
"
Документ
(анг)"
document_name_uk
:
"
Назва
документу"
document_name_en
:
"
Назва
документу
(анг)"
dashboard
:
"
Панель
керування"
dashboard_welcome
:
welcome
:
"
Ласкаво
просимо
до
Active
Admin.
Це
стандартна
сторінка
керування
сайтом."
...
...
config/locales/active_admin/projects/projects.en.yml
deleted
100644 → 0
View file @
99124ecf
en
:
active_admin
:
project/types
:
program
:
"
Program"
project
:
"
Project"
project/status
:
in_progress
:
"
In
progress"
implemented
:
"
Implemented"
models
:
project
:
one
:
"
Project"
other
:
"
Projects"
attributes
:
project
:
photo
:
"
Photo"
photo_preview
:
"
Preview
for
main
page"
photo_before
:
"
Photo
for
blinds
(before)"
photo_after
:
"
Photo
for
blinds
(after)"
types
:
"
Type"
status
:
"
Status"
individual_type_uk
:
"
Individual
type"
individual_type_en
:
"
Individual
type
(en)"
title_uk
:
"
Title"
title_en
:
"
Title(en)"
heading_uk
:
"
Heading"
heading_en
:
"
Heading
(en)"
slug
:
"
Slug"
short_description_uk
:
"
Short
description"
short_description_en0
:
"
Short
description
(en)"
description_uk
:
"
Description"
description_en
:
"
Description
(en)"
site
:
"
Site"
link_to_facebook
:
"
Link
to
Facebook"
required_amount
:
"
Required
amount"
related_links_uk
:
"
Related
links"
related_links_en
:
"
Related
links
(en)"
footer_photo
:
"
Footer
photo"
created_at
:
"
Created"
updated_at
:
"
Updated"
config/locales/active_admin/projects/projects.uk.yml
deleted
100644 → 0
View file @
99124ecf
uk
:
program
:
"
Програма"
time
:
formats
:
long
:
"
%Y-%m-%d
%H:%M:%S"
active_admin
:
project
:
one
:
"
Проект"
other
:
"
Проекти"
project/types
:
program
:
"
Програма"
project
:
"
Проект"
project/status
:
in_progress
:
"
Триває"
implemented
:
"
Реалізовано"
models
:
attributes
:
project
:
photo
:
"
Фото"
photo_preview
:
"
Прев'ю
для
головної"
photo_before
:
"
Фото
для
шторки
(до)"
photo_after
:
"
Фото
для
шторки
(після)"
types
:
"
Тип"
status
:
"
Статус"
individual_type_uk
:
"
Індивідуальний
тип"
individual_type_en
:
"
Індивідуальний
тип
(анг)"
title_uk
:
"
Назва"
title_en
:
"
Назва
(анг)"
heading_uk
:
"
Заголовок"
heading_en
:
"
Заголовок
(анг)"
slug
:
"
Slug"
short_description_uk
:
"
Короткий
опис"
short_description_en0
:
"
Короткий
опис
(анг)"
description_uk
:
"
Опис"
description_en
:
"
Опис
(анг)"
site
:
"
Сайт"
link_to_facebook
:
"
Посилання
Facebook"
required_amount
:
"
Необхідна
сума"
related_links_uk
:
"
Корисні
лінки"
related_links_en
:
"
Корисні
лінки
(анг)"
footer_photo
:
"
Фото
для
футера"
created_at
:
"
Створено"
updated_at
:
"
Оновлено"
public/uploads/project/photo/18/Screenshot_from_2019-09-04_11-54-53.png
0 → 100644
View file @
669352b5
208 KB
public/uploads/project/photo/18/thumb_small_Screenshot_from_2019-09-04_11-54-53.png
0 → 100644
View file @
669352b5
24.6 KB
public/uploads/project/photo/19/Screenshot_from_2019-09-30_14-04-28.png
0 → 100644
View file @
669352b5
536 KB
public/uploads/project/photo/19/thumb_small_Screenshot_from_2019-09-30_14-04-28.png
0 → 100644
View file @
669352b5
63.5 KB
public/uploads/project/photo_preview/18/Screenshot_from_2019-09-30_14-04-28.png
0 → 100644
View file @
669352b5
536 KB
public/uploads/project/photo_preview/18/thumb_small_Screenshot_from_2019-09-30_14-04-28.png
0 → 100644
View file @
669352b5
63.5 KB
public/uploads/project/photo_preview/19/Screenshot_from_2019-09-27_14-43-18.png
0 → 100644
View file @
669352b5
446 KB
public/uploads/project/photo_preview/19/thumb_small_Screenshot_from_2019-09-27_14-43-18.png
0 → 100644
View file @
669352b5
55.5 KB
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment