# Zuora Connect UI ## Installation Add these lines to your application's Gemfile: ```ruby gem 'zuora_connect_ui' # Peek gem 'peek' gem 'peek-git' gem 'peek-pg' gem 'peek-performance_bar' gem 'peek-redis' gem 'peek-resque' ``` And then execute: ```shell $ bundle ``` Or install it yourself as: ```shell $ gem install zuora_connect_ui ``` ## Usage ### HTML Imports Add to `
` in `layouts/application.html.erb` ```erb <%= stylesheet_link_tag "application", :media => "all"%> <%= javascript_include_tag "application" %> <%= zuo_include_tag %> <%= yield :head %> ``` If these lines are in the ``, **they are no longer necesary** as of version 0.2.9 ```html ``` ### SCSS Imports Add to `app/assets/stylesheets/application.scss` ```scss //************ Peek ************ @import "peek"; @import "peek/views/performance_bar"; @import "peek/vendor/tipsy"; @import "zuora_connect_ui"; ``` Any style you create for your app should be imported below this ### Javascript Imports Add to `app/assets/javascripts/application.js` ```javascript //************** Peek **************** //= require peek //= require peek/views/performance_bar // //= require zuora_connect_ui ``` Any scripts you create for your app should be imported below this ### Peek Add the peek initializer in `config/initializers/peek.rb`: ```ruby # List of Peek Views shown in the container require 'peek' Peek.into Peek::Views::Git if Rails.env.development? Peek.into Peek::Views::PerformanceBar Peek.into Peek::Views::PG Peek.into Peek::Views::Redis Peek.into Peek::Views::Resque Peek.into Peek::Views::Connect if Gem.loaded_specs.has_key?('zuora_connect') Peek::Railtie.configure do config.peek.adapter = :redis end ``` and the peek route in `config/routes.rb` under the `app_admin` constraint ```ruby constraints app_admin do ... mount Peek::Railtie => '/peek' end ``` ## Layout ### Admin Button Partial: `partials/admin_menu` ```erb ``` Additional links can be added by putting `Description | Status | Priority | Action |
---|---|---|---|
<%= n.metadata["description"]%> | <%= n.status %> | <%= n.priority %> |
|