tenon 1.1.4 → 1.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (127) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/tenon/features/asset_detachment.js.coffee +1 -1
  3. data/app/assets/javascripts/tenon/features/asset_uploader.js.coffee +1 -1
  4. data/app/assets/javascripts/tenon/features/modal_windows.js.coffee +0 -2
  5. data/app/assets/javascripts/tenon/features/nested_fields.js +2 -2
  6. data/app/assets/javascripts/tenon/features/new_item_version_handler.js.coffee +2 -2
  7. data/app/assets/javascripts/tenon/features/protect_changes.js.coffee +1 -1
  8. data/app/assets/javascripts/tenon/features/record_approval.js.coffee +3 -3
  9. data/app/assets/javascripts/tenon/features/record_boolean_toggle.js.coffee +1 -1
  10. data/app/assets/javascripts/tenon/features/record_list.js.coffee +3 -3
  11. data/app/assets/javascripts/tenon/features/record_list_updater.js.coffee +1 -1
  12. data/app/assets/javascripts/tenon/features/tenon_content/asset_link.js.coffee +1 -1
  13. data/app/assets/javascripts/tenon/templates/assets/asset_field.jst.eco +2 -2
  14. data/app/assets/javascripts/tenon/templates/assets/asset_row.jst.eco +2 -2
  15. data/app/assets/javascripts/tenon/templates/assets/asset_select.jst.eco +1 -1
  16. data/app/assets/javascripts/tenon/templates/contacts/contact_row.jst.eco +9 -9
  17. data/app/assets/javascripts/tenon/templates/errors.jst.eco +2 -2
  18. data/app/assets/javascripts/tenon/templates/events/event_row.jst.eco +2 -2
  19. data/app/assets/javascripts/tenon/templates/item_versions/item_version_row.jst.eco +2 -2
  20. data/app/assets/javascripts/tenon/templates/pages/page_row.jst.eco +1 -1
  21. data/app/assets/javascripts/tenon/templates/post_categories/post_category_row.jst.eco +1 -1
  22. data/app/assets/javascripts/tenon/templates/posts/post_row.jst.eco +3 -3
  23. data/app/assets/javascripts/tenon/templates/users/user_row.jst.eco +2 -2
  24. data/app/controllers/tenon/assets_controller.rb +1 -1
  25. data/app/controllers/tenon/base_controller.rb +4 -4
  26. data/app/controllers/tenon/comments_controller.rb +2 -2
  27. data/app/controllers/tenon/contacts_controller.rb +4 -4
  28. data/app/controllers/tenon/resources_controller.rb +3 -3
  29. data/app/decorators/tenon/asset_decorator.rb +3 -3
  30. data/app/decorators/tenon/comment_decorator.rb +1 -1
  31. data/app/decorators/tenon/contact_decorator.rb +2 -2
  32. data/app/decorators/tenon/event_decorator.rb +2 -2
  33. data/app/helpers/tenon/application_helper.rb +6 -0
  34. data/app/helpers/tenon/asset_helper.rb +1 -1
  35. data/app/helpers/tenon/item_version_helper.rb +5 -5
  36. data/app/helpers/tenon/tenon_content_helper.rb +1 -1
  37. data/app/helpers/tenon/tenon_helper.rb +7 -7
  38. data/app/mailers/tenon/comment_mailer.rb +1 -1
  39. data/app/mailers/tenon/contact_mailer.rb +1 -1
  40. data/app/models/tenon/asset.rb +1 -1
  41. data/app/models/tenon/page.rb +3 -3
  42. data/app/models/tenon/tenon_content/row_types.rb +17 -17
  43. data/app/views/layouts/tenon/application.html.haml +4 -0
  44. data/app/views/layouts/tenon/login.html.haml +3 -0
  45. data/app/views/tenon/assets/_form.html.haml +2 -2
  46. data/app/views/tenon/assets/_sidebar_index.html.haml +6 -6
  47. data/app/views/tenon/assets/crop.html.haml +3 -4
  48. data/app/views/tenon/assets/edit.html.haml +1 -1
  49. data/app/views/tenon/assets/index.html.haml +2 -2
  50. data/app/views/tenon/comment_mailer/comment_notification.html.haml +2 -2
  51. data/app/views/tenon/comments/_sidebar_index.html.haml +6 -6
  52. data/app/views/tenon/comments/index.html.haml +2 -2
  53. data/app/views/tenon/comments/index.json.jbuilder +1 -1
  54. data/app/views/tenon/contact_mailer/contact_notification.html.haml +4 -4
  55. data/app/views/tenon/contacts/_sidebar_index.html.haml +8 -8
  56. data/app/views/tenon/contacts/index.html.haml +2 -2
  57. data/app/views/tenon/contacts/index.json.jbuilder +4 -4
  58. data/app/views/tenon/events/_form.html.haml +7 -7
  59. data/app/views/tenon/events/edit.html.haml +1 -1
  60. data/app/views/tenon/events/index.html.haml +4 -4
  61. data/app/views/tenon/events/index.json.jbuilder +1 -1
  62. data/app/views/tenon/events/new.html.haml +1 -1
  63. data/app/views/tenon/fields/_asset.html.haml +3 -3
  64. data/app/views/tenon/galleries/_form.html.haml +7 -7
  65. data/app/views/tenon/galleries/edit.html.haml +1 -1
  66. data/app/views/tenon/galleries/index.html.haml +5 -5
  67. data/app/views/tenon/galleries/new.html.haml +1 -1
  68. data/app/views/tenon/index/index.html.haml +4 -4
  69. data/app/views/tenon/item_assets/new.html.haml +6 -6
  70. data/app/views/tenon/item_versions/_item_version.json.jbuilder +4 -4
  71. data/app/views/tenon/item_versions/index.html.haml +2 -5
  72. data/app/views/tenon/item_versions/new.html.haml +1 -1
  73. data/app/views/tenon/pages/_form.html.haml +14 -14
  74. data/app/views/tenon/pages/edit.html.haml +1 -1
  75. data/app/views/tenon/pages/index.html.haml +5 -5
  76. data/app/views/tenon/pages/index.json.jbuilder +4 -4
  77. data/app/views/tenon/pages/new.html.haml +1 -1
  78. data/app/views/tenon/post_categories/_form.html.haml +1 -1
  79. data/app/views/tenon/post_categories/_post_category.json.jbuilder +1 -1
  80. data/app/views/tenon/post_categories/index.html.haml +5 -5
  81. data/app/views/tenon/posts/_form.html.haml +14 -14
  82. data/app/views/tenon/posts/edit.html.haml +1 -1
  83. data/app/views/tenon/posts/index.html.haml +6 -6
  84. data/app/views/tenon/posts/index.json.jbuilder +2 -2
  85. data/app/views/tenon/posts/new.html.haml +1 -1
  86. data/app/views/tenon/redirects/_form.html.haml +10 -10
  87. data/app/views/tenon/redirects/_redirect.json.jbuilder +1 -1
  88. data/app/views/tenon/redirects/edit.html.haml +1 -1
  89. data/app/views/tenon/redirects/index.html.haml +8 -8
  90. data/app/views/tenon/redirects/new.html.haml +1 -1
  91. data/app/views/tenon/settings/_contact.html.haml +8 -8
  92. data/app/views/tenon/settings/_general.html.haml +4 -4
  93. data/app/views/tenon/settings/_seo.html.haml +4 -4
  94. data/app/views/tenon/settings/show.html.haml +9 -9
  95. data/app/views/tenon/shared/_i18n_language_nav.html.haml +3 -3
  96. data/app/views/tenon/shared/_main_nav.html.haml +11 -11
  97. data/app/views/tenon/shared/_posts_nav.html.haml +3 -3
  98. data/app/views/tenon/shared/_seo_fields.html.haml +3 -3
  99. data/app/views/tenon/shared/_util_nav.html.haml +2 -2
  100. data/app/views/tenon/shared/_version_warning.html.haml +5 -6
  101. data/app/views/tenon/shared/menu_items/_comments.html.haml +1 -1
  102. data/app/views/tenon/shared/menu_items/_events.html.haml +2 -2
  103. data/app/views/tenon/shared/menu_items/_galleries.html.haml +2 -2
  104. data/app/views/tenon/shared/menu_items/_pages.html.haml +2 -2
  105. data/app/views/tenon/shared/menu_items/_posts.html.haml +2 -2
  106. data/app/views/tenon/shared/section_header/_quick_search.html.haml +1 -1
  107. data/app/views/tenon/tenon_callouts/_form.html.haml +7 -9
  108. data/app/views/tenon/tenon_callouts/edit.html.haml +1 -1
  109. data/app/views/tenon/tenon_callouts/index.html.haml +5 -5
  110. data/app/views/tenon/tenon_callouts/new.html.haml +1 -1
  111. data/app/views/tenon/tenon_content/_builder.html.haml +2 -2
  112. data/app/views/tenon/tenon_content/_display.html.haml +3 -3
  113. data/app/views/tenon/tenon_content/_embed_modal.html.haml +3 -3
  114. data/app/views/tenon/tenon_content/_fields.html.haml +9 -10
  115. data/app/views/tenon/tenon_content/_row.html.haml +4 -4
  116. data/app/views/tenon/tenon_content/piece_types/form/_background_image.html.haml +6 -6
  117. data/app/views/tenon/tenon_content/piece_types/form/_embedded_content.html.haml +1 -2
  118. data/app/views/tenon/tenon_content/piece_types/form/_image.html.haml +17 -17
  119. data/app/views/tenon/users/_form.html.haml +11 -11
  120. data/app/views/tenon/users/edit.html.haml +1 -1
  121. data/app/views/tenon/users/index.html.haml +5 -5
  122. data/app/views/tenon/users/index.json.jbuilder +3 -3
  123. data/app/views/tenon/users/new.html.haml +1 -1
  124. data/config/locales/tenon.en.yml +313 -0
  125. data/lib/tenon/version.rb +1 -1
  126. metadata +4 -4
  127. data/app/models/tenon/thinger.rb +0 -4
