Skip to content

Commit

Permalink
#29 bootstrap3 class added to generator and theme
Browse files Browse the repository at this point in the history
  • Loading branch information
adamdilek committed Sep 18, 2013
1 parent 6a88594 commit 72c0859
Show file tree
Hide file tree
Showing 10 changed files with 144 additions and 135 deletions.
56 changes: 30 additions & 26 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,53 +2,57 @@
#### [Current]

####
* [7c1f307](../../commit/7c1f307) - __(Muhammet DİLEK)__ [#20](../../issues/20) show_for config added
* [ca81bb4](../../commit/ca81bb4) - __(Muhammet DİLEK)__ [#20](../../issues/20) detail page added
* [6a88594](../../commit/6a88594) - __(Muhammet DILEK)__ scheme.rb fixed
* [361c26d](../../commit/361c26d) - __(Muhammet DILEK)__ [#20](../../issues/20) blank list and filter partial added to scaffold generator
* [89d3fd5](../../commit/89d3fd5) - __(Onur zgr ZKAN)__ Update README.md
* [6f57aa7](../../commit/6f57aa7) - __(Ahmet Sezgin Duran)__ Update README.md
* [7c1f307](../../commit/7c1f307) - __(Muhammet DILEK)__ [#20](../../issues/20) show_for config added
* [ca81bb4](../../commit/ca81bb4) - __(Muhammet DILEK)__ [#20](../../issues/20) detail page added
* [19c5718](../../commit/19c5718) - __(Ahmet Sezgin Duran)__ Update README.md
* [560fd1b](../../commit/560fd1b) - __(Ahmet Sezgin Duran)__ [#24](../../issues/24) Clean up code and add login links to README.md
* [c581aa2](../../commit/c581aa2) - __(Ahmet Sezgin Duran)__ [#24](../../issues/24) Create default users for development and update README.md
* [1943cab](../../commit/1943cab) - __(Muhammet DİLEK)__ [#20](../../issues/20) edit and new page added
* [6206a77](../../commit/6206a77) - __(Muhammet DİLEK)__ [#20](../../issues/20) pagination view added
* [3c7bf81](../../commit/3c7bf81) - __(Muhammet DİLEK)__ [#20](../../issues/20) ransack form added
* [1943cab](../../commit/1943cab) - __(Muhammet DILEK)__ [#20](../../issues/20) edit and new page added
* [6206a77](../../commit/6206a77) - __(Muhammet DILEK)__ [#20](../../issues/20) pagination view added
* [3c7bf81](../../commit/3c7bf81) - __(Muhammet DILEK)__ [#20](../../issues/20) ransack form added
* [f2b7ce3](../../commit/f2b7ce3) - __(emineeliftoscali)__ [#23](../../issues/23) Gems Updated with latest versions

- Devise secret key added

* [a862452](../../commit/a862452) - __(emineeliftoscali)__ [#23](../../issues/23) Gems Updated with latest versions
* [8d31387](../../commit/8d31387) - __(Onur Özgür ÖZKAN)__ [#6](../../issues/6) Add header to README.md
* [8d31387](../../commit/8d31387) - __(Onur zgr ZKAN)__ [#6](../../issues/6) Add header to README.md
* [ee34b62](../../commit/ee34b62) - __(kadriye)__ [#6](../../issues/6) mail fixed on README.md
* [3622339](../../commit/3622339) - __(kadriye)__ [#6](../../issues/6) README.md updated
* [c2cab5d](../../commit/c2cab5d) - __(Ahmet Sezgin Duran)__ [#19](../../issues/19) Add README.md markdown for Travis CI
* [13a97e6](../../commit/13a97e6) - __(Muhammet DİLEK)__ [#20](../../issues/20) ransack added
* [f1f8c33](../../commit/f1f8c33) - __(Muhammet DİLEK)__ merge
* [28ec222](../../commit/28ec222) - __(Muhammet DİLEK)__ [#20](../../issues/20) index improved
* [453767f](../../commit/453767f) - __(Muhammet DİLEK)__ merge
* [e471486](../../commit/e471486) - __(Muhammet DİLEK)__ [#16](../../issues/16) add csrf_meta_tags to layouts
* [13a97e6](../../commit/13a97e6) - __(Muhammet DILEK)__ [#20](../../issues/20) ransack added
* [f1f8c33](../../commit/f1f8c33) - __(Muhammet DILEK)__ merge
* [28ec222](../../commit/28ec222) - __(Muhammet DILEK)__ [#20](../../issues/20) index improved
* [453767f](../../commit/453767f) - __(Muhammet DILEK)__ merge
* [e471486](../../commit/e471486) - __(Muhammet DILEK)__ [#16](../../issues/16) add csrf_meta_tags to layouts
* [c338d33](../../commit/c338d33) - __(Ahmet Sezgin Duran)__ [#18](../../issues/18) Change default database of development to Sqlite3
* [9429352](../../commit/9429352) - __(Muhammet DİLEK)__ [#20](../../issues/20) form improved
* [f07214a](../../commit/f07214a) - __(Muhammet DİLEK)__ [#21](../../issues/21) error class changed
* [9429352](../../commit/9429352) - __(Muhammet DILEK)__ [#20](../../issues/20) form improved
* [f07214a](../../commit/f07214a) - __(Muhammet DILEK)__ [#21](../../issues/21) error class changed
* [52318cd](../../commit/52318cd) - __(Ahmet Sezgin Duran)__ [#19](../../issues/19) Fix README.md markdown of Gemnasium
* [664c51a](../../commit/664c51a) - __(Ahmet Sezgin Duran)__ [#19](../../issues/19) Add README.md markdowns for Code Climate and Gemnasium
* [d62da34](../../commit/d62da34) - __(Muhammet DİLEK)__ [#21](../../issues/21) file changed
* [fe16c6e](../../commit/fe16c6e) - __(Muhammet DİLEK)__ [#16](../../issues/16) application layout changed
* [e28bc55](../../commit/e28bc55) - __(Muhammet DİLEK)__ [#21](../../issues/21) Simple form improved for bootstrap 3
* [d62da34](../../commit/d62da34) - __(Muhammet DILEK)__ [#21](../../issues/21) file changed
* [fe16c6e](../../commit/fe16c6e) - __(Muhammet DILEK)__ [#16](../../issues/16) application layout changed
* [e28bc55](../../commit/e28bc55) - __(Muhammet DILEK)__ [#21](../../issues/21) Simple form improved for bootstrap 3
* [eff7256](../../commit/eff7256) - __(Ahmet Sezgin Duran)__ [#19](../../issues/19) Add configuration file for Travis CI
* [7c7fa5b](../../commit/7c7fa5b) - __(Muhammet DİLEK)__ [#16](../../issues/16) form page added
* [aca6f8b](../../commit/aca6f8b) - __(Muhammet DİLEK)__ [#16](../../issues/16) tables page added
* [0008243](../../commit/0008243) - __(Muhammet DİLEK)__ [#16](../../issues/16) view helper moved to application helper
* [b39c20a](../../commit/b39c20a) - __(Muhammet DİLEK)__ [#16](../../issues/16) hq namespace base layout added
* [f954448](../../commit/f954448) - __(Muhammet DİLEK)__ [#16](../../issues/16) login layout added
* [51e9f1f](../../commit/51e9f1f) - __(Muhammet DİLEK)__ [#16](../../issues/16) partials added
* [7c7fa5b](../../commit/7c7fa5b) - __(Muhammet DILEK)__ [#16](../../issues/16) form page added
* [aca6f8b](../../commit/aca6f8b) - __(Muhammet DILEK)__ [#16](../../issues/16) tables page added
* [0008243](../../commit/0008243) - __(Muhammet DILEK)__ [#16](../../issues/16) view helper moved to application helper
* [b39c20a](../../commit/b39c20a) - __(Muhammet DILEK)__ [#16](../../issues/16) hq namespace base layout added
* [f954448](../../commit/f954448) - __(Muhammet DILEK)__ [#16](../../issues/16) login layout added
* [51e9f1f](../../commit/51e9f1f) - __(Muhammet DILEK)__ [#16](../../issues/16) partials added
* [a9663dc](../../commit/a9663dc) - __(Onur Ozgur OZKAN)__ [#9](../../issues/9) Setup mailchimp settings
* [740c66a](../../commit/740c66a) - __(Muhammet DİLEK)__ [#16](../../issues/16) hierapolis assets added under the vendor
* [740c66a](../../commit/740c66a) - __(Muhammet DILEK)__ [#16](../../issues/16) hierapolis assets added under the vendor
* [a7f31ef](../../commit/a7f31ef) - __(Onur Ozgur OZKAN)__ [#13](../../issues/13) Set staging env
* [d24d060](../../commit/d24d060) - __(Muhammet DİLEK)__ [#16](../../issues/16) bootstrap-sass gem updated for bootstrap 3
* [d24d060](../../commit/d24d060) - __(Muhammet DILEK)__ [#16](../../issues/16) bootstrap-sass gem updated for bootstrap 3
* [8183086](../../commit/8183086) - __(Onur Ozgur OZKAN)__ [#15](../../issues/15) Set racktime out
* [2cac814](../../commit/2cac814) - __(Onur Ozgur OZKAN)__ [#12](../../issues/12) Set default timezone and i18n
* [6538045](../../commit/6538045) - __(Onur Ozgur OZKAN)__ [#14](../../issues/14) Vulnerability Note VU[#380039](../../issues/380039)
* [777623b](../../commit/777623b) - __(Onur Ozgur OZKAN)__ [#11](../../issues/11) Add .ruby-version file
* [071d9d8](../../commit/071d9d8) - __(Onur Ozgur OZKAN)__ [#10](../../issues/10) Add .editorconfig file
* [1a7c073](../../commit/1a7c073) - __(Onur Ozgur OZKAN)__ [#8](../../issues/8) Add VERSION.txt
* [f404cc1](../../commit/f404cc1) - __(Onur Ozgur OZKAN)__ [#7](../../issues/7) Add CHANGELOG.md
* [1a31842](../../commit/1a31842) - __(Muhammet DİLEK)__ [#5](../../issues/5) project created with cybele
* [20f347a](../../commit/20f347a) - __(Muhammet DİLEK)__ Initial commit
* [1a31842](../../commit/1a31842) - __(Muhammet DILEK)__ [#5](../../issues/5) project created with cybele
* [20f347a](../../commit/20f347a) - __(Muhammet DILEK)__ Initial commit
5 changes: 5 additions & 0 deletions app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,9 @@ def page(title, id)
def launcher_active(page)
@page_id == page ? {class:'active'} : {}
end

def blankable(contents)
render partial: contents.size == 0 ? 'blank' : 'list'
end

end
3 changes: 2 additions & 1 deletion app/views/layouts/partials/_toolbar.haml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
#toolbar
= yield :toolbar
.btn-group
= yield :toolbar
2 changes: 1 addition & 1 deletion lib/templates/haml/scaffold/_form.html.haml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.panel
.panel.panel-default
.panel-heading
%i.icon-edit.icon-large
= yield :form_title
Expand Down
42 changes: 21 additions & 21 deletions lib/templates/haml/scaffold/_list.html.haml
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
.panel-heading
%i.icon-table.icon-large
= t('tt.index', resource_name: <%= singular_table_name.capitalize %>.model_name.human)
.panel-tools
.btn-group
%a.btn{href: '#'}
%i.icon-wrench
Settings
%a.btn{href: '#'}
%i.icon-filter
Filters
%a.btn{href: <%= index_helper %>_path, data: {toggle: 'toolbar-tooltip'}, title: 'Reload'}
%i.icon-refresh
.badge= @<%= plural_table_name %>.total_entries
.panel-body.no-padding
.panel-tools
.btn-group
%a.btn{href: '#'}
%i.icon-wrench
Settings
%a.btn{href: '#'}
%i.icon-filter
Filters
%a.btn{href: <%= index_helper %>_path, data: {toggle: 'toolbar-tooltip'}, title: 'Reload'}
%i.icon-refresh
.badge= @<%= plural_table_name %>.total_entries
.panel-body.filters
= render 'filters'
%table.table
%thead
%tr
%th #
%table.table
%thead
%tr
%th #
<% for attribute in attributes -%>
%th= sort_link(@search, :<%= attribute.name %>, t('activerecord.attributes.<%= singular_table_name %>.<%= attribute.name %>'))
%th= sort_link(@search, :<%= attribute.name %>, t('activerecord.attributes.<%= singular_table_name %>.<%= attribute.name %>'))
<% end -%>
%th.actions
Actions
%tbody
= render @<%= plural_table_name %>
%th.actions
Actions
%tbody
= render @<%= plural_table_name %>
9 changes: 5 additions & 4 deletions lib/templates/haml/scaffold/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
%i.icon-plus
= t('action_button.new', resource_name: <%= singular_table_name.capitalize %>.model_name.human)

.panel.tables
= render 'list'

= will_paginate @<%= plural_table_name %>, renderer: BootstrapPagination::Rails, bootstrap: 3
.panel.panel-default.grid
=blankable(@<%= plural_table_name %>)
.panel-footer
.pagination.pagination-sm
= will_paginate @<%= plural_table_name %>, renderer: BootstrapPagination::Rails, bootstrap: 3
2 changes: 1 addition & 1 deletion lib/templates/haml/scaffold/show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
= link_to edit_<%= singular_table_name %>_path(@<%= singular_name %> ), class: 'btn btn-default' do
%i.icon-pencil
= t('action_button.edit')
.panel
.panel.panel-default
.panel-heading
%i.icon-edit.icon-large
= t('tt.show', resource_name: <%= singular_table_name.capitalize %>.model_name.human)
Expand Down
41 changes: 7 additions & 34 deletions vendor/assets/stylesheets/_bootstrap_overrides.css.sass
Original file line number Diff line number Diff line change
Expand Up @@ -13,47 +13,20 @@
top: -6px
right: 20px

// Panels
//Panels
.panel // Remove box shadow from panels
+box-shadow(none)

// Panel heading styles
.panel-heading
text-align: left
background-color: lighten($panel-heading-bg, 3)
color: $base-dark-color
i[class*='icon-']
margin-right: 5px
.panel-tools
float: right
margin-top: -48px
margin-right: -8px
.btn-group
margin-top: -6px
.btn-group, .label, .badge
float: right
display: inline-block
.btn
padding: 8px 6px
font-weight: 200
font-size: 1em
color: $base-dark-color
&:hover
color: $base-color
&:active, &:focus
color: darken($base-color, 10)
+box-shadow(none)
span.badge
font-size: .7em
padding: 2px 4px
.label, .badge
margin-right: 5px
margin-top: 4px
padding-bottom: 4px
font-weight: 200
.panel-body
&.no-padding
margin-left: -15px
margin-right: -15px
margin-top: -15px
.panel-footer
background-color: lighten($panel-heading-bg, 3)
.pull-right
padding-top: 5px

// Buttons
.btn
Expand Down
8 changes: 5 additions & 3 deletions vendor/assets/stylesheets/_variables.css.sass
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ $base-color: $turquoise
$base-dark-color: $midnight-blue
$base-dark-color-alternative: $wet-asphalt

$base-font-family: "Helvetica Neue", Helvetica, Arial, sans-serif

$brand-font-size: 1.8em

$body-bg-primary: $silver
Expand All @@ -26,9 +28,9 @@ $box-shadow-color: rgba(black, 0.04)
$brand-primary: $base-color
$brand-success: $brand-primary

$navbar-bg: rgba(0,0,0,0)
$navbar-brand-color: $base-dark-color
$navbar-brand-hover-color: lighten($base-dark-color, 10)
$navbar-default-bg: rgba(0,0,0,0)
$navbar-default-brand-color: $base-dark-color
$navbar-default-brand-hover-color: lighten($base-dark-color, 5)

$breadcrumb-bg: $clouds
$panel-heading-bg: $clouds
Expand Down
Loading

0 comments on commit 72c0859

Please sign in to comment.