-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9d21f94
commit 5cbf5b1
Showing
15 changed files
with
458 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import "rails_admin/src/rails_admin/base"; | ||
import "../stylesheets/rails_admin.scss"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
@import "~rails_admin/src/rails_admin/styles/base"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
class News < ApplicationRecord | ||
belongs_to :user | ||
has_many :comments, dependent: :nullify | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
RailsAdmin.config do |config| | ||
config.asset_source = :webpacker | ||
|
||
config.main_app_name = Settings.admin_app_name | ||
|
||
config.included_models = %w(SoccerMatch News Comment User Currency UserBet Bet) | ||
|
||
config.authenticate_with do | ||
warden.authenticate! scope: :user | ||
end | ||
|
||
config.current_user_method(&:current_user) | ||
|
||
config.authorize_with do | ||
I18n.locale = params[:locale] || default_locale | ||
redirect_to main_app.root_path unless current_user.admin? | ||
end | ||
|
||
config.actions do | ||
dashboard # mandatory | ||
index # mandatory | ||
new do | ||
except %w(Bet UserBet SoccerMatch) | ||
end | ||
export do | ||
except %w(SoccerMatch) | ||
end | ||
bulk_delete | ||
show | ||
edit | ||
delete | ||
show_in_app | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,157 @@ | ||
en: | ||
admin: | ||
js: | ||
true: True | ||
false: False | ||
is_present: Is present | ||
is_blank: Is blank | ||
date: Date ... | ||
between_and_: Between ... and ... | ||
today: Today | ||
yesterday: Yesterday | ||
this_week: This week | ||
last_week: Last week | ||
time: Time ... | ||
number: Number ... | ||
contains: Contains | ||
does_not_contain: Does not contain | ||
is_exactly: Is exactly | ||
starts_with: Starts with | ||
ends_with: Ends with | ||
too_many_objects: "Too many objects, use search box above" | ||
no_objects: "No objects found" | ||
clear: Clear | ||
toggle_navigation: Toggle navigation | ||
home: | ||
name: "Home" | ||
pagination: | ||
previous: "« Prev" | ||
next: "Next »" | ||
truncate: "…" | ||
misc: | ||
search: "Search" | ||
filter: "Filter" | ||
reset_filters: "Reset filters" | ||
refresh: "Refresh" | ||
show_all: "Show all" | ||
add_filter: "Add filter" | ||
bulk_menu_title: "Selected items" | ||
remove: "Remove" | ||
add_new: "Add new" | ||
chose_all: "Choose all" | ||
clear_all: "Clear all" | ||
up: "Up" | ||
down: "Down" | ||
navigation: "Navigation" | ||
root_navigation: "Actions" | ||
navigation_static_label: "Links" | ||
log_out: "Log out" | ||
time_ago: "%{time} ago" | ||
ago: "ago" | ||
more: "Plus %{count} more %{models_name}" | ||
flash: | ||
successful: "%{name} successfully %{action}" | ||
error: "%{name} failed to be %{action}" | ||
noaction: "No actions were taken" | ||
model_not_found: "Model '%{model}' could not be found" | ||
object_not_found: "%{model} with id '%{id}' could not be found" | ||
table_headers: | ||
model_name: "Model name" | ||
last_created: "Last created" | ||
records: "Records" | ||
username: "User" | ||
changes: "Changes" | ||
created_at: "Date/Time" | ||
item: "Item" | ||
message: "Message" | ||
actions: | ||
dashboard: | ||
title: "Site Administration" | ||
menu: "Dashboard" | ||
breadcrumb: "Dashboard" | ||
index: | ||
title: "List of %{model_label_plural}" | ||
menu: "List" | ||
breadcrumb: "%{model_label_plural}" | ||
no_records: "No records found" | ||
show: | ||
title: "Details for %{model_label} '%{object_label}'" | ||
menu: "Show" | ||
breadcrumb: "%{object_label}" | ||
show_in_app: | ||
menu: "Show in app" | ||
new: | ||
title: "New %{model_label}" | ||
menu: "Add new" | ||
breadcrumb: "New" | ||
link: "Add a new %{model_label}" | ||
done: "created" | ||
edit: | ||
title: "Edit %{model_label} '%{object_label}'" | ||
menu: "Edit" | ||
breadcrumb: "Edit" | ||
link: "Edit this %{model_label}" | ||
done: "updated" | ||
delete: | ||
title: "Delete %{model_label} '%{object_label}'" | ||
menu: "Delete" | ||
breadcrumb: "Delete" | ||
link: "Delete '%{object_label}'" | ||
done: "deleted" | ||
bulk_delete: | ||
title: "Delete %{model_label_plural}" | ||
menu: "Multiple delete" | ||
breadcrumb: "Multiple delete" | ||
bulk_link: "Delete selected %{model_label_plural}" | ||
export: | ||
title: "Export %{model_label_plural}" | ||
menu: "Export" | ||
breadcrumb: "Export" | ||
link: "Export found %{model_label_plural}" | ||
bulk_link: "Export selected %{model_label_plural}" | ||
done: "exported" | ||
history_index: | ||
title: "History for %{model_label_plural}" | ||
menu: "History" | ||
breadcrumb: "History" | ||
history_show: | ||
title: "History for %{model_label} '%{object_label}'" | ||
menu: "History" | ||
breadcrumb: "History" | ||
form: | ||
cancel: "Cancel" | ||
basic_info: "Basic info" | ||
required: "Required" | ||
optional: "Optional" | ||
one_char: "character" | ||
char_length_up_to: "length up to" | ||
char_length_of: "length of" | ||
save: "Save" | ||
save_and_add_another: "Save and add another" | ||
save_and_edit: "Save and edit" | ||
delete_file: "Delete '%{field_label}' #%{number}" | ||
all_of_the_following_related_items_will_be_deleted: "? The following related items may be deleted or orphaned:" | ||
are_you_sure_you_want_to_delete_the_object: "Are you sure you want to delete this %{model_name}" | ||
confirmation: "Yes, I'm sure" | ||
bulk_delete: "The following objects will be deleted, which may delete or orphan some of their related dependencies:" | ||
new_model: "%{name} (new)" | ||
export: | ||
confirmation: "Export to %{name}" | ||
select: "Select fields to export" | ||
select_all_fields: "Select All Fields" | ||
fields_from: "Fields from %{name}" | ||
fields_from_associated: "Fields from associated %{name}" | ||
display: "Display %{name}: %{type}" | ||
options_for: "Options for %{name}" | ||
empty_value_for_associated_objects: "<empty>" | ||
click_to_reverse_selection: "Click to reverse selection" | ||
csv: | ||
header_for_root_methods: "%{name}" # 'model' is available | ||
header_for_association_methods: "%{name} [%{association}]" | ||
encoding_to: "Encode to" | ||
encoding_to_help: "Choose output encoding. Leave empty to let current input encoding untouched: (%{name})" | ||
skip_header: "No header" | ||
skip_header_help: "Do not output a header (no fields description)" | ||
default_col_sep: "," | ||
col_sep: "Column separator" | ||
col_sep_help: "Leave blank for default ('%{value}')" # value is default_col_sep |
Oops, something went wrong.