@@ -1,8 +1,8 @@
1
- json.title item_version.title.blank? ? "(No Title)" : item_version.title
1
+ json.title item_version.title.blank? ? t('tenon.item_versions.no_title') : item_version.title
2
2
  json.created_at item_version.created_at.strftime('%m/%d/%Y at %l:%M%p')
3
3
  json.user_email item_version.user.try(:email)
4
4
  if item_version.item
5
- json.load_link action_link('View Draft', polymorphic_path([:edit, item_version.item], version: item_version.id), 'reply')
5
+ json.load_link action_link(t('tenon.item_versions.view_draft'), polymorphic_path([:edit, item_version.item], version: item_version.id), 'reply')
6
6
  else
7
- json.load_link action_link('View Draft', new_polymorphic_path(item_version.item_type.constantize, version: item_version.id), 'reply')
8
- end
7
+ json.load_link action_link(t('tenon.item_versions.view_draft'), new_polymorphic_path(item_version.item_type.constantize, version: item_version.id), 'reply')
8
+ end
@@ -1,9 +1,6 @@
1
- .modal-body
2
- Choose a draft to load from the list below. Loading a draft will open it
3
- but it will not overwrite the active version of your item until you
4
- press Save.
1
+ .modal-body= t('tenon.item_versions.choose_a_draft')
5
2
 
6
3
  .asset-list-scroller
