-
Notifications
You must be signed in to change notification settings - Fork 2
[PIS-58] Add Active Admin #54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
lukaspode
wants to merge
4
commits into
gogrow-dev:main
Choose a base branch
from
GoGrow-PIS:active-admin-added
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -43,3 +43,5 @@ | |
|
|
||
| # Ignore all .pem files | ||
| *.pem | ||
|
|
||
| /node_modules | ||
This file contains hidden or 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 hidden or 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 hidden or 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,30 @@ | ||
| # frozen_string_literal: true | ||
|
|
||
| ActiveAdmin.register AdminUser do | ||
| permit_params :email, :password, :password_confirmation | ||
|
|
||
| index do | ||
| selectable_column | ||
| id_column | ||
| column :email | ||
| column :created_at | ||
| actions | ||
| end | ||
|
|
||
| show do | ||
| attributes_table do | ||
| row :id | ||
| row :email | ||
| row :created_at | ||
| end | ||
| end | ||
|
|
||
| form do |f| | ||
| f.inputs do | ||
| f.input :email | ||
| f.input :password | ||
| f.input :password_confirmation | ||
| end | ||
| f.actions | ||
| end | ||
| end |
This file contains hidden or 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 @@ | ||
| # frozen_string_literal: true | ||
|
|
||
| ActiveAdmin.register_page 'Dashboard' do | ||
| menu priority: 1, label: proc { I18n.t('active_admin.dashboard') } | ||
|
|
||
| content title: proc { I18n.t('active_admin.dashboard') } do | ||
| div class: 'blank_slate_container', id: 'dashboard_default_message' do | ||
| span class: 'blank_slate' do | ||
| span I18n.t('active_admin.dashboard_welcome.welcome') | ||
| small I18n.t('active_admin.dashboard_welcome.call_to_action') | ||
| end | ||
| end | ||
|
|
||
| # Here is an example of a simple dashboard with columns and panels. | ||
| # | ||
| # columns do | ||
| # column do | ||
| # panel "Recent Posts" do | ||
| # ul do | ||
| # Post.recent(5).map do |post| | ||
| # li link_to(post.title, admin_post_path(post)) | ||
| # end | ||
| # end | ||
| # end | ||
| # end | ||
|
|
||
| # column do | ||
| # panel "Info" do | ||
| # para "Welcome to ActiveAdmin." | ||
| # end | ||
| # end | ||
| # end | ||
| end | ||
| end |
Empty file.
This file contains hidden or 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 @@ | ||
| //= require arctic_admin/base |
This file contains hidden or 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,17 @@ | ||
| // Sass variable overrides must be declared before loading up Active Admin's styles. | ||
| // | ||
| // To view the variables that Active Admin provides, take a look at | ||
| // `app/assets/stylesheets/active_admin/mixins/_variables.scss` in the | ||
| // Active Admin source. | ||
| // | ||
| // For example, to change the sidebar width: | ||
| // $sidebar-width: 242px; | ||
|
|
||
| // Active Admin's got SASS! | ||
| @import "active_admin/mixins"; | ||
| @import "arctic_admin/base"; | ||
|
|
||
| // Overriding any non-variable Sass must be done after the fact. | ||
| // For example, to change the default status-tag color: | ||
| // | ||
| // .status_tag { background: #6090DB; } |
This file contains hidden or 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,27 @@ | ||
| # frozen_string_literal: true | ||
|
|
||
| class AdminUser < ApplicationRecord | ||
| # Include default devise modules. Others available are: | ||
| # :confirmable, :lockable, :timeoutable, :trackable and :omniauthable | ||
| devise :database_authenticatable, | ||
| :recoverable, :rememberable, :validatable | ||
| end | ||
|
|
||
| # == Schema Information | ||
| # | ||
| # Table name: admin_users | ||
| # | ||
| # id :bigint not null, primary key | ||
| # email :string default(""), not null | ||
| # encrypted_password :string default(""), not null | ||
| # remember_created_at :datetime | ||
| # reset_password_sent_at :datetime | ||
| # reset_password_token :string | ||
| # created_at :datetime not null | ||
| # updated_at :datetime not null | ||
| # | ||
| # Indexes | ||
| # | ||
| # index_admin_users_on_email (email) UNIQUE | ||
| # index_admin_users_on_reset_password_token (reset_password_token) UNIQUE | ||
| # |
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.