-
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.
- Loading branch information
1 parent
68e03ec
commit 62298c6
Showing
15 changed files
with
722 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
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,3 @@ | ||
ActiveAdmin.register Article do | ||
|
||
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,3 @@ | ||
ActiveAdmin.register Citation do | ||
|
||
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,29 @@ | ||
// 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: | ||
// | ||
// body.active_admin { | ||
// .status_tag { background: #6090DB; } | ||
// } | ||
// | ||
// Notice that Active Admin CSS rules are nested within a | ||
// 'body.active_admin' selector to prevent conflicts with | ||
// other pages in the app. It is best to wrap your changes in a | ||
// namespace so they are properly recognized. You have options | ||
// if you e.g. want different styles for different namespaces: | ||
// | ||
// .active_admin applies to any Active Admin namespace | ||
// .admin_namespace applies to the admin namespace (eg: /admin) | ||
// .other_namespace applies to a custom namespace named other (eg: /other) |
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,11 @@ | ||
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 | ||
|
||
# Setup accessible (or protected) attributes for your model | ||
attr_accessible :email, :password, :password_confirmation, :remember_me | ||
# attr_accessible :title, :body | ||
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,210 @@ | ||
ActiveAdmin.setup do |config| | ||
|
||
# == Site Title | ||
# | ||
# Set the title that is displayed on the main layout | ||
# for each of the active admin pages. | ||
# | ||
config.site_title = "Citecount" | ||
|
||
# Set the link url for the title. For example, to take | ||
# users to your main site. Defaults to no link. | ||
# | ||
# config.site_title_link = "/" | ||
|
||
# Set an optional image to be displayed for the header | ||
# instead of a string (overrides :site_title) | ||
# | ||
# Note: Recommended image height is 21px to properly fit in the header | ||
# | ||
# config.site_title_image = "/images/logo.png" | ||
|
||
# == Default Namespace | ||
# | ||
# Set the default namespace each administration resource | ||
# will be added to. | ||
# | ||
# eg: | ||
# config.default_namespace = :hello_world | ||
# | ||
# This will create resources in the HelloWorld module and | ||
# will namespace routes to /hello_world/* | ||
# | ||
# To set no namespace by default, use: | ||
# config.default_namespace = false | ||
# | ||
# Default: | ||
# config.default_namespace = :admin | ||
# | ||
# You can customize the settings for each namespace by using | ||
# a namespace block. For example, to change the site title | ||
# within a namespace: | ||
# | ||
# config.namespace :admin do |admin| | ||
# admin.site_title = "Custom Admin Title" | ||
# end | ||
# | ||
# This will ONLY change the title for the admin section. Other | ||
# namespaces will continue to use the main "site_title" configuration. | ||
|
||
# == User Authentication | ||
# | ||
# Active Admin will automatically call an authentication | ||
# method in a before filter of all controller actions to | ||
# ensure that there is a currently logged in admin user. | ||
# | ||
# This setting changes the method which Active Admin calls | ||
# within the controller. | ||
config.authentication_method = :authenticate_admin_user! | ||
|
||
|
||
# == Current User | ||
# | ||
# Active Admin will associate actions with the current | ||
# user performing them. | ||
# | ||
# This setting changes the method which Active Admin calls | ||
# to return the currently logged in user. | ||
config.current_user_method = :current_admin_user | ||
|
||
|
||
# == Logging Out | ||
# | ||
# Active Admin displays a logout link on each screen. These | ||
# settings configure the location and method used for the link. | ||
# | ||
# This setting changes the path where the link points to. If it's | ||
# a string, the strings is used as the path. If it's a Symbol, we | ||
# will call the method to return the path. | ||
# | ||
# Default: | ||
config.logout_link_path = :destroy_admin_user_session_path | ||
|
||
# This setting changes the http method used when rendering the | ||
# link. For example :get, :delete, :put, etc.. | ||
# | ||
# Default: | ||
# config.logout_link_method = :get | ||
|
||
# == Root | ||
# | ||
# Set the action to call for the root path. You can set different | ||
# roots for each namespace. | ||
# | ||
# Default: | ||
# config.root_to = 'dashboard#index' | ||
|
||
# == Admin Comments | ||
# | ||
# Admin comments allow you to add comments to any model for admin use. | ||
# Admin comments are enabled by default. | ||
# | ||
# Default: | ||
# config.allow_comments = true | ||
# | ||
# You can turn them on and off for any given namespace by using a | ||
# namespace config block. | ||
# | ||
# Eg: | ||
# config.namespace :without_comments do |without_comments| | ||
# without_comments.allow_comments = false | ||
# end | ||
|
||
|
||
# == Batch Actions | ||
# | ||
# Enable and disable Batch Actions | ||
# | ||
config.batch_actions = true | ||
|
||
|
||
# == Controller Filters | ||
# | ||
# You can add before, after and around filters to all of your | ||
# Active Admin resources and pages from here. | ||
# | ||
# config.before_filter :do_something_awesome | ||
|
||
|
||
# == Register Stylesheets & Javascripts | ||
# | ||
# We recommend using the built in Active Admin layout and loading | ||
# up your own stylesheets / javascripts to customize the look | ||
# and feel. | ||
# | ||
# To load a stylesheet: | ||
# config.register_stylesheet 'my_stylesheet.css' | ||
|
||
# You can provide an options hash for more control, which is passed along to stylesheet_link_tag(): | ||
# config.register_stylesheet 'my_print_stylesheet.css', :media => :print | ||
# | ||
# To load a javascript file: | ||
# config.register_javascript 'my_javascript.js' | ||
|
||
|
||
# == CSV options | ||
# | ||
# Set the CSV builder separator (default is ",") | ||
# config.csv_column_separator = ',' | ||
# | ||
# Set the CSV builder options (default is {}) | ||
# config.csv_options = {} | ||
|
||
|
||
# == Menu System | ||
# | ||
# You can add a navigation menu to be used in your application, or configure a provided menu | ||
# | ||
# To change the default utility navigation to show a link to your website & a logout btn | ||
# | ||
# config.namespace :admin do |admin| | ||
# admin.build_menu :utility_navigation do |menu| | ||
# menu.add label: "My Great Website", url: "http://www.mygreatwebsite.com", html_options: { target: :blank } | ||
# admin.add_logout_button_to_menu menu | ||
# end | ||
# end | ||
# | ||
# If you wanted to add a static menu item to the default menu provided: | ||
# | ||
# config.namespace :admin do |admin| | ||
# admin.build_menu :default do |menu| | ||
# menu.add label: "My Great Website", url: "http://www.mygreatwebsite.com", html_options: { target: :blank } | ||
# end | ||
# end | ||
|
||
# == Download Links | ||
# | ||
# You can disable download links on resource listing pages, | ||
# or customize the formats shown per namespace/globally | ||
# | ||
# To disable/customize for the :admin namespace: | ||
# | ||
# config.namespace :admin do |admin| | ||
# | ||
# # Disable the links entirely | ||
# admin.download_links = false | ||
# | ||
# # Only show XML & PDF options | ||
# admin.download_links = [:xml, :pdf] | ||
# | ||
# end | ||
|
||
|
||
# == Pagination | ||
# | ||
# Pagination is enabled by default for all resources. | ||
# You can control the default per page count for all resources here. | ||
# | ||
# config.default_per_page = 30 | ||
|
||
|
||
# == Filters | ||
# | ||
# By default the index screen includes a “Filters” sidebar on the right | ||
# hand side with a filter for each attribute of the registered model. | ||
# You can enable or disable them for all resources here. | ||
# | ||
# config.filters = true | ||
|
||
|
||
end |
Oops, something went wrong.