7
4
  %ul.record-list#item_versions{data: {records: {url: item_versions_path(format: 'json', item_type: params[:item_type], item_id: params[:item_id]), template: 'tenon/templates/item_versions/item_version_row', name: 'item_version'}}}
8
5
 
9
- = link_to "Load Older Drafts", '#', :class => 'btn btn-comp infinite-loader', 'data-record-list' => '#item_versions'
6
+ = link_to t('tenon.item_versions.load_other_drafts'), '#', :class => 'btn btn-comp infinite-loader', 'data-record-list' => '#item_versions'
@@ -9,4 +9,4 @@
9
9
  .spacer
10
10
 
11
11
  .modal-footer
12
- %button.btn.btn-comp.submit Save Draft
12
+ %button.btn.btn-comp.submit= t('tenon.item_versions.save_draft')
@@ -1,13 +1,13 @@
1
1
  - content_for :sidebar do
2
2
  .sidebar
3
3
  .content
4
- %h2 Pages
4
+ %h2= t('tenon.pages.pages')
5
5
 
6
- %h4 Edit Options
6
+ %h4= t('tenon.common.edit_options')
7
7
  %nav
8
8
  %ul
9
- %li.active= link_to 'Page Content', '#details', data: {toggle: 'tab'}
10
- %li= link_to 'Search Optimization', '#seo', data: {toggle: 'tab'}
9
+ %li.active= link_to t('tenon.pages.page_content'), '#details', data: {toggle: 'tab'}
10
+ %li= link_to t('tenon.common.search_optimization'), '#seo', data: {toggle: 'tab'}
11
11
 
12
12
  = i18n_language_nav(:'tenon/pages')
13
13
 
@@ -16,35 +16,35 @@
16
16
  .fields.large.tabs
17
17
  .tab-pane.active#details
18
18
  .form-group
19
- = f.text_field :title, explanation: 'This is the title that shows up at the top of your page.'
19
+ = f.text_field :title, explanation: t('tenon.pages.this_is_the_title')
20
20
 
21
21
  .form-group= f.tenon_content :content
22
22
 
23
23
  .tab-pane#seo= render 'tenon/shared/seo_fields', f: f
24
24
 
25
25
  .fields.small
26
- %h4.box-label Details
26
+ %h4.box-label= t('tenon.common.details')
27
27
  .box
28
28
  .form-group.bordered
29
- = f.super_label :parent_id, 'Parent Page'
30
- = f.collection_select :parent_id, @potential_parents, :id, :option_title, {:include_blank => "(No Parent)"}
29
+ = f.super_label :parent_id, t('tenon.pages.parent_page')
30
+ = f.collection_select :parent_id, @potential_parents, :id, :option_title, { :include_blank => t('tenon.pages.no_parent') }
31
31
 
32
32
  .form-group.inline.bordered
33
33
  = f.check_box :show_in_menu, class: 'tn-checkbox-right'
34
- = f.super_label :show_in_menu, "Show in Menu?"
34
+ = f.super_label :show_in_menu, t('tenon.pages.show_in_menu')
35
35
 
36
36
  .form-group.inline.bordered
37
37
  = f.check_box :show_contact_form, class: 'tn-checkbox-right'
38
- = f.super_label :show_contact_form, "Show Contact Form?"
38
+ = f.super_label :show_contact_form, t('tenon.pages.show_contact_form')
39
39
 
40
- %h4.box-label Publish Your Page
40
+ %h4.box-label= t('tenon.pages.publish_your_page')
41
41
  .box
42
42
  .form-group
43
- = f.text_field :publish_at, label: "Publish Date", data: {behaviour: 'datetime-picker'}, placeholder: '--'
43
+ = f.text_field :publish_at, label: t('tenon.common.publish_date'), data: { behaviour: 'datetime-picker' }, placeholder: '--'
44
44
 
45
45
  .row.content
46
46
  - if can?(:publish, @page)
47
- %button.btn.btn-comp.btn-block.submit{ data: { disable_with: "Please wait..." } } Save
47
+ %button.btn.btn-comp.btn-block.submit{ data: { disable_with: t('tenon.common.please_wait') } }= t('tenon.common.save')
48
48
 
49
49
  - if can?(:create, Tenon::ItemVersion)
50
50
  = save_draft_button(@page)
@@ -55,4 +55,4 @@
55
55
  = clear_draft_link if params[:version]
56
56
  = load_draft_link(@page)
57
57
  - if @page.persisted?
58
- = link_to "Delete", @page, data: {method: :delete, confirm: 'Are you sure you want to delete this?'}, class: 'delete-link'
58
+ = link_to t('tenon.common.delete'), @page, data: { method: :delete, confirm: t('tenon.common.are_you_sure') }, class: 'delete-link'
@@ -1,5 +1,5 @@
1
1
  %header
2
- %h1 Edit a Page
2
+ %h1= t('tenon.pages.edit_a_page')
3
3
 
4
4
  .tools
5
5
  = render "tenon/shared/section_header/sidebar_toggle"
@@ -1,11 +1,11 @@
1
1
  - content_for :sidebar do
2
2
  .sidebar
3
3
  .content
4
- %h2 Pages
5
- = link_to "New Page", new_page_path, class: 'btn btn-block btn-primary'
4
+ %h2= t('tenon.pages.pages')
5
+ = link_to t('tenon.pages.new_page'), new_page_path, class: 'btn btn-block btn-primary'
6
6
 
7
7
  %header
8
- %h1 Pages
8
+ %h1= t('tenon.pages.pages')
9
9
 
10
10
  .tools
11
11
  = render "tenon/shared/section_header/sidebar_toggle"
@@ -18,6 +18,6 @@
18
18
  = render "tenon/shared/section_header/quick_search", record_list: '#pages'
19
19
 
20
20
  .main-content
