contour 2.1.0.beta3 → 2.1.0.beta4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/bootstrap-overrides.css +4 -0
- data/app/assets/stylesheets/bootstrap/bs-callout.css +31 -0
- data/app/assets/stylesheets/contour.css +1 -0
- data/lib/contour/version.rb +1 -1
- data/lib/generators/contour/scaffold/templates/_form.html.erb +14 -11
- data/lib/generators/contour/scaffold/templates/show.html.erb +2 -3
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 36e3d400211a3141a9e8e6d5a53228b02b5e21a3
|
4
|
+
data.tar.gz: fa1def185d99ca806dbd1cbccf6da6fd1331a08c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c8ec19d295c87e11e1aef31af382951b8b3c60480813a344e5aca854742984ef26021e4aaffc578ed2060fe56c681c260feeaba954f30c7f406261d7d41f42a3
|
7
|
+
data.tar.gz: 132b0388bea6e9046ec6cbe59f1f57d9dd313c3307520b37e1b63a162882d4821380b975ebea76ead44be24a4eb42afd6f79f092fb0eaa1c1eede8c878438b98
|
@@ -0,0 +1,31 @@
|
|
1
|
+
/* Base styles (regardless of theme) */
|
2
|
+
.bs-callout {
|
3
|
+
margin: 20px 0;
|
4
|
+
padding: 15px 30px 15px 15px;
|
5
|
+
border-left: 5px solid #eee;
|
6
|
+
}
|
7
|
+
.bs-callout h4 {
|
8
|
+
margin-top: 0;
|
9
|
+
font-weight: 500;
|
10
|
+
}
|
11
|
+
.bs-callout p:last-child {
|
12
|
+
margin-bottom: 0;
|
13
|
+
}
|
14
|
+
.bs-callout code,
|
15
|
+
.bs-callout .highlight {
|
16
|
+
background-color: #fff;
|
17
|
+
}
|
18
|
+
|
19
|
+
/* Themes for different contexts */
|
20
|
+
.bs-callout-danger {
|
21
|
+
background-color: #fcf2f2;
|
22
|
+
border-color: #dFb5b4;
|
23
|
+
}
|
24
|
+
.bs-callout-warning {
|
25
|
+
background-color: #fefbed;
|
26
|
+
border-color: #f1e7bc;
|
27
|
+
}
|
28
|
+
.bs-callout-info {
|
29
|
+
background-color: #f0f7fd;
|
30
|
+
border-color: #d0e3f0;
|
31
|
+
}
|
@@ -4,6 +4,7 @@
|
|
4
4
|
* the top of the compiled file, but it's generally better to create a new file per style scope.
|
5
5
|
*= require_self
|
6
6
|
*= require bootstrap/v3.0.0-rc1/bootstrap
|
7
|
+
*= require bootstrap/bs-callout
|
7
8
|
*= require glyphicons
|
8
9
|
*= require bootstrap-overrides
|
9
10
|
*= require twitter-bootstrap/bootstrap-scroll-modal
|
data/lib/contour/version.rb
CHANGED
@@ -4,8 +4,8 @@
|
|
4
4
|
|
5
5
|
<%%= form_for @<%= resource_name %>, html: { class: 'form-horizontal' } do |f| %>
|
6
6
|
<%% if @<%= resource_name %>.errors.any? %>
|
7
|
-
<div id="error_explanation">
|
8
|
-
<
|
7
|
+
<div id="error_explanation" class="bs-callout bs-callout-danger">
|
8
|
+
<h4><%%= pluralize(@<%= resource_name %>.errors.count, "error") %> prohibited this <%= resource_name %> from being saved</h4>
|
9
9
|
|
10
10
|
<ul>
|
11
11
|
<%% @<%= resource_name %>.errors.full_messages.each do |msg| %>
|
@@ -16,22 +16,25 @@
|
|
16
16
|
<%% end %>
|
17
17
|
|
18
18
|
<%- columns.each do |column| -%>
|
19
|
-
<div class="
|
20
|
-
<%%= f.label :<%= column.name %>, nil, class: 'control-label' %>
|
21
|
-
<div class="
|
19
|
+
<div class="form-group">
|
20
|
+
<%%= f.label :<%= column.name %>, nil, class: 'col-lg-2 control-label' %>
|
21
|
+
<div class="col-lg-10">
|
22
22
|
<%- if column.name.split('_').last == 'id' -%>
|
23
|
-
<%%= f.select :<%= column.name %>, [['---', nil]] + <%= column.name.split('_')[0..-2].join('_').camelize %>.current.collect{|<%= column.name.first %>| [<%= column.name.first %>.name, <%= column.name.first %>.id]} %>
|
23
|
+
<%%= f.select :<%= column.name %>, [['---', nil]] + <%= column.name.split('_')[0..-2].join('_').camelize %>.current.collect{|<%= column.name.first %>| [<%= column.name.first %>.name, <%= column.name.first %>.id]}, {}, class: 'form-control' %>
|
24
24
|
<%- elsif column.field_type == :date_select -%>
|
25
|
-
<%%= f.text_field :<%= column.name %>, class: 'datepicker', value: @<%= resource_name %>.<%= column.name %> ? @<%= resource_name %>.<%= column.name %>.strftime('%m/%d/%Y') : '' %>
|
25
|
+
<%%= f.text_field :<%= column.name %>, class: 'datepicker form-control', value: @<%= resource_name %>.<%= column.name %> ? @<%= resource_name %>.<%= column.name %>.strftime('%m/%d/%Y') : '' %>
|
26
26
|
<%- else -%>
|
27
|
-
<%%= f.<%= column.field_type %> :<%= column.name %><%= ", rows: 7, style: 'width:95%'" if column.field_type == :text_area
|
27
|
+
<%%= f.<%= column.field_type %> :<%= column.name %><%= ", rows: 7, style: 'width:95%'" if column.field_type == :text_area %>, class: 'form-control' %>
|
28
28
|
<%- end -%>
|
29
29
|
</div>
|
30
30
|
</div>
|
31
31
|
|
32
32
|
<%- end -%>
|
33
|
-
|
34
|
-
|
35
|
-
|
33
|
+
|
34
|
+
<div class="form-group">
|
35
|
+
<div class="col-lg-10 col-offset-2">
|
36
|
+
<%%= f.submit nil, class: 'btn btn-primary' %>
|
37
|
+
<%%= cancel %>
|
38
|
+
</div>
|
36
39
|
</div>
|
37
40
|
<%% end %>
|
@@ -1,10 +1,9 @@
|
|
1
|
-
<%% @title =
|
1
|
+
<%% @title = @<%= resource_name %>.name %>
|
2
2
|
<div class="page-header">
|
3
3
|
<h1>
|
4
|
-
<%%= @title %>
|
4
|
+
<%%= link_to "<%= resource_title_plural %>", <%= resource_name_plural %>_path, class: 'btn btn-mini' %> · <%%= @title %>
|
5
5
|
<%%= link_to "Edit <%= resource_title %>", edit_<%= resource_name %>_path(@<%= resource_name %>), class: 'btn btn-mini' %>
|
6
6
|
<%%= link_to "Delete <%= resource_title %>", @<%= resource_name %>, method: :delete, class: 'btn btn-mini btn-danger', data: { confirm: "Are you sure you want to delete <%= resource_title %> #{@<%= resource_name %>.name}?" } %>
|
7
|
-
<%%= link_to "View <%= resource_title_plural %>", <%= resource_name_plural %>_path, class: 'btn btn-mini' %>
|
8
7
|
</h1>
|
9
8
|
</div>
|
10
9
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: contour
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.0.
|
4
|
+
version: 2.1.0.beta4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Remo Mueller
|
@@ -229,6 +229,7 @@ files:
|
|
229
229
|
- app/assets/javascripts/external/typeahead.js
|
230
230
|
- app/assets/javascripts/twitter-bootstrap/bootstrap-scroll-modal.js
|
231
231
|
- app/assets/javascripts/twitter-bootstrap/bootstrap.js.coffee
|
232
|
+
- app/assets/stylesheets/bootstrap/bs-callout.css
|
232
233
|
- app/assets/stylesheets/bootstrap/v3.0.0-rc1/bootstrap.css
|
233
234
|
- app/assets/stylesheets/bootstrap-overrides.css
|
234
235
|
- app/assets/stylesheets/contour/about.css
|