bhm-admin 0.3.1 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/app/views/admin/shared/_edit_base.html.haml +1 -1
- data/app/views/admin/shared/_header.html.haml +1 -1
- data/app/views/admin/shared/_new_base.html.haml +1 -1
- data/app/views/layouts/admin.html.haml +6 -6
- data/bhm-admin.gemspec +2 -2
- data/lib/bhm/admin.rb +1 -1
- data/lib/generators/bhm_admin/resource/resource_generator.rb +4 -2
- data/lib/generators/bhm_admin/resource/templates/controller.rb +1 -1
- data/lib/generators/bhm_admin/resource/templates/index.html.haml +2 -2
- data/lib/generators/bhm_admin/resource/templates/show.html.haml +1 -1
- metadata +4 -4
@@ -1,29 +1,29 @@
|
|
1
1
|
!!! 5
|
2
2
|
%html{:lang => "en", :dir => "ltr"}
|
3
3
|
%head
|
4
|
-
%title
|
5
|
-
|
4
|
+
%title #{BHM::Admin.site_name} - Admin Area
|
5
|
+
|
6
6
|
/ Stylesheets
|
7
7
|
= include_stylesheets(:admin, :media => 'screen, projection')
|
8
|
-
|
8
|
+
|
9
9
|
/ Javascripts
|
10
10
|
/[if IE]
|
11
11
|
= javascript_include_tag "http://html5shiv.googlecode.com/svn/trunk/html5.js"
|
12
12
|
= include_javascripts(:admin)
|
13
13
|
= csrf_meta_tag
|
14
14
|
= yield :extra_head
|
15
|
-
|
15
|
+
|
16
16
|
%body
|
17
17
|
#container
|
18
18
|
%header= render :partial => 'admin/shared/header'
|
19
19
|
= flash_messages :alert, :notice
|
20
|
-
|
20
|
+
|
21
21
|
%section#content-container
|
22
22
|
%section#content= yield
|
23
23
|
%section#sidebar
|
24
24
|
- sidebar_content = content_for(:sidebar)
|
25
25
|
= sidebar_content.present? ? sidebar_content : render(:partial => 'admin/shared/sidebar')
|
26
|
-
|
26
|
+
|
27
27
|
%footer
|
28
28
|
= render :partial => 'admin/shared/footer'
|
29
29
|
= yield :page_bottom
|
data/bhm-admin.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{bhm-admin}
|
8
|
-
s.version = "0.3.
|
8
|
+
s.version = "0.3.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Darcy Laycock"]
|
12
|
-
s.date = %q{2010-12-
|
12
|
+
s.date = %q{2010-12-18}
|
13
13
|
s.description = %q{Provides a reasonably dynamic and simple to use admin area for Rails 3 application. Built on a bunch of open source libraries.}
|
14
14
|
s.email = %q{sutto@sutto.net}
|
15
15
|
s.extra_rdoc_files = [
|
data/lib/bhm/admin.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
module BhmAdmin
|
2
2
|
module Generators
|
3
3
|
class ResourceGenerator < Rails::Generators::NamedBase
|
4
|
+
include Rails::Generators::ResourceHelpers
|
4
5
|
|
5
6
|
def self.source_root
|
6
7
|
@_bar_source_root ||= File.expand_path("templates", File.dirname(__FILE__))
|
@@ -9,11 +10,12 @@ module BhmAdmin
|
|
9
10
|
check_class_collision :suffix => "Controller", :prefix => "Admin::"
|
10
11
|
|
11
12
|
def create_controller_files
|
12
|
-
|
13
|
+
actual_class_path = controller_class_path + ["#{controller_file_path}_controller.rb"]
|
14
|
+
template 'controller.rb', File.join('app/controllers/admin', *actual_class_path)
|
13
15
|
end
|
14
16
|
|
15
17
|
def create_template_files
|
16
|
-
base_path = File.join("app/views/admin",
|
18
|
+
base_path = File.join("app/views/admin", *(controller_class_path + [controller_file_path]))
|
17
19
|
empty_directory base_path
|
18
20
|
%w(new edit index show _form).each do |view|
|
19
21
|
sub_path = "#{view}.html.haml"
|
@@ -1,2 +1,2 @@
|
|
1
|
-
class Admin::<%=
|
1
|
+
class Admin::<%= controller_class_name %>Controller < Admin::BaseController
|
2
2
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
%h2.title
|
1
|
+
%h2.title Viewing all #{current_resource_name.pluralize}
|
2
2
|
|
3
3
|
- column_names = default_collection_columns
|
4
4
|
|
@@ -17,5 +17,5 @@
|
|
17
17
|
%td=vwd r.try(column)
|
18
18
|
%td.actions= individual_resource_links r
|
19
19
|
= empty_row_for_collection column_names.size
|
20
|
-
|
20
|
+
|
21
21
|
= will_paginate collection
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bhm-admin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.3.
|
9
|
+
- 2
|
10
|
+
version: 0.3.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Darcy Laycock
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-12-
|
18
|
+
date: 2010-12-18 00:00:00 +08:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|