21
- %ul#pages.record-list.sortable.nested{data: {records: {url: pages_path(format: 'json'), template: 'tenon/templates/pages/page_row', name: 'page', nested: 'true'}, :'reorder-path' => reorder_pages_path}}
21
+ %ul#pages.record-list.sortable.nested{ data: { records: { url: pages_path(format: 'json'), template: 'tenon/templates/pages/page_row', name: 'page', nested: 'true' }, :'reorder-path' => reorder_pages_path } }
22
22
 
23
- = link_to "Load More Pages", '#', :class => 'btn btn-comp infinite-loader', 'data-record-list' => '#pages'
23
+ = link_to t('tenon.pages.load_more'), '#', :class => 'btn btn-comp infinite-loader', 'data-record-list' => '#pages'
@@ -4,19 +4,19 @@ json.records do
4
4
  json.array!(pages) do |page|
5
5
  json.extract!(page, :title, :lft, :rgt, :to_param, :parent_id, :id, :list_order)
6
6
  json.updated_at page.updated_at.strftime('%B %e, %Y at %l:%m%p')
7
- json.updater page.updater.present? ? page.updater.email : 'Unknown User'
7
+ json.updater page.updater.present? ? page.updater.email : t('tenon.pages.unknown_user')
8
8
  json.edit_path edit_page_path(page)
9
9
 
10
10
  if page.published?
11
- json.view_link action_link("View on Site", page.path, "laptop")
11
+ json.view_link action_link(t('tenon.common.view_on_site'), page.path, "laptop")
12
12
  end
13
13
 
14
- json.subpage_link action_link("Create a Sub-Page", new_page_path(:parent_id => page.id), "plus")
14
+ json.subpage_link action_link(t('tenon.pages.create_a_sub_page'), new_page_path(:parent_id => page.id), "plus")
15
15
  json.edit_link edit_link(page)
16
16
  if page.key.blank?
17
17
  json.delete_link delete_link(page)
18
18
  else
19
- json.delete_link action_link("Required Page, Can't Delete", "#", "star")
19
+ json.delete_link action_link(t('tenon.pages.required_page'), "#", "star")
20
20
  end
21
21
  end
22
22
  end
@@ -1,5 +1,5 @@
1
1
  %header
2
- %h1 Create a New Page
2
+ %h1= t('tenon.pages.create_a_new_page')
3
3
 
4
4
  .tools
5
5
  = render "tenon/shared/section_header/sidebar_toggle"
@@ -8,4 +8,4 @@
8
8
  .spacer
9
9
 
10
10
  .modal-footer
11
- = f.submit "Save", class: 'btn btn-comp', data: { disable_with: "Please wait..." }
11
+ = f.submit t('tenon.common.save'), class: 'btn btn-comp', data: { disable_with: t('tenon.common.please_wait') }
@@ -1,2 +1,2 @@
1
1
  json.extract!(post_category, :id, :title, :edit_path, :delete_link)
2
- json.edit_link edit_link(post_category, data: {'modal-remote' => true, 'modal-title' => 'Edit Post Category'})
2
+ json.edit_link edit_link(post_category, data: { 'modal-remote' => true, 'modal-title' => t('tenon.post_categories.edit_post_category') })
@@ -4,14 +4,14 @@
4
4
 
5
5
  .sidebar
6
6
  .content
7
- %h2 Post Categories
8
- = link_to "New Post Category", '#', class: 'btn btn-block btn-primary', data: { 'modal-target' => '#new-post_category', 'modal-title' => 'New Post Category' }
7
+ %h2= t('tenon.post_categories.post_categories')
8
+ = link_to t('tenon.post_categories.new_post_category'), '#', class: 'btn btn-block btn-primary', data: { 'modal-target' => '#new-post_category', 'modal-title' => t('tenon.post_categories.new_post_category') }
9
9
 
10
10
  = render "tenon/shared/posts_nav"
11
11
 
12
12
 
13
13
  %header
14
- %h1 Post Categories
14
+ %h1= t('tenon.post_categories.post_categories')
15
15
 
16
16
  .tools
17
17
  = render "tenon/shared/section_header/sidebar_toggle"
@@ -25,6 +25,6 @@
25
25
 
26
26
  .main-content
27
27
  = error_messages_for :post_category
28
- %ul#post_categories.record-list{data: {records: {url: post_categories_path(format: 'json'), template: 'tenon/templates/post_categories/post_category_row', name: 'post_category'}}}
28
+ %ul#post_categories.record-list{ data: { records: { url: post_categories_path(format: 'json'), template: 'tenon/templates/post_categories/post_category_row', name: 'post_category' } } }
29
29
 
30
- = link_to "Load More Post Categories", '#', :class => 'btn btn-comp infinite-loader', 'data-record-list' => '#post_categories'
30
+ = link_to t('tenon.post_categories.load_more'), '#', :class => 'btn btn-comp infinite-loader', 'data-record-list' => '#post_categories'
@@ -1,13 +1,13 @@
1
1
  - content_for :sidebar do
2
2
  .sidebar
3
3
  .content
4
- %h2 Posts
4
+ %h2= t('tenon.posts.posts')
5
5
 
6
- %h4 Edit Options
6
+ %h4= t('tenon.common.edit_options')
7
7
  %nav
8
8
  %ul
9
- %li.active= link_to 'Post Content', '#details', data: {toggle: 'tab'}
10
- %li= link_to "Search Optimization", '#seo', data: {toggle: 'tab'}
9
+ %li.active= link_to t('tenon.posts.post_content'), '#details', data: { toggle: 'tab' }
10
+ %li= link_to t('tenon.common.search_optimization'), '#seo', data: { toggle: 'tab' }
11
11
 
12
12
  = i18n_language_nav(:'tenon/posts')
13
13
 
@@ -18,7 +18,7 @@
18
18
  .fields.large.tabs
