hobo_bootstrap 2.0.0.pre3 → 2.0.0.pre4
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +8 -8
- data/VERSION +1 -1
- data/hobo_bootstrap.gemspec +2 -2
- data/taglibs/alert_box.dryml +14 -0
- data/taglibs/error_messages.dryml +21 -0
- data/taglibs/flash_message.dryml +4 -4
- data/taglibs/forms.dryml +17 -16
- data/taglibs/index_page.dryml +12 -4
- data/taglibs/lifecycle.dryml +13 -0
- data/taglibs/show_page.dryml +10 -2
- data/vendor/assets/stylesheets/hobo_bootstrap.css +1 -0
- data/vendor/assets/stylesheets/{hobo_bootstrap_docs.css → hobo_bootstrap/hobo_bootstrap_docs.css} +0 -0
- data/vendor/assets/stylesheets/{hobo_bootstrap.scss → hobo_bootstrap/hobo_bootstrap_main.scss} +46 -0
- data/vendor/assets/stylesheets/{hobo_bootstrap_responsive.css → hobo_bootstrap/hobo_bootstrap_responsive.scss} +0 -0
- metadata +14 -10
data/README.md
CHANGED
@@ -15,7 +15,7 @@ Install instructions
|
|
15
15
|
|
16
16
|
Add this to your Gemfile
|
17
17
|
|
18
|
-
gem "hobo_bootstrap", :git => "git://github.com/
|
18
|
+
gem "hobo_bootstrap", :git => "git://github.com/Hobo/hobo_bootstrap.git"
|
19
19
|
gem 'will_paginate-bootstrap'
|
20
20
|
group :assets do
|
21
21
|
# ... Other stuff ... #
|
@@ -192,10 +192,10 @@ Notes
|
|
192
192
|
Right now, you still need to keep "hobo_clean" in your Gemfile if you want to use the Ajax search enabled by default in Hobo.
|
193
193
|
|
194
194
|
|
195
|
-
[1]: https://github.com/
|
196
|
-
[2]: https://github.com/
|
197
|
-
[3]: https://github.com/
|
198
|
-
[4]: https://github.com/
|
199
|
-
[5]: https://github.com/
|
200
|
-
[6]: https://github.com/
|
201
|
-
[7]: https://github.com/
|
195
|
+
[1]: https://github.com/Hobo/hobo_bootstrap/raw/master/screenshots/index.png
|
196
|
+
[2]: https://github.com/Hobo/hobo_bootstrap/raw/master/screenshots/login.png
|
197
|
+
[3]: https://github.com/Hobo/hobo_bootstrap/raw/master/screenshots/top_menu.png
|
198
|
+
[4]: https://github.com/Hobo/hobo_bootstrap/raw/master/screenshots/sub_menu.png
|
199
|
+
[5]: https://github.com/Hobo/hobo_bootstrap/raw/master/screenshots/responsive.png
|
200
|
+
[6]: https://github.com/Hobo/hobo_bootstrap/raw/master/screenshots/two_columns.png
|
201
|
+
[7]: https://github.com/Hobo/hobo_bootstrap/raw/master/screenshots/three_columns_complex.png
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.0.0.
|
1
|
+
2.0.0.pre4
|
data/hobo_bootstrap.gemspec
CHANGED
@@ -6,13 +6,13 @@ Gem::Specification.new do |s|
|
|
6
6
|
|
7
7
|
s.authors = ['Ignacio Huerta']
|
8
8
|
s.email = 'ignacio@ihuerta.net'
|
9
|
-
s.homepage = 'https://github.com/
|
9
|
+
s.homepage = 'https://github.com/Hobo/hobo_bootstrap'
|
10
10
|
s.rubyforge_project = 'hobo'
|
11
11
|
s.summary = 'A bootstrap based theme for Hobo'
|
12
12
|
s.description = 'A bootstrap based theme for Hobo'
|
13
13
|
|
14
14
|
s.add_runtime_dependency('hobo', "~> 2.0.0.pre1")
|
15
|
-
s.add_runtime_dependency('hobo_jquery_ui',
|
15
|
+
s.add_runtime_dependency('hobo_jquery_ui', "~> 2.0.0.pre1")
|
16
16
|
s.add_runtime_dependency "compass_twitter_bootstrap", "~> 2.0.3"
|
17
17
|
s.add_runtime_dependency "compass-rails", "~> 1.0.3"
|
18
18
|
s.add_runtime_dependency "will_paginate-bootstrap", "~> 0.2.1"
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<!-- Renders an alert with bootstrap style
|
2
|
+
|
3
|
+
### Attributes
|
4
|
+
|
5
|
+
- `type`: chooses which flash message to display and also the box style. The default is `notice`. `error`, `success` and `info` also have styling.
|
6
|
+
- `no-close`: if set, the alert doesn't have a close button
|
7
|
+
-->
|
8
|
+
<def tag="alert-box" attrs="type, no-close">
|
9
|
+
<% type = type ? type.to_sym : :notice -%>
|
10
|
+
<div class="alert alert-#{type}" unless="&no_close" merge-attrs>
|
11
|
+
<a class="close" data-dismiss="alert" href="#" param="close">×</a>
|
12
|
+
<span param="default"/>
|
13
|
+
</div>
|
14
|
+
</def>
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<!-- Renders a localized list of error messages following a form submission. Expects the errors to be in `this.errors`. Renders nothing if there are no errors.
|
2
|
+
-->
|
3
|
+
<def tag="error-messages">
|
4
|
+
<section class="error-messages alert" merge-attrs if="&this.errors.size > 0">
|
5
|
+
<h2 param="heading">
|
6
|
+
<t key="activerecord.errors.template.header" model="&this.class.model_name.human" count="&this.errors.size">
|
7
|
+
<%= model = this.class.model_name.human
|
8
|
+
count = this.errors.size
|
9
|
+
count==1 ? "1 error prohibited this #{model} from being saved" :
|
10
|
+
"#{count} errors prohibited this #{model} from being saved"
|
11
|
+
%>
|
12
|
+
</t>
|
13
|
+
</h2>
|
14
|
+
<t key="activerecord.errors.template.body">There were problems with the following fields:</t>
|
15
|
+
<ul param class="alert-block">
|
16
|
+
<% this.errors.to_a.each do |message| -%>
|
17
|
+
<li param><%= message %></li>
|
18
|
+
<% end -%>
|
19
|
+
</ul>
|
20
|
+
</section>
|
21
|
+
</def>
|
data/taglibs/flash_message.dryml
CHANGED
@@ -3,11 +3,11 @@
|
|
3
3
|
### Attributes
|
4
4
|
|
5
5
|
- `type`: chooses which flash message to display and also the box style. The default is `notice`. `error`, `success` and `info` also have styling.
|
6
|
+
- `no-close`: if set, the alert doesn't have a close button
|
6
7
|
-->
|
7
8
|
<def tag="flash-message" attrs="type">
|
8
9
|
<% type = type ? type.to_sym : :notice -%>
|
9
|
-
<
|
10
|
-
|
11
|
-
|
12
|
-
</div>
|
10
|
+
<alert-box merge type="&type" if="&flash[type]">
|
11
|
+
<%= flash[type] %>
|
12
|
+
</alert-box>
|
13
13
|
</def>
|
data/taglibs/forms.dryml
CHANGED
@@ -3,14 +3,23 @@
|
|
3
3
|
<!--</def>-->
|
4
4
|
|
5
5
|
|
6
|
+
<%# When using field-lists, remember to add the form-horizontal class to get the bootstrap looks (this is done automatically in forms and show-page).
|
7
|
+
<div class="form-horizontal">
|
8
|
+
<field-list class="form-horizontal" with="&Project.first"/>
|
9
|
+
</div>
|
10
|
+
%>
|
6
11
|
|
12
|
+
<def tag="field-list">
|
13
|
+
<bootstrap-fields merge/>
|
14
|
+
</def>
|
7
15
|
|
16
|
+
<%# This tag adds the class 'uneditable-input' to a view. This is very useful with `<bootstrap-fields>`, which is the default `<field-list>` for hobo_bootstrap. Use like so:
|
8
17
|
|
9
18
|
|
10
|
-
|
11
|
-
|
12
|
-
<def tag="
|
13
|
-
<
|
19
|
+
<field-list class="form-horizontal" tag="uneditable-input">
|
20
|
+
%>
|
21
|
+
<def tag="uneditable-input">
|
22
|
+
<view merge class="uneditable-input"/>
|
14
23
|
</def>
|
15
24
|
|
16
25
|
<def tag="bootstrap-fields" attrs="size, columns, tag, no-edit, required, no-blanks">
|
@@ -27,7 +36,7 @@
|
|
27
36
|
-%>
|
28
37
|
<div
|
29
38
|
class="control-group #{'required' if required.include?(scope.field_name)}"
|
30
|
-
unless="&(tag == 'input' && no_edit == 'skip' && !can_edit?) || (tag == 'view' && no_blanks && this.blank?)"
|
39
|
+
unless="&(tag == 'input' && no_edit == 'skip' && !can_edit?) || ((tag == 'view' || tag == 'uneditable-input') && no_blanks && this.blank?)"
|
31
40
|
param="#{field_method}-field">
|
32
41
|
|
33
42
|
<label class="control-label" for="&id_for_this" param="#{field_method}-label" unless="&field_name.blank?">
|
@@ -55,14 +64,6 @@
|
|
55
64
|
</old-form:>
|
56
65
|
</extend>
|
57
66
|
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
67
|
<!--
|
67
68
|
Like `<with-fields>`, but groups fields into columns in a bootstrap-friendly fashion.
|
68
69
|
|
@@ -168,12 +169,12 @@ Supports all attributes supported by `<with-fields>` plus:
|
|
168
169
|
<def tag="one-line-form" attrs="fields">
|
169
170
|
<div class="row">
|
170
171
|
<div class="span12">
|
171
|
-
<form class="inline-form well" merge
|
172
|
+
<form class="inline-form well" remove-class="form-horizontal" merge>
|
172
173
|
<field-list: replace>
|
173
|
-
<one-line-field-list fields="&fields"/>
|
174
|
+
<one-line-field-list param="field-list" fields="&fields"/>
|
174
175
|
</field-list:>
|
175
176
|
<actions: replace>
|
176
|
-
<button class="btn btn-primary" type="submit">
|
177
|
+
<button class="btn btn-primary" type="submit" param="submit">
|
177
178
|
+
|
178
179
|
</button>
|
179
180
|
</actions:>
|
data/taglibs/index_page.dryml
CHANGED
@@ -3,13 +3,21 @@
|
|
3
3
|
<a with="&this_parent" action="edit">
|
4
4
|
<i class="icon icon-edit"></i>
|
5
5
|
</a>
|
6
|
-
|
6
|
+
<% if can_delete?(this_parent) %>
|
7
|
+
<%= link_to '<i class=\'icon-trash\'></i>'.html_safe, this_parent, :'data-confirm' => t('hobo.messages.confirm', :default=>'Are you sure?'), :method => :delete %>
|
8
|
+
<% end %>
|
7
9
|
</def>
|
8
10
|
|
9
11
|
<extend tag="index-page">
|
10
|
-
<old-index-page: merge>
|
12
|
+
<old-index-page: without-count without-top-page-nav merge>
|
11
13
|
|
12
|
-
<new-link:
|
14
|
+
<new-link: replace/>
|
15
|
+
<content-header: class="well"/>
|
16
|
+
<before-heading:>
|
17
|
+
<a action="new" to="&model" param="new-link" class="btn pull-right btn-primary">
|
18
|
+
<ht key="#{model.to_s}.actions.new">New <%= model %></ht>
|
19
|
+
</a>
|
20
|
+
</before-heading:>
|
13
21
|
|
14
22
|
<collection: replace>
|
15
23
|
<%
|
@@ -24,7 +32,7 @@
|
|
24
32
|
field_names = field_names.join(', ')
|
25
33
|
end
|
26
34
|
%>
|
27
|
-
<table class="table table-striped" without-header
|
35
|
+
<table class="table table-striped table-bordered" without-header
|
28
36
|
fields="&field_names" param="collection">
|
29
37
|
<actions-label:>
|
30
38
|
<t key="hobo.messages.actions">Actions</t>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<!--Add a btn class to transition buttons-->
|
2
|
+
|
3
|
+
<def tag="transition-buttons">
|
4
|
+
<% ajax_attrs, html_attrs = attributes.partition_hash(HoboRapidHelper::AJAX_ATTRS) %>
|
5
|
+
<div merge-attrs="&html_attrs" class="transitions">
|
6
|
+
<% transitions = this.lifecycle.publishable_transitions_for(current_user) %>
|
7
|
+
<if test="&transitions">
|
8
|
+
<% transitions.each do |t| %>
|
9
|
+
<transition-button merge-attrs="&ajax_attrs" transition="&t" class="btn"/>
|
10
|
+
<% end %>
|
11
|
+
</if>
|
12
|
+
</div>
|
13
|
+
</def>
|
data/taglibs/show_page.dryml
CHANGED
@@ -1,7 +1,15 @@
|
|
1
1
|
<extend tag="show-page">
|
2
2
|
<old-show-page: merge>
|
3
3
|
<field-list: class="form-horizontal"/>
|
4
|
-
|
5
|
-
<
|
4
|
+
|
5
|
+
<before-heading:>
|
6
|
+
<a action="edit" if="&can_edit?" param="edit-link" class="btn pull-right">
|
7
|
+
<ht key="#{model.to_s}.actions.edit">Edit <%= model %></ht>
|
8
|
+
</a>
|
9
|
+
</before-heading:>
|
10
|
+
|
11
|
+
<edit-link: replace/>
|
12
|
+
|
13
|
+
<content-header: class="well"/>
|
6
14
|
</old-show-page:>
|
7
15
|
</extend>
|
@@ -0,0 +1 @@
|
|
1
|
+
//= require_tree './hobo_bootstrap'
|
data/vendor/assets/stylesheets/{hobo_bootstrap_docs.css → hobo_bootstrap/hobo_bootstrap_docs.css}
RENAMED
File without changes
|
data/vendor/assets/stylesheets/{hobo_bootstrap.scss → hobo_bootstrap/hobo_bootstrap_main.scss}
RENAMED
@@ -1,3 +1,4 @@
|
|
1
|
+
|
1
2
|
@import "compass_twitter_bootstrap";
|
2
3
|
|
3
4
|
/* Top menu bar (app name, login...):
|
@@ -43,6 +44,10 @@ h2.heading{
|
|
43
44
|
margin-bottom:10px;
|
44
45
|
line-height:24px;
|
45
46
|
}
|
47
|
+
.index-page h2.heading{
|
48
|
+
margin-bottom:0px;
|
49
|
+
line-height:26px;
|
50
|
+
}
|
46
51
|
|
47
52
|
/* hidden-fields */
|
48
53
|
div.hidden-fields {
|
@@ -82,3 +87,44 @@ li.input-many-template { display:none; }
|
|
82
87
|
|
83
88
|
/* collection */
|
84
89
|
ul.collection > li { margin-left: 0; list-style: none;}
|
90
|
+
ul.collection { margin-left: 0;}
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
/* Show page */
|
95
|
+
.show-page .content-body .description{
|
96
|
+
margin-bottom:10px;
|
97
|
+
}
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
/* Icon URLs */
|
102
|
+
[class^="icon-"], [class*=" icon-"] {
|
103
|
+
background-image: url("../glyphicons-halflings.png");
|
104
|
+
}
|
105
|
+
.icon-white {
|
106
|
+
background-image: url("../glyphicons-halflings-white.png");
|
107
|
+
}
|
108
|
+
|
109
|
+
|
110
|
+
/* The hidden class is used by Hobo */
|
111
|
+
.hidden{
|
112
|
+
display:none;
|
113
|
+
}
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
/* Field-lists alignment and details*/
|
118
|
+
.form-horizontal .control-label {
|
119
|
+
font-weight: bold;
|
120
|
+
}
|
121
|
+
.form-horizontal .controls {
|
122
|
+
padding-top:5px;
|
123
|
+
}
|
124
|
+
.form-horizontal input, .form-horizontal textarea, .form-horizontal select, .form-horizontal .help-inline, .form-horizontal .uneditable-input, .form-horizontal .input-prepend, .form-horizontal .input-append {
|
125
|
+
margin-top:-5px;
|
126
|
+
}
|
127
|
+
.control-group.required .control-label:after {
|
128
|
+
content:"*";
|
129
|
+
color: #C62121;
|
130
|
+
}
|
File without changes
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hobo_bootstrap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.0.
|
4
|
+
version: 2.0.0.pre4
|
5
5
|
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-10-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: hobo
|
@@ -32,17 +32,17 @@ dependencies:
|
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
33
33
|
none: false
|
34
34
|
requirements:
|
35
|
-
- -
|
35
|
+
- - ~>
|
36
36
|
- !ruby/object:Gem::Version
|
37
|
-
version: 2.0.0.
|
37
|
+
version: 2.0.0.pre1
|
38
38
|
type: :runtime
|
39
39
|
prerelease: false
|
40
40
|
version_requirements: !ruby/object:Gem::Requirement
|
41
41
|
none: false
|
42
42
|
requirements:
|
43
|
-
- -
|
43
|
+
- - ~>
|
44
44
|
- !ruby/object:Gem::Version
|
45
|
-
version: 2.0.0.
|
45
|
+
version: 2.0.0.pre1
|
46
46
|
- !ruby/object:Gem::Dependency
|
47
47
|
name: compass_twitter_bootstrap
|
48
48
|
requirement: !ruby/object:Gem::Requirement
|
@@ -109,14 +109,17 @@ files:
|
|
109
109
|
- screenshots/three_columns_complex.png
|
110
110
|
- screenshots/top_menu.png
|
111
111
|
- screenshots/two_columns.png
|
112
|
+
- taglibs/alert_box.dryml
|
112
113
|
- taglibs/buttons.dryml
|
113
114
|
- taglibs/card.dryml
|
114
115
|
- taglibs/delete_button.dryml
|
115
116
|
- taglibs/edit_page.dryml
|
117
|
+
- taglibs/error_messages.dryml
|
116
118
|
- taglibs/flash_message.dryml
|
117
119
|
- taglibs/forms.dryml
|
118
120
|
- taglibs/hobo_bootstrap.dryml
|
119
121
|
- taglibs/index_page.dryml
|
122
|
+
- taglibs/lifecycle.dryml
|
120
123
|
- taglibs/login.dryml
|
121
124
|
- taglibs/nav.dryml
|
122
125
|
- taglibs/page.dryml
|
@@ -127,10 +130,11 @@ files:
|
|
127
130
|
- taglibs/tabs.dryml
|
128
131
|
- vendor/assets/images/ajax-loader.gif
|
129
132
|
- vendor/assets/javascripts/hobo_bootstrap.js
|
130
|
-
- vendor/assets/stylesheets/hobo_bootstrap.
|
131
|
-
- vendor/assets/stylesheets/hobo_bootstrap_docs.css
|
132
|
-
- vendor/assets/stylesheets/
|
133
|
-
|
133
|
+
- vendor/assets/stylesheets/hobo_bootstrap.css
|
134
|
+
- vendor/assets/stylesheets/hobo_bootstrap/hobo_bootstrap_docs.css
|
135
|
+
- vendor/assets/stylesheets/hobo_bootstrap/hobo_bootstrap_main.scss
|
136
|
+
- vendor/assets/stylesheets/hobo_bootstrap/hobo_bootstrap_responsive.scss
|
137
|
+
homepage: https://github.com/Hobo/hobo_bootstrap
|
134
138
|
licenses: []
|
135
139
|
post_install_message:
|
136
140
|
rdoc_options:
|