Skip to content

Commit

Permalink
#30 breadcrumb added to generator
Browse files Browse the repository at this point in the history
  • Loading branch information
adamdilek committed Sep 18, 2013
1 parent cf2f874 commit cff2a63
Show file tree
Hide file tree
Showing 11 changed files with 78 additions and 36 deletions.
63 changes: 32 additions & 31 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,59 +2,60 @@
#### [Current]

####
* [beff870](../../commit/beff870) - __(Muhammet DİLEK)__ [#29](../../issues/29) theme presentation page updated
* [72c0859](../../commit/72c0859) - __(Muhammet DİLEK)__ [#29](../../issues/29) bootstrap3 class added to generator and theme
* [6a88594](../../commit/6a88594) - __(Muhammet DİLEK)__ scheme.rb fixed
* [361c26d](../../commit/361c26d) - __(Muhammet DİLEK)__ [#20](../../issues/20) blank list and filter partial added to scaffold generator
* [89d3fd5](../../commit/89d3fd5) - __(Onur Özgür ÖZKAN)__ Update README.md
* [cf2f874](../../commit/cf2f874) - __(Muhammet DILEK)__ [#29](../../issues/29) navbar fixed
* [beff870](../../commit/beff870) - __(Muhammet DILEK)__ [#29](../../issues/29) theme presentation page updated
* [72c0859](../../commit/72c0859) - __(Muhammet DILEK)__ [#29](../../issues/29) bootstrap3 class added to generator and theme
* [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 DİLEK)__ [#20](../../issues/20) show_for config added
* [ca81bb4](../../commit/ca81bb4) - __(Muhammet DİLEK)__ [#20](../../issues/20) detail page added
* [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
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ gem 'rack-timeout', '~> 0.0.4'
gem 'recipient_interceptor', '~> 0.1.2'
gem 'ransack'
gem 'show_for', '~> 0.3.0.rc'
gem 'breadcrumbs_on_rails'

group :doc do
gem 'sdoc', require: false
Expand Down
2 changes: 2 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ GEM
erubis (>= 2.6.6)
binding_of_caller (0.7.2)
debug_inspector (>= 0.0.1)
breadcrumbs_on_rails (2.3.0)
builder (3.1.4)
capybara (2.1.0)
mime-types (>= 1.16)
Expand Down Expand Up @@ -230,6 +231,7 @@ DEPENDENCIES
better_errors
binding_of_caller
bootstrap-sass!
breadcrumbs_on_rails
capybara (~> 2.1.0)
coffee-rails (~> 4.0.0)
compass-rails!
Expand Down
1 change: 1 addition & 0 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
require 'application_responder'

class ApplicationController < ActionController::Base
add_breadcrumb I18n.t('navbar.root'), :root_path
before_filter :set_user_time_zone


Expand Down
4 changes: 1 addition & 3 deletions app/views/layouts/partials/_breadcrumb.haml
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
%ul#breadcrumb.breadcrumb
%li.title= yield :title
%li= link_to 'Lorem', '#'
%li.active= link_to 'ipsum', '#'
= render_breadcrumbs :separator => ' / '
6 changes: 6 additions & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,10 @@ en:
action_button:
new: "New %{resource_name}"
edit: "Edit"
tooltips:
edit: Edit
new: New
zoom: Detail
navbar:
root: Home

4 changes: 4 additions & 0 deletions config/locales/models.en.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
en:
activerecord:
models:
attributes:
4 changes: 4 additions & 0 deletions config/locales/models.tr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
tr:
activerecord:
models:
attributes:
7 changes: 7 additions & 0 deletions config/locales/tr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,10 @@ tr:
action_button:
new: "Yeni %{resource_name}"
edit: "Düzenle"

tooltips:
edit: Düzenle
new: Yeni
zoom: Detay
navbar:
root: Anasayfa
16 changes: 15 additions & 1 deletion db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema.define(version: 20130905072700) do
ActiveRecord::Schema.define(version: 20130918071033) do

create_table "admins", force: true do |t|
t.string "email", default: "", null: false
Expand All @@ -31,6 +31,20 @@
add_index "admins", ["email"], name: "index_admins_on_email", unique: true
add_index "admins", ["reset_password_token"], name: "index_admins_on_reset_password_token", unique: true

create_table "companies", force: true do |t|
t.string "name"
t.integer "capacity"
t.datetime "created_at"
t.datetime "updated_at"
end

create_table "products", force: true do |t|
t.string "name"
t.integer "capacity"
t.datetime "created_at"
t.datetime "updated_at"
end

create_table "users", force: true do |t|
t.string "email", default: "", null: false
t.string "encrypted_password", default: "", null: false
Expand Down
6 changes: 5 additions & 1 deletion lib/templates/rails/responders_controller/controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<% module_namespacing do -%>
class <%= controller_class_name %>Controller < ApplicationController
before_action :<%= "set_#{singular_table_name}" %>, only: [:show, :edit, :update, :destroy]
add_breadcrumb I18n.t('activerecord.models.<%= table_name %>'), :<%= table_name %>_path
<% unless options[:singleton] -%>
def index
@search = <%= class_name %>.search(params[:q])
Expand All @@ -12,15 +12,19 @@ def index
<% end -%>
def show
add_breadcrumb @<%= file_name %>.<%= attributes.first.name %>, <%= singular_table_name %>_path(@<%= file_name %>)
respond_with(@<%= file_name %>)
end
def new
add_breadcrumb t('tooltips.new'), new_<%= singular_table_name %>_path
@<%= file_name %> = <%= orm_class.build(class_name) %>
respond_with(@<%= file_name %>)
end
def edit
add_breadcrumb @<%= singular_table_name %>.id, <%= singular_table_name %>_path(@<%= singular_table_name %>)
add_breadcrumb t('tooltips.edit'), edit_<%= singular_table_name %>_path
end
def create
Expand Down

0 comments on commit cff2a63

Please sign in to comment.