19
19
  .tab-pane.active#details
20
20
  .form-group
21
- = f.text_field :title, :explanation => "Give your post a title."
21
+ = f.text_field :title, :explanation => t('tenon.posts.give_your_post_a_title')
22
22
 
23
23
  .form-group
24
24
  = f.rich_text :excerpt
@@ -30,28 +30,28 @@
30
30
 
31
31
  .fields.small
32
32
  - unless @categories.blank?
33
- %h4.box-label Categories
33
+ %h4.box-label= t('tenon.posts.categories')
34
34
  .box
35
35
  .form-group.inline
36
- = f.super_label :post_categories, 'Categories'
36
+ = f.super_label :post_categories, t('tenon.posts.categories')
37
37
  = f.select :post_category_ids, @categories.map { |c| [c.title, c.id] }, {}, { multiple: true }
38
38
 
39
- %h4.box-label Publish Your Post
39
+ %h4.box-label= t('tenon.posts.publish_your_post')
40
40
  .box
41
41
  .form-group.bordered
42
- = f.super_label :user_id, 'Author'
43
- = f.collection_select :user_id, @users, :id, :email, {:include_blank => "(No Author)"}
42
+ = f.super_label :user_id, t('tenon.posts.author')
43
+ = f.collection_select :user_id, @users, :id, :email, { :include_blank => t('tenon.posts.no_author') }
44
44
 
45
45
  .form-group.inline.bordered
46
46
  = f.check_box :allow_comments, class: 'tn-checkbox-right'
47
- = f.super_label :allow_comments, "Allow Comments?"
47
+ = f.super_label :allow_comments, t('tenon.posts.allow_comments')
48
48
 
49
49
  .form-group
50
- = f.text_field :publish_at, label: "Publish Date", data: {behaviour: 'datetime-picker'}, placeholder: '--'
50
+ = f.text_field :publish_at, label: t('tenon.common.publish_date'), data: { behaviour: 'datetime-picker' }, placeholder: '--'
51
51
 
52
52
  .row.content
53
53
  - if can?(:publish, @post)
54
- %button.btn.btn-comp.btn-block.submit{ data: { disable_with: "Please wait..." } } Save
54
+ %button.btn.btn-comp.btn-block.submit{ data: { disable_with: t('tenon.common.please_wait') } }= t('tenon.common.save')
55
55
 
56
56
  - if can?(:create, Tenon::ItemVersion)
57
57
  = save_draft_button(@post)
@@ -62,4 +62,4 @@
62
62
  = clear_draft_link if params[:version]
63
63
  = load_draft_link(@post)
64
64
  - if @post.persisted?
65
- = link_to "Delete", @post, :data => {:method => :delete, :confirm => "Are you sure you want to delete this?"}, :class => 'delete-link'
65
+ = link_to t('tenon.common.delete'), @post, :data => { :method => :delete, :confirm => t('tenon.common.are_you_sure') }, :class => 'delete-link'
@@ -1,5 +1,5 @@
1
1
  %header
2
- %h1 Edit a Post
2
+ %h1= t('tenon.posts.edit_a_post')
3
3
 
4
4
  .tools
5
5
  = render "tenon/shared/section_header/sidebar_toggle"
@@ -1,15 +1,15 @@
1
1
  - content_for :sidebar do
2
2
  .sidebar
3
3
  .content
4
- %h2 Posts
5
- = link_to "New Post", new_post_path, class: 'btn btn-block btn-primary'
6
- #new-post-category{:style => "display: none;"}
4
+ %h2= t('tenon.posts.posts')
5
+ = link_to t('tenon.posts.new_post'), new_post_path, class: 'btn btn-block btn-primary'
6
+ #new-post-category{ :style => "display: none;" }
7
7
  =# render "form", category: PostCategory.new
8
8
 
9
9
  = render "tenon/shared/posts_nav"
10
10
 
11
11
  %header
12
- %h1 Posts
12
+ %h1= t('tenon.posts.posts')
13
13
 
14
14
  .tools
15
15
  = render "tenon/shared/section_header/sidebar_toggle"
@@ -22,6 +22,6 @@
22
22
  = render "tenon/shared/section_header/quick_search", record_list: '#posts'
23
23
 
24
24
  .main-content
25
- %ul#posts.record-list{data: {records: {url: posts_path(format: 'json'), template: 'tenon/templates/posts/post_row', name: 'post'}}}
25
+ %ul#posts.record-list{ data: { records: { url: posts_path(format: 'json'), template: 'tenon/templates/posts/post_row', name: 'post' } } }
26
26
 
27
- = link_to "Load More Posts", '#', :class => 'btn btn-comp infinite-loader', 'data-record-list' => '#posts'
27
+ = link_to t('tenon.posts.load_more'), '#', :class => 'btn btn-comp infinite-loader', 'data-record-list' => '#posts'
@@ -1,10 +1,10 @@
1
1
  json.records do
2
2
  json.array!(@posts) do |post|
3
3
  json.extract!(post, :title, :to_param, :id)
4
- json.publish_at post.publish_at.present? ? post.publish_at.strftime('%B %e, %Y at %l:%m%p') : 'Date not set'
4
+ json.publish_at post.publish_at.present? ? post.publish_at.strftime('%B %e, %Y at %l:%m%p') : t('tenon.posts.date_not_set')
5
5
  json.edit_path edit_post_path(post)
6
6
  if post.published? && main_app.respond_to?(:post_path)
7
- json.view_link action_link('View on Site', main_app.post_path(post), 'laptop')
7
+ json.view_link action_link(t('tenon.common.view_on_site'), main_app.post_path(post), 'laptop')
8
8
  end
9
9
  json.categories post.post_categories.map{ |c| c.title }.join(', ')
10
10
  json.edit_link edit_link(post)
