# College Admin Theme [![Gem Version](https://badge.fury.io/rb/college_admin.svg)](https://badge.fury.io/rb/college_admin) Welcome to College Admin theme. It is theme engine for making rails. It renders an administrator theme in your project. # Demo Please visit this site to see it's [demo](https://ubold.herokuapp.com/) ## Installation Add this line to your application's Gemfile: ```ruby gem 'college_admin' ``` And then execute: $ bundle Or install it yourself as: $ gem install college_admin ## Usage From your controller just call this theme engine as: `layout 'college_admin'`
Change jquery version:
This template engine needs jquery2 version. So, you have to change jquery version. Open `application.js` in `app-> assets -> javascripts` folder. Then, use `require jquery2` instead of `require jquery` and restart in your system
For adding logo:
Step 1: Make a file named `_logo.html.erb` in your `app->views->shared` folder. Write down this code in your `_logo.html.erb`: ``` <% content_for :logo do %> <% end %> ``` You can alter the logo name and path Step 2: Make file named `_extends_admin_layout.html.erb` in your `app->views->shared` folder. Then, write down this code in your `_extends_admin_layout.html.erb` ``` <%= render partial: 'shared/logo' %> ``` Step 3: Now, open in your all admin view files as example as `index.html.erb`, `edit.html.erb`, `show.html.erb` and `new.html.erb`, then write down given bellow code: ``` <%= render 'shared/extends_admin_layout' %> ```
For adding user profile:
Step 1: Make a file named `_profile.html.erb` in your `app->views->shared` folder. Write down this code in your `_profile.html.erb`: ``` <% content_for :profile do %> <% end %> ``` Step 2: Make file named `_extends_admin_layout.html.erb` in your `app->views->shared` folder. Then, write down this code in your `_extends_admin_layout.html.erb` ``` <%= render partial: 'shared/profile' %> ``` Step 3: Now, open in your all admin view files as example as `index.html.erb`, `edit.html.erb`, `show.html.erb` and `new.html.erb`, then write down given bellow code: ``` <%= render 'shared/extends_admin_layout' %> ```
For adding search:
Step 1: Make a file named `_search.html.erb` in your `app->views->shared` folder. Write down this code in your `_search.html.erb`: ``` <% content_for :search do %>
  • <% end %> ``` Step 2: Make file named `_extends_admin_layout.html.erb` in your `app->views->shared` folder. Then, write down this code in your `_extends_admin_layout.html.erb` ``` <%= render partial: 'shared/search' %> ``` Step 3: Now, open in your all admin view files as example as `index.html.erb`, `edit.html.erb`, `show.html.erb` and `new.html.erb`, then write down given bellow code: ``` <%= render 'shared/extends_admin_layout' %> ```
    For adding navigation:
    Step 1: Make a file named `_nav.html.erb` in your `app->views->shared` folder. Write down this code in your `_nav.html.erb`: ``` <% content_for :nav do %>
  • Dashboard
  • UI Kit
  • <% end %> ``` Step 2: Make file named `_extends_admin_layout.html.erb` in your `app->views->shared` folder. Then, write down this code in your `_extends_admin_layout.html.erb` ``` <%= render partial: 'shared/nav' %> ``` Step 3: Now, open in your all admin view files as example as `index.html.erb`, `edit.html.erb`, `show.html.erb` and `new.html.erb`, then write down given bellow code: ``` <%= render 'shared/extends_admin_layout' %> ```
    For adding footer:
    Step 1: Make a file named `_footer.html.erb` in your `app->views->shared` folder. Write down this code in your `_footer.html.erb`: ``` <% content_for :footer do %> <% end %> ``` Step 2: Make file named `_extends_admin_layout.html.erb` in your `app->views->shared` folder. Then, write down this code in your `_extends_admin_layout.html.erb` ``` <%= render partial: 'shared/footer' %> ``` Step 3: Now, open in your all admin view files as example as `index.html.erb`, `edit.html.erb`, `show.html.erb` and `new.html.erb`, then write down given bellow code: ``` <%= render 'shared/extends_admin_layout' %> ``` ## Contributing Bug reports and pull requests are welcome on [GitHub](https://github.com/BDMADE/college_admin).This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct. ## License The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).