-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add activeadmin and run its standard generator
- Loading branch information
Showing
16 changed files
with
797 additions
and
0 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,20 @@ | ||
ActiveAdmin.register AdminUser do | ||
index do | ||
column :email | ||
column :current_sign_in_at | ||
column :last_sign_in_at | ||
column :sign_in_count | ||
default_actions | ||
end | ||
|
||
filter :email | ||
|
||
form do |f| | ||
f.inputs "Admin Details" do | ||
f.input :email | ||
f.input :password | ||
f.input :password_confirmation | ||
end | ||
f.actions | ||
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,33 @@ | ||
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 # content | ||
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 @@ | ||
#= require active_admin/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
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.css.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 "active_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 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,7 @@ | ||
class AdminUser < ActiveRecord::Base | ||
# Include default devise modules. Others available are: | ||
# :token_authenticatable, :confirmable, | ||
# :lockable, :timeoutable and :omniauthable | ||
devise :database_authenticatable, | ||
:recoverable, :rememberable, :trackable, :validatable | ||
end |
Oops, something went wrong.