@@ -1,5 +1,5 @@
1
1
  %header
2
- %h1 Create a New Post
2
+ %h1= t('tenon.posts.create_a_new_post')
3
3
 
4
4
  .tools
5
5
  = render "tenon/shared/section_header/sidebar_toggle"
@@ -1,34 +1,34 @@
1
1
  - content_for :sidebar do
2
2
  .sidebar
3
3
  .content
4
- %h2 Redirects
5
- = link_to "New Redirect", new_redirect_path, class: 'btn btn-block btn-primary'
4
+ %h2= t('tenon.redirects.redirects')
5
+ = link_to t('tenon.redirects.new_redirect'), new_redirect_path, class: 'btn btn-block btn-primary'
6
6
 
7
7
  = autosaving_form_for @redirect do |f|
8
- .flash.flash-alert{style: 'padding-right: 40px;'}
8
+ .flash.flash-alert{ style: 'padding-right: 40px;' }
9
9
  %i.fa.fa-exclamation-triangle
10
- Redirects will be run when a page cannot be found. It will not redirect an existing page.
10
+ = t('tenon.redirects.redirects_will_be_run')
11
11
 
12
12
  = error_messages_for :redirect
13
13
  .fields.large.tabs
14
14
  .tab-pane.active#details
15
15
  .form-group
16
- = f.text_field :in, label: 'Route to match', explanation: 'String, can be written as a regular expression (without opening and closing /)', placeholder: '\/old-path\/(\d+)-(\.*)'
16
+ = f.text_field :in, label: t('tenon.redirects.route_to_match'), explanation: t('tenon.redirects.string_can_be_written'), placeholder: '\/old-path\/(\d+)-(\.*)'
17
17
  .form-group
18
- = f.text_field :out, label: 'Destination', explanation: 'Zero-indexed captures can be returned in {x}', placeholder: '/new-path/{0}-{1}'
18
+ = f.text_field :out, label: t('tenon.redirects.destination'), explanation: t('tenon.redirects.zero_indexed_captures'), placeholder: '/new-path/{0}-{1}'
19
19
 
20
20
  .fields.small
21
- %h4.box-label Details
21
+ %h4.box-label= t('tenon.common.details')
22
22
  .box
23
23
  .form-group.bordered.inline
24
24
  = f.check_box :active, class: 'tn-checkbox-right'
25
25
  = f.super_label :active
26
26
 
27
- %h4.box-label Actions
27
+ %h4.box-label= t('tenon.common.actions')
28
28
  .box
29
29
  .content
30
30
  - if can?(:publish, @redirect)
31
- %button.btn.btn-block.btn-comp{ data: { disable_with: "Please wait..." } } Save
31
+ %button.btn.btn-block.btn-comp{ data: { disable_with: t('tenon.common.please_wait') } }= t('tenon.common.save')
32
32
  - if can?(:create, Tenon::ItemVersion)
33
33
  = save_draft_button(@redirect)
34
34
  .last-autosave
@@ -38,5 +38,5 @@
38
38
  = clear_draft_link if params[:version]
39
39
  = load_draft_link(@redirect)
40
40
  - if @redirect.persisted?
41
- = link_to "Delete", @redirect, data: {method: :delete, confirm: 'Are you sure you want to delete this?'}, :class => 'delete-link'
41
+ = link_to t('tenon.common.delete'), @redirect, data: { method: :delete, confirm: t('tenon.common.are_you_sure') }, :class => 'delete-link'
42
42
  .spacer
@@ -1,3 +1,3 @@
1
1
  json.extract!(redirect, :id, :in, :out, :active, :edit_path, :edit_link, :delete_link)
2
2
 
3
- json.active_link toggle_link(redirect, 'active', toggle_active_redirect_path(redirect), ['eye', 'Active'], ['eye-slash', 'Not Aactive'])
3
+ json.active_link toggle_link(redirect, 'active', toggle_active_redirect_path(redirect), ['eye', t('tenon.redirects.active')], ['eye-slash', t('tenon.redirects.not_active')])
@@ -1,5 +1,5 @@
1
1
  %header
2
- %h1 Edit Redirect
2
+ %h1= t('tenon.redirects.edit_redirect')
3
3
 
4
4
  .tools
5
5
  = render "tenon/shared/section_header/sidebar_toggle"
@@ -1,12 +1,12 @@
1
1
  - content_for :sidebar do
2
2
  .sidebar
3
3
  .content
4
- %h2 Redirects
5
- = link_to "New Redirect", new_redirect_path, class: 'btn btn-block btn-primary'
6
- %p Drag and drop to set priority.
4
+ %h2= t('tenon.redirects.redirects')
5
+ = link_to t('tenon.redirects.new_redirect'), new_redirect_path, class: 'btn btn-block btn-primary'
6
+ %p= t('tenon.redirects.drag_and_drop_to_set_priority')
7
7
 
8
8
  %header
9
- %h1 Redirects
9
+ %h1= t('tenon.redirects.redirects')
10
10
 
11
11
  .tools
12
12
  = render "tenon/shared/section_header/sidebar_toggle"
@@ -19,11 +19,11 @@
19
19
  = render "tenon/shared/section_header/quick_search", record_list: '#redirects'
20
20
 
21
21
  .main-content
22
- .flash.flash-alert{style: 'padding-right: 40px;'}
22
+ .flash.flash-alert{ style: 'padding-right: 40px;' }
23
23
  %i.fa.fa-exclamation-triangle
24
- Redirects will be run when a page cannot be found. It will not redirect an existing page.
24
+ = t('tenon.redirects.redirects_will_be_run')
25
25
 
26
26
  = error_messages_for :redirect
