diff --git a/CHANGELOG.md b/CHANGELOG.md index c842a94..06355a7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,47 +2,51 @@ #### [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) @@ -50,5 +54,5 @@ * [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 diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 2f82404..1181bf4 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -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 diff --git a/app/views/layouts/partials/_toolbar.haml b/app/views/layouts/partials/_toolbar.haml index 0c95b29..970c687 100755 --- a/app/views/layouts/partials/_toolbar.haml +++ b/app/views/layouts/partials/_toolbar.haml @@ -1,2 +1,3 @@ #toolbar - = yield :toolbar \ No newline at end of file + .btn-group + = yield :toolbar \ No newline at end of file diff --git a/lib/templates/haml/scaffold/_form.html.haml b/lib/templates/haml/scaffold/_form.html.haml index 3e8a877..2d02bfe 100644 --- a/lib/templates/haml/scaffold/_form.html.haml +++ b/lib/templates/haml/scaffold/_form.html.haml @@ -1,4 +1,4 @@ -.panel +.panel.panel-default .panel-heading %i.icon-edit.icon-large = yield :form_title diff --git a/lib/templates/haml/scaffold/_list.html.haml b/lib/templates/haml/scaffold/_list.html.haml index 6fabf94..85fa515 100644 --- a/lib/templates/haml/scaffold/_list.html.haml +++ b/lib/templates/haml/scaffold/_list.html.haml @@ -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 %> \ No newline at end of file + %th.actions + Actions + %tbody + = render @<%= plural_table_name %> \ No newline at end of file diff --git a/lib/templates/haml/scaffold/index.html.haml b/lib/templates/haml/scaffold/index.html.haml index 21584fa..3117365 100644 --- a/lib/templates/haml/scaffold/index.html.haml +++ b/lib/templates/haml/scaffold/index.html.haml @@ -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 \ No newline at end of file diff --git a/lib/templates/haml/scaffold/show.html.haml b/lib/templates/haml/scaffold/show.html.haml index 2bb2710..40dca70 100644 --- a/lib/templates/haml/scaffold/show.html.haml +++ b/lib/templates/haml/scaffold/show.html.haml @@ -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) diff --git a/vendor/assets/stylesheets/_bootstrap_overrides.css.sass b/vendor/assets/stylesheets/_bootstrap_overrides.css.sass index 112bd1f..4490277 100755 --- a/vendor/assets/stylesheets/_bootstrap_overrides.css.sass +++ b/vendor/assets/stylesheets/_bootstrap_overrides.css.sass @@ -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 diff --git a/vendor/assets/stylesheets/_variables.css.sass b/vendor/assets/stylesheets/_variables.css.sass index 111c28d..8356e85 100755 --- a/vendor/assets/stylesheets/_variables.css.sass +++ b/vendor/assets/stylesheets/_variables.css.sass @@ -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 @@ -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 diff --git a/vendor/assets/stylesheets/hierapolis.css.sass b/vendor/assets/stylesheets/hierapolis.css.sass index 66d8a13..553cb7b 100755 --- a/vendor/assets/stylesheets/hierapolis.css.sass +++ b/vendor/assets/stylesheets/hierapolis.css.sass @@ -4,6 +4,9 @@ @import 'bootstrap' @import 'bootstrap_overrides' +body + font-family: $base-font-family + body.login color: $base-dark-color background-color: $body-bg-primary @@ -42,7 +45,7 @@ body.login body.main padding: 10px 20px 0px 20px background-color: $body-bg-primary - //+background-image(linear-gradient(left, $body-bg-primary, $body-bg-secondary)) +//+background-image(linear-gradient(left, $body-bg-primary, $body-bg-secondary)) .sprite-image background-image: url(../images/sprite.png) @@ -60,47 +63,67 @@ form .text-center text-align: center -.tables - .panel-body - .table-header - text-align: left - padding: 10px - background-color: lighten($panel-heading-bg, 3) - border-bottom: 1px solid $table-border-color - &.row - margin: 0 - .input-group - margin-right: -15px - input - height: 30px - button - height: 30px - padding: 0 10px - .table-footer - background-color: lighten($panel-heading-bg, 3) - border-top: 1px solid $table-border-color - +border-bottom-left-radius(4px) - +border-bottom-right-radius(4px) - padding: 10px 10px 5px 10px - margin-bottom: -14px - .pagination - margin: 0 - table - margin-bottom: 0 - th:first-child, td:first-child - padding-left: 15px - tr.disabled - +opacity(.4) - td - text-decoration: line-through - td.action - text-decoration: none !important +// Panels +.panel + .panel-tools + float: right + margin-top: -4px + 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 + +// Grids +.grid + .filters + background-color: lighten($panel-heading-bg, 5) + .input-group + input + height: 30px + button + height: 30px + padding: 0 10px + table + margin-bottom: 0 + th:first-child, td:first-child + padding-left: 15px + tr.disabled + +opacity(.4) + td + text-decoration: line-through td.action - width: 15% - padding: 5px - .btn - height: 25px - padding: 2px 6px + text-decoration: none !important + td.action + width: 15% + padding: 5px + .btn + height: 25px + padding: 2px 6px + .panel-footer + padding: 10px 10px 5px 10px + .pagination + margin: 0 + #navbar .navbar-brand @@ -177,7 +200,7 @@ form text-align: left position: absolute margin-left: 85px - top: 80px + top: 8px > li > a padding: 5px 20px a, li.dropdown-header @@ -213,7 +236,7 @@ form height: 10px background-color: white position: absolute - right: -5px + right: -6px margin-top: 22px #content @@ -271,4 +294,4 @@ form height: 24px background-size: 100px background-repeat: no-repeat - margin-left: 33px + margin-left: 33px \ No newline at end of file