27
- %ul#redirects.record-list.sortable{data: {records: {url: redirects_path(format: 'json'), template: 'tenon/templates/redirects/redirect_row', name: 'redirect'}, :'reorder-path' => reorder_redirects_path}}
27
+ %ul#redirects.record-list.sortable{ data: { records: { url: redirects_path(format: 'json'), template: 'tenon/templates/redirects/redirect_row', name: 'redirect' }, :'reorder-path' => reorder_redirects_path } }
28
28
 
29
- = link_to "Load More Redirects", '#', :class => 'btn btn-comp infinite-loader', 'data-record-list' => '#redirects'
29
+ = link_to t('tenon.redirects.load_more'), '#', :class => 'btn btn-comp infinite-loader', 'data-record-list' => '#redirects'
@@ -1,5 +1,5 @@
1
1
  %header
2
- %h1 New Redirect
2
+ %h1= t('tenon.redirects.new_redirect')
3
3
 
4
4
  .tools
5
5
  = render "tenon/shared/section_header/sidebar_toggle"
@@ -1,19 +1,19 @@
1
- %h4.box-label Contact Details
1
+ %h4.box-label= t('tenon.settings.contact_details')
2
2
  .box
3
3
  .form-group.bordered
4
- %label Contact Email
5
- .explanation Destination email address for alerts. Separate multiple email addresses with commas.
4
+ %label= t('tenon.settings.contact_email')
5
+ .explanation= t('tenon.settings.destination_email_address_for_alerts')
6
6
  = text_field_tag "settings[contact_email]", Tenon::MySettings.contact_email, :placeholder => "--"
7
7
 
8
8
  .form-group.bordered
9
- %label Sender Email
10
- .explanation "From" email address for alerts.
9
+ %label= t('tenon.settings.sender_email')
10
+ .explanation= t('tenon.settings.from_email_address_for_alerts')
11
11
  = text_field_tag "settings[from_email]", Tenon::MySettings.from_email, :placeholder => "--"
12
12
 
13
- %h4.box-label Comment Notifications
13
+ %h4.box-label= t('tenon.settings.comment_notifications')
14
14
  .box
15
15
  .form-group.inline.bordered
16
16
  = check_box_tag "settings[comment_email]", 1, Tenon::MySettings.comment_email, class: 'tn-checkbox-right'
17
- %label{for: 'settings_comment_email'} Comment Email
18
- .explanation Do you want to receive an email when someone posts a comment?
17
+ %label{ for: 'settings_comment_email' }= t('tenon.settings.comment_email')
18
+ .explanation= t('tenon.settings.do_you_want_to_receive')
19
19
 
@@ -1,12 +1,12 @@
1
1
  .form-group
2
- %label Site Name
2
+ %label= t('tenon.settings.site_name')
3
3
  = text_field_tag 'settings[site_title]', Tenon::MySettings.site_title
4
4
 
5
5
  .form-group
6
- %label Site Domain
6
+ %label= t('tenon.settings.site_domain')
7
7
  = text_field_tag 'settings[site_url]', Tenon::MySettings.site_url
8
8
 
9
9
  .form-group
10
- %label Google Analytics Code
11
- .explanation= link_to 'Create a New Profile Here', 'https://www.google.com/analytics/settings/add_profile?scid=16153080', target: '_'
10
+ %label= t('tenon.settings.google_analytics_code')
11
+ .explanation= link_to t('tenon.settings.create_a_new_profile_here'), 'https://www.google.com/analytics/settings/add_profile?scid=16153080', target: '_'
12
12
  = text_area_tag 'settings[google_analytics]', Tenon::MySettings.google_analytics, style: 'height: 180px;'
@@ -1,10 +1,10 @@
1
1
  .form-group
2
- %label META Keywords
3
- .explanation These META keywords will be used by some search engines when crawling your site. Separate keywords with a comma. Note: Google does not factor in keywords when calculating your rank. Other search engines may or may not.
2
+ %label= t('tenon.settings.meta_keywords')
3
+ .explanation= t('tenon.settings.these_meta_keywords_will')
4
4
  = text_area_tag "settings[seo_keywords]", Tenon::MySettings.seo_keywords
5
5
 
6
6
  .form-group
7
- %label META Description
8
- .explanation This description will show up on search engines and in some cases will affect your rank. It should be no longer than 150-160 characters (about the length of a tweet.)
7
+ %label= t('tenon.settings.meta_description')
8
+ .explanation= t('tenon.settings.this_description_will_show_up')
9
9
  = text_area_tag "settings[seo_description]", Tenon::MySettings.seo_description
10
10
 
@@ -1,31 +1,31 @@
1
1
  - content_for :sidebar do
2
2
  .sidebar
3
3
  .content
4
- %h2 Settings
4
+ %h2= t('tenon.settings.settings')
5
5
 
6
- %h4 Sections
6
+ %h4= t('tenon.settings.sections')
7
7
  %nav
8
8
  %ul
9
- %li.active= link_to "General Settings", '#general', data: {toggle: 'tab'}
10
- %li= link_to 'Contact Management', '#contact', data: {toggle: 'tab'}
11
- %li= link_to 'Search Optimization', '#seo', data: {toggle: 'tab'}
9
+ %li.active= link_to t('tenon.settings.general_settings'), '#general', data: {toggle: 'tab'}
10
+ %li= link_to t('tenon.settings.contact_management'), '#contact', data: {toggle: 'tab'}
11
+ %li= link_to t('tenon.common.search_optimization'), '#seo', data: {toggle: 'tab'}
12
12
 
13
13
  %header
14
- %h1 Site Settings
14
+ %h1= t('tenon.settings.site_settings')
15
15
 
16
16
  .tools
17
17
  = render "tenon/shared/section_header/sidebar_toggle"
18
18
 
19
19
  .main-content
20
- = form_tag({:action => :update}, :method => "PUT") do
20
+ = form_tag({ :action => :update }, :method => "PUT") do
21
21
  .fields.large.tabs
22
22
  #general.tab-pane.active= render :partial => 'general'
23
23
  #contact.tab-pane= render :partial => 'contact'
24
24
  #seo.tab-pane= render :partial => 'seo'
25
25
 
26
26
  .fields.small
27
- %h4.box-label Actions
27
+ %h4.box-label= t('tenon.common.actions')
28
28
  .box
29
29
  .content
30
- %button.btn.btn-primary.btn-block.submit{ data: { disable_with: "Please wait..." } } Save
30
+ %button.btn.btn-primary.btn-block.submit{ data: { disable_with: t('tenon.common.please_wait') } }= t('tenon.common.save')
31
31
 
@@ -1,6 +1,6 @@
1
- %h4 Languages
1
+ %h4= t('tenon.common.languages')
2
2
  %nav.i18n-nav
3
3
  %ul
4
- %li.active= link_to 'English', '#', data: { 'i18n-lang' => 'en' }
4
+ %li.active= link_to t('tenon.common.english'), '#', data: { 'i18n-lang' => 'en' }
5
5
  - Tenon.config.languages.each do |title, lang|
6
- %li= link_to title, '#', data: { 'i18n-lang' => lang }
6
+ %li= link_to title, '#', data: { 'i18n-lang' => lang }
@@ -1,14 +1,14 @@
1
1
  .nav-holder
2
2
  %nav.main-nav
3
3
  %ul
4
- = nav_item 'Home', root_path, 'dashboard'
5
- = nav_item 'Asset Library', assets_path, 'picture-o'
6
- = nav_item 'Comments', comments_path, 'comment'
7
- = nav_item 'Pages', pages_path, 'file'
8
- = nav_item 'Posts', posts_path, 'file-text', active: ['post_categories'].include?(controller_name)
9
- = nav_item 'Users', users_path, 'user'
10
- = nav_item 'Events', events_path, 'calendar'
11
- = nav_item 'Galleries', galleries_path, 'th'
12
- = nav_item 'Contacts', contacts_path, 'envelope'
13
- = nav_item 'Redirects', redirects_path, 'exchange'
14
- = nav_item 'Settings', settings_path, 'gear'
4
+ = nav_item t('tenon.common.home'), root_path, 'dashboard'
5
+ = nav_item t('tenon.asset_library.asset_library'), assets_path, 'picture-o'
6
+ = nav_item t('tenon.comments.comments'), comments_path, 'comment'
7
+ = nav_item t('tenon.pages.pages'), pages_path, 'file'
8
+ = nav_item t('tenon.posts.posts'), posts_path, 'file-text', active: ['post_categories'].include?(controller_name)
9
+ = nav_item t('tenon.users.users'), users_path, 'user'
10
+ = nav_item t('tenon.events.events'), events_path, 'calendar'
11
+ = nav_item t('tenon.galleries.galleries'), galleries_path, 'th'
12
+ = nav_item t('tenon.contacts.contacts'), contacts_path, 'envelope'
13
+ = nav_item t('tenon.redirects.redirects'), redirects_path, 'exchange'
14
+ = nav_item t('tenon.settings.settings'), settings_path, 'gear'
@@ -1,8 +1,8 @@
1
- %h4 Posts
1
+ %h4= t('tenon.posts.posts')
2
2
  %nav
3
3
  %ul
4
4
  - if can?(:manage, Tenon::Post)
5
- %li{class: ('active' if controller_name == 'posts')}= link_to "Posts", posts_path
5
+ %li{ class: ('active' if controller_name == 'posts') }= link_to t('tenon.posts.posts'), posts_path
6
6
 
7
7
  - if can?(:manage, Tenon::PostCategory)
8
- %li{class: ('active' if controller_name == 'post_categories')}= link_to "Post Categories", post_categories_path
8
+ %li{ class: ('active' if controller_name == 'post_categories') }= link_to t('tenon.post_categories.post_categories'), post_categories_path
@@ -1,6 +1,6 @@
1
1
  .form-group
2
- = f.text_field :seo_title, :class => "title", :style => "width: 100%;", :label => "Title Tag", :'data-popover' => true, :explanation => "This is the title that will show on search engine results and in the title bar of a visitor's browser. By default, this will use the item's title.", :'data-placement' => 'bottom'
2
+ = f.text_field :seo_title, :class => "title", :style => "width: 100%;", :label => t('tenon.settings.title_tag'), :'data-popover' => true, :explanation => t('tenon.settings.this_is_the_title_that_will_show'), :'data-placement' => 'bottom'
3
3
  .form-group
4
- = f.text_area :seo_keywords, :style => "width: 100%;", :rows => 5, :label => "META Keywords", :'data-popover' => true, :explanation => "These META keywords will be used by some search engines when crawling your site. Separate keywords with a comma. Note: Google does not factor in keywords when calculating your rank. Other search engines may or may not.", :'data-placement' => 'bottom'
4
+ = f.text_area :seo_keywords, :style => "width: 100%;", :rows => 5, :label => t('tenon.settings.meta_keywords'), :'data-popover' => true, :explanation => t('tenon.settings.these_meta_keywords_will'), :'data-placement' => 'bottom'
5
5
  .form-group
6
- = f.text_area :seo_description, :style => "width: 100%;", :rows => 5, :label => "META Description", :'data-popover' => true, :explanation => "This description will show up on search engines and in some cases will affect your rank. It should be no longer than 150-160 characters (about the length of a tweet.)", :'data-placement' => 'bottom'
6
+ = f.text_area :seo_description, :style => "width: 100%;", :rows => 5, :label => t('tenon.settings.meta_description'), :'data-popover' => true, :explanation => t('tenon.settings.this_description_will_show_up'), :'data-placement' => 'bottom'