tenon 1.1.4 → 1.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/tenon/features/asset_detachment.js.coffee +1 -1
- data/app/assets/javascripts/tenon/features/asset_uploader.js.coffee +1 -1
- data/app/assets/javascripts/tenon/features/modal_windows.js.coffee +0 -2
- data/app/assets/javascripts/tenon/features/nested_fields.js +2 -2
- data/app/assets/javascripts/tenon/features/new_item_version_handler.js.coffee +2 -2
- data/app/assets/javascripts/tenon/features/protect_changes.js.coffee +1 -1
- data/app/assets/javascripts/tenon/features/record_approval.js.coffee +3 -3
- data/app/assets/javascripts/tenon/features/record_boolean_toggle.js.coffee +1 -1
- data/app/assets/javascripts/tenon/features/record_list.js.coffee +3 -3
- data/app/assets/javascripts/tenon/features/record_list_updater.js.coffee +1 -1
- data/app/assets/javascripts/tenon/features/tenon_content/asset_link.js.coffee +1 -1
- data/app/assets/javascripts/tenon/templates/assets/asset_field.jst.eco +2 -2
- data/app/assets/javascripts/tenon/templates/assets/asset_row.jst.eco +2 -2
- data/app/assets/javascripts/tenon/templates/assets/asset_select.jst.eco +1 -1
- data/app/assets/javascripts/tenon/templates/contacts/contact_row.jst.eco +9 -9
- data/app/assets/javascripts/tenon/templates/errors.jst.eco +2 -2
- data/app/assets/javascripts/tenon/templates/events/event_row.jst.eco +2 -2
- data/app/assets/javascripts/tenon/templates/item_versions/item_version_row.jst.eco +2 -2
- data/app/assets/javascripts/tenon/templates/pages/page_row.jst.eco +1 -1
- data/app/assets/javascripts/tenon/templates/post_categories/post_category_row.jst.eco +1 -1
- data/app/assets/javascripts/tenon/templates/posts/post_row.jst.eco +3 -3
- data/app/assets/javascripts/tenon/templates/users/user_row.jst.eco +2 -2
- data/app/controllers/tenon/assets_controller.rb +1 -1
- data/app/controllers/tenon/base_controller.rb +4 -4
- data/app/controllers/tenon/comments_controller.rb +2 -2
- data/app/controllers/tenon/contacts_controller.rb +4 -4
- data/app/controllers/tenon/resources_controller.rb +3 -3
- data/app/decorators/tenon/asset_decorator.rb +3 -3
- data/app/decorators/tenon/comment_decorator.rb +1 -1
- data/app/decorators/tenon/contact_decorator.rb +2 -2
- data/app/decorators/tenon/event_decorator.rb +2 -2
- data/app/helpers/tenon/application_helper.rb +6 -0
- data/app/helpers/tenon/asset_helper.rb +1 -1
- data/app/helpers/tenon/item_version_helper.rb +5 -5
- data/app/helpers/tenon/tenon_content_helper.rb +1 -1
- data/app/helpers/tenon/tenon_helper.rb +7 -7
- data/app/mailers/tenon/comment_mailer.rb +1 -1
- data/app/mailers/tenon/contact_mailer.rb +1 -1
- data/app/models/tenon/asset.rb +1 -1
- data/app/models/tenon/page.rb +3 -3
- data/app/models/tenon/tenon_content/row_types.rb +17 -17
- data/app/views/layouts/tenon/application.html.haml +4 -0
- data/app/views/layouts/tenon/login.html.haml +3 -0
- data/app/views/tenon/assets/_form.html.haml +2 -2
- data/app/views/tenon/assets/_sidebar_index.html.haml +6 -6
- data/app/views/tenon/assets/crop.html.haml +3 -4
- data/app/views/tenon/assets/edit.html.haml +1 -1
- data/app/views/tenon/assets/index.html.haml +2 -2
- data/app/views/tenon/comment_mailer/comment_notification.html.haml +2 -2
- data/app/views/tenon/comments/_sidebar_index.html.haml +6 -6
- data/app/views/tenon/comments/index.html.haml +2 -2
- data/app/views/tenon/comments/index.json.jbuilder +1 -1
- data/app/views/tenon/contact_mailer/contact_notification.html.haml +4 -4
- data/app/views/tenon/contacts/_sidebar_index.html.haml +8 -8
- data/app/views/tenon/contacts/index.html.haml +2 -2
- data/app/views/tenon/contacts/index.json.jbuilder +4 -4
- data/app/views/tenon/events/_form.html.haml +7 -7
- data/app/views/tenon/events/edit.html.haml +1 -1
- data/app/views/tenon/events/index.html.haml +4 -4
- data/app/views/tenon/events/index.json.jbuilder +1 -1
- data/app/views/tenon/events/new.html.haml +1 -1
- data/app/views/tenon/fields/_asset.html.haml +3 -3
- data/app/views/tenon/galleries/_form.html.haml +7 -7
- data/app/views/tenon/galleries/edit.html.haml +1 -1
- data/app/views/tenon/galleries/index.html.haml +5 -5
- data/app/views/tenon/galleries/new.html.haml +1 -1
- data/app/views/tenon/index/index.html.haml +4 -4
- data/app/views/tenon/item_assets/new.html.haml +6 -6
- data/app/views/tenon/item_versions/_item_version.json.jbuilder +4 -4
- data/app/views/tenon/item_versions/index.html.haml +2 -5
- data/app/views/tenon/item_versions/new.html.haml +1 -1
- data/app/views/tenon/pages/_form.html.haml +14 -14
- data/app/views/tenon/pages/edit.html.haml +1 -1
- data/app/views/tenon/pages/index.html.haml +5 -5
- data/app/views/tenon/pages/index.json.jbuilder +4 -4
- data/app/views/tenon/pages/new.html.haml +1 -1
- data/app/views/tenon/post_categories/_form.html.haml +1 -1
- data/app/views/tenon/post_categories/_post_category.json.jbuilder +1 -1
- data/app/views/tenon/post_categories/index.html.haml +5 -5
- data/app/views/tenon/posts/_form.html.haml +14 -14
- data/app/views/tenon/posts/edit.html.haml +1 -1
- data/app/views/tenon/posts/index.html.haml +6 -6
- data/app/views/tenon/posts/index.json.jbuilder +2 -2
- data/app/views/tenon/posts/new.html.haml +1 -1
- data/app/views/tenon/redirects/_form.html.haml +10 -10
- data/app/views/tenon/redirects/_redirect.json.jbuilder +1 -1
- data/app/views/tenon/redirects/edit.html.haml +1 -1
- data/app/views/tenon/redirects/index.html.haml +8 -8
- data/app/views/tenon/redirects/new.html.haml +1 -1
- data/app/views/tenon/settings/_contact.html.haml +8 -8
- data/app/views/tenon/settings/_general.html.haml +4 -4
- data/app/views/tenon/settings/_seo.html.haml +4 -4
- data/app/views/tenon/settings/show.html.haml +9 -9
- data/app/views/tenon/shared/_i18n_language_nav.html.haml +3 -3
- data/app/views/tenon/shared/_main_nav.html.haml +11 -11
- data/app/views/tenon/shared/_posts_nav.html.haml +3 -3
- data/app/views/tenon/shared/_seo_fields.html.haml +3 -3
- data/app/views/tenon/shared/_util_nav.html.haml +2 -2
- data/app/views/tenon/shared/_version_warning.html.haml +5 -6
- data/app/views/tenon/shared/menu_items/_comments.html.haml +1 -1
- data/app/views/tenon/shared/menu_items/_events.html.haml +2 -2
- data/app/views/tenon/shared/menu_items/_galleries.html.haml +2 -2
- data/app/views/tenon/shared/menu_items/_pages.html.haml +2 -2
- data/app/views/tenon/shared/menu_items/_posts.html.haml +2 -2
- data/app/views/tenon/shared/section_header/_quick_search.html.haml +1 -1
- data/app/views/tenon/tenon_callouts/_form.html.haml +7 -9
- data/app/views/tenon/tenon_callouts/edit.html.haml +1 -1
- data/app/views/tenon/tenon_callouts/index.html.haml +5 -5
- data/app/views/tenon/tenon_callouts/new.html.haml +1 -1
- data/app/views/tenon/tenon_content/_builder.html.haml +2 -2
- data/app/views/tenon/tenon_content/_display.html.haml +3 -3
- data/app/views/tenon/tenon_content/_embed_modal.html.haml +3 -3
- data/app/views/tenon/tenon_content/_fields.html.haml +9 -10
- data/app/views/tenon/tenon_content/_row.html.haml +4 -4
- data/app/views/tenon/tenon_content/piece_types/form/_background_image.html.haml +6 -6
- data/app/views/tenon/tenon_content/piece_types/form/_embedded_content.html.haml +1 -2
- data/app/views/tenon/tenon_content/piece_types/form/_image.html.haml +17 -17
- data/app/views/tenon/users/_form.html.haml +11 -11
- data/app/views/tenon/users/edit.html.haml +1 -1
- data/app/views/tenon/users/index.html.haml +5 -5
- data/app/views/tenon/users/index.json.jbuilder +3 -3
- data/app/views/tenon/users/new.html.haml +1 -1
- data/config/locales/tenon.en.yml +313 -0
- data/lib/tenon/version.rb +1 -1
- metadata +4 -4
- data/app/models/tenon/thinger.rb +0 -4
@@ -7,7 +7,7 @@ module Tenon
|
|
7
7
|
@contact = contact
|
8
8
|
mail(
|
9
9
|
to: Tenon::MySettings.contact_email,
|
10
|
-
subject: "#{Tenon::MySettings.site_name} -
|
10
|
+
subject: "#{Tenon::MySettings.site_name} - #{I18n.t('tenon.contact_mailer.new_contact_request')}",
|
11
11
|
from: @contact.email
|
12
12
|
)
|
13
13
|
end
|
data/app/models/tenon/asset.rb
CHANGED
data/app/models/tenon/page.rb
CHANGED
@@ -22,7 +22,7 @@ module Tenon
|
|
22
22
|
before_validation :set_slug_and_path
|
23
23
|
after_move :set_slug_and_path
|
24
24
|
validates_presence_of :title
|
25
|
-
validates_presence_of :slug, message: '
|
25
|
+
validates_presence_of :slug, message: I18n.t('tenon.pages.must_exist_in_order_to_have')
|
26
26
|
validates_uniqueness_of :slug, scope: :parent_id
|
27
27
|
validate :path_is_not_route
|
28
28
|
validate :parent_is_not_in_tree
|
@@ -81,7 +81,7 @@ module Tenon
|
|
81
81
|
|
82
82
|
def path_is_not_route
|
83
83
|
match = Rails.application.routes.recognize_path(path, method: :get) rescue nil
|
84
|
-
errors.add(:base,
|
84
|
+
errors.add(:base, I18n.t('tenon.pages.theres_already_something_happening', path: "#{MySettings.site_url}#{path}")) if match && !match[:slugs]
|
85
85
|
end
|
86
86
|
|
87
87
|
def set_slug_and_path
|
@@ -97,7 +97,7 @@ module Tenon
|
|
97
97
|
|
98
98
|
def parent_is_not_in_tree
|
99
99
|
if id && [id, descendants.map(&:id)].flatten.include?(parent_id)
|
100
|
-
msg = '
|
100
|
+
msg = I18n.t('tenon.pages.cannot_be_itself_or_one_of_its_subpages')
|
101
101
|
errors.add(:parent_id, msg)
|
102
102
|
end
|
103
103
|
end
|
@@ -2,23 +2,23 @@ module Tenon
|
|
2
2
|
module TenonContent
|
3
3
|
module RowTypes
|
4
4
|
LIBRARY_ROW_TYPES = {
|
5
|
-
'
|
6
|
-
'
|
7
|
-
'
|
8
|
-
'
|
9
|
-
'
|
10
|
-
'
|
11
|
-
'
|
12
|
-
'
|
13
|
-
'
|
14
|
-
'
|
15
|
-
'
|
16
|
-
'
|
17
|
-
'
|
18
|
-
'
|
19
|
-
'
|
20
|
-
'
|
21
|
-
'
|
5
|
+
I18n.t('tenon.row_types.one_column_of_text') => 'FullWidthText',
|
6
|
+
I18n.t('tenon.row_types.one_column_image') => 'FullWidthImage',
|
7
|
+
I18n.t('tenon.row_types.two_columns_of_text') => 'TwoColumnText',
|
8
|
+
I18n.t('tenon.row_types.two_images') => 'TwoColumnImage',
|
9
|
+
I18n.t('tenon.row_types.three_columns_of_text') => 'ThreeColumnText',
|
10
|
+
I18n.t('tenon.row_types.three_images') => 'ThreeColumnImage',
|
11
|
+
I18n.t('tenon.row_types.four_columns_of_text') => 'FourColumnText',
|
12
|
+
I18n.t('tenon.row_types.four_images') => 'FourColumnImage',
|
13
|
+
I18n.t('tenon.row_types.wrapped_image_with_text') => 'LeftWrappedImageWithText',
|
14
|
+
I18n.t('tenon.row_types.six_images') => 'SixColumnImage',
|
15
|
+
I18n.t('tenon.row_types.embedded_content') => 'FullWidthEmbeddedContent',
|
16
|
+
I18n.t('tenon.row_types.image_and_text_no_wrap') => 'LeftImageRightText',
|
17
|
+
I18n.t('tenon.row_types.two_column_image_and_text') => 'TwoColumnImageAndText',
|
18
|
+
I18n.t('tenon.row_types.three_column_image_and_text') => 'ThreeColumnImageAndText',
|
19
|
+
I18n.t('tenon.row_types.four_column_image_and_text') => 'FourColumnImageAndText',
|
20
|
+
I18n.t('tenon.row_types.six_column_image_and_text') => 'SixColumnImageAndText',
|
21
|
+
I18n.t('tenon.row_types.two_columns_with_background_image') => 'TwoColumnWithBackgroundImage'
|
22
22
|
}
|
23
23
|
end
|
24
24
|
end
|
@@ -13,6 +13,10 @@
|
|
13
13
|
= javascript_include_tag '/ckeditor/ckeditor'
|
14
14
|
= javascript_include_tag 'tenon/tenon_manifest'
|
15
15
|
|
16
|
+
:javascript
|
17
|
+
window.I18n = #{current_translations.to_json.html_safe}
|
18
|
+
|
19
|
+
|
16
20
|
%body{data: { controller: params[:controller], action: params[:action] }, class: ('menu-open' if content_for?(:sidebar))}
|
17
21
|
= render 'tenon/shared/util_nav'
|
18
22
|
= render 'tenon/shared/main_nav'
|
@@ -12,5 +12,8 @@
|
|
12
12
|
= stylesheet_link_tag 'tenon/tenon', '//fonts.googleapis.com/css?family=Open+Sans:400,700'
|
13
13
|
= javascript_include_tag 'tenon/tenon_manifest'
|
14
14
|
|
15
|
+
:javascript
|
16
|
+
window.I18n = #{current_translations.to_json.html_safe}
|
17
|
+
|
15
18
|
%body{data: { controller: params[:controller], action: params[:action] }, class: ('menu-open' if content_for?(:sidebar))}
|
16
19
|
.tenon-login= yield
|
@@ -4,12 +4,12 @@
|
|
4
4
|
= error_messages_for :asset
|
5
5
|
.fields.full
|
6
6
|
.form-group.full
|
7
|
-
= f.text_field :title, placeholder: '--', explanation: "
|
7
|
+
= f.text_field :title, placeholder: '--', explanation: "#{t('tenon.assets.enter_a_title_for_your_asset')} #{defined?(multiple) ? t('tenon.assets.multiple_assets') : '' }"
|
8
8
|
|
9
9
|
.form-group
|
10
10
|
.browse-button-holder
|
11
11
|
.fileupload.btn.btn-comp.browse
|
12
|
-
%span#choose-files= defined?(multiple) ? '
|
12
|
+
%span#choose-files= defined?(multiple) ? t('tenon.assets.choose_file') : t('tenon.assets.choose_files')
|
13
13
|
%input{ :type => 'file', :class => 'upload', multiple: defined?(multiple) && multiple, style: 'width: 100%;', name: 'asset[attachment]' }
|
14
14
|
|
15
15
|
.spacer
|
@@ -2,17 +2,17 @@
|
|
2
2
|
#new-asset{:style => "display: none;"}= render "form", multiple: true
|
3
3
|
.sidebar
|
4
4
|
.content
|
5
|
-
%h2
|
6
|
-
= link_to
|
5
|
+
%h2= t('tenon.assets.asset_library')
|
6
|
+
= link_to t('tenon.assets.upload_new'), '#', class: 'btn btn-primary btn-block', data: {'modal-target' => '#new-asset', 'modal-title' => t('tenon.assets.upload_assets'), 'keyboard' => 'false' }
|
7
7
|
|
8
|
-
%h4
|
8
|
+
%h4= t('tenon.assets.file_types')
|
9
9
|
%nav.list-toggles
|
10
10
|
%ul
|
11
11
|
%li
|
12
|
-
= link_to '
|
12
|
+
= link_to t('tenon.assets.all_assets'), assets_path, :class => 'record-list-updater', 'data-clear-record-list-params' => true
|
13
13
|
|
14
14
|
%li
|
15
|
-
= link_to '
|
15
|
+
= link_to t('tenon.assets.images'), '?type=images', class: 'record-list-updater'
|
16
16
|
|
17
17
|
%li
|
18
|
-
= link_to '
|
18
|
+
= link_to t('tenon.assets.documents'), '?type=documents', class: 'record-list-updater'
|
@@ -3,8 +3,7 @@
|
|
3
3
|
.preview
|
4
4
|
.modal-header
|
5
5
|
%button{ type: 'button', class: 'close', data: { dismiss: 'modal' }, :'aria-hidden' => 'true' } ×
|
6
|
-
%h4#myModalLabel{ class: 'modal-title'}
|
7
|
-
Crop
|
6
|
+
%h4#myModalLabel{ class: 'modal-title'}= t('tenon.assets.crop')
|
8
7
|
.image-holder= image_tag(@asset.attachment.url, id: 'cropbox', data: { width: @asset.dimensions(:original)[0], height: @asset.dimensions(:original)[1] })
|
9
8
|
.spinner= fa_icon('spinner spin')
|
10
9
|
|
@@ -13,5 +12,5 @@
|
|
13
12
|
= f.hidden_field field
|
14
13
|
.crop_buttons.right.full
|
15
14
|
= f.check_box :duplicate, checked: true, class: 'tn-checkbox-right'
|
16
|
-
= f.label :duplicate,
|
17
|
-
.right= f.submit
|
15
|
+
= f.label :duplicate, t('tenon.assets.create_new_asset_from_crop'), class: 'left'
|
16
|
+
.right= f.submit t('tenon.common.save'), class: 'save btn btn-comp', data: { disable_with: t('tenon.common.please_wait') }
|
@@ -1,7 +1,7 @@
|
|
1
1
|
= render "sidebar_index"
|
2
2
|
|
3
3
|
%header
|
4
|
-
%h1
|
4
|
+
%h1= t('tenon.assets.asset_library')
|
5
5
|
|
6
6
|
.tools
|
7
7
|
= render "tenon/shared/section_header/sidebar_toggle"
|
@@ -16,4 +16,4 @@
|
|
16
16
|
.main-content
|
17
17
|
%ul#assets.record-grid{data: {role: 'records-list', records: {url: assets_path(format: 'json'), template: 'tenon/templates/assets/asset_row', name: 'asset'}}}
|
18
18
|
|
19
|
-
= link_to
|
19
|
+
= link_to t('tenon.assets.load_more'), '#', :class => 'btn btn-comp infinite-loader', 'data-record-list' => '#assets'
|
@@ -1,7 +1,7 @@
|
|
1
1
|
%p
|
2
|
-
|
2
|
+
= t('tenon.comment_mailer.a_new_comment_has_been_added')
|
3
3
|
= link_to @post.title, post_url(@post, host: Tenon::MySettings.full_url)
|
4
4
|
|
5
5
|
%p{:style => "text-align:center"} --
|
6
6
|
|
7
|
-
%p= simple_format(@comment.content)
|
7
|
+
%p= simple_format(@comment.content)
|
@@ -1,22 +1,22 @@
|
|
1
1
|
- content_for :sidebar do
|
2
2
|
.sidebar
|
3
3
|
.content
|
4
|
-
%h2
|
4
|
+
%h2= t('tenon.comments.comments')
|
5
5
|
|
6
|
-
%h4
|
6
|
+
%h4= t('tenon.common.filter')
|
7
7
|
%nav.list-toggles
|
8
8
|
%ul
|
9
9
|
%li
|
10
10
|
= link_to(comments_path, :class => 'record-list-updater', 'data-clear-record-list-params' => true) do
|
11
|
-
|
11
|
+
= t('tenon.common.all')
|
12
12
|
%span.count= @counts[:all]
|
13
13
|
|
14
14
|
%li
|
15
15
|
= link_to(url_for(type: 'unapproved'), class: 'record-list-updater') do
|
16
|
-
|
16
|
+
= t('tenon.common.unapproved')
|
17
17
|
%span.count= @counts[:unapproved]
|
18
18
|
|
19
19
|
%li
|
20
20
|
= link_to(url_for(type: 'approved'), class: 'record-list-updater') do
|
21
|
-
|
22
|
-
%span.count= @counts[:approved]
|
21
|
+
= t('tenon.common.approved')
|
22
|
+
%span.count= @counts[:approved]
|
@@ -1,7 +1,7 @@
|
|
1
1
|
= render "sidebar_index"
|
2
2
|
|
3
3
|
%header
|
4
|
-
%h1
|
4
|
+
%h1= t('tenon.comments.comments')
|
5
5
|
|
6
6
|
.tools
|
7
7
|
= render "tenon/shared/section_header/sidebar_toggle"
|
@@ -16,4 +16,4 @@
|
|
16
16
|
.main-content
|
17
17
|
%ul#comments.record-list.with-thumbnail{data: {records: {url: comments_path(format: 'json'), template: 'tenon/templates/comments/comment_row', name: 'comment'}}}
|
18
18
|
|
19
|
-
= link_to
|
19
|
+
= link_to t('tenon.comments.load_more'), '#', :class => 'btn btn-comp infinite-loader', 'data-record-list' => '#comments'
|
@@ -9,7 +9,7 @@ json.records do
|
|
9
9
|
json.commentable_link comment.commentable.title
|
10
10
|
end
|
11
11
|
|
12
|
-
json.read_link action_link(
|
12
|
+
json.read_link action_link(t('tenon.comments.read'), '#', 'eye', 'data-modal-target' => "#comment-#{comment.id}", 'data-modal-title' => t('tenon.comments.read_comment'))
|
13
13
|
json.approval_link toggle_link(comment, 'approved', toggle_approved_comment_path(comment), ['thumbs-up', 'Approved'], ['thumbs-down', 'Not Approved'])
|
14
14
|
json.delete_link delete_link(comment)
|
15
15
|
end
|
@@ -1,15 +1,15 @@
|
|
1
1
|
%p
|
2
|
-
|
3
|
-
|
2
|
+
= t('tenon.contact_mailer.new_contact_request_received')
|
3
|
+
= t('tenon.contact_mailer.reply_to_this_email')
|
4
4
|
|
5
5
|
%p{:style => "text-align:center"} --
|
6
6
|
|
7
7
|
%p
|
8
|
-
%strong
|
8
|
+
%strong #{t('tenon.contact_mailer.from')}:
|
9
9
|
= @contact.name
|
10
10
|
|
11
11
|
%p
|
12
|
-
%strong
|
12
|
+
%strong #{t('tenon.contact_mailer.email')}:
|
13
13
|
= @contact.email
|
14
14
|
|
15
15
|
= simple_format(@contact.content)
|
@@ -1,32 +1,32 @@
|
|
1
1
|
- content_for :sidebar do
|
2
2
|
.sidebar
|
3
3
|
.content
|
4
|
-
%h2
|
4
|
+
%h2= t('tenon.contacts.contacts')
|
5
5
|
|
6
|
-
%h4
|
6
|
+
%h4= t('tenon.common.filter')
|
7
7
|
%nav.list-toggles
|
8
8
|
%ul
|
9
9
|
%li
|
10
10
|
= link_to(contacts_path, :class => 'record-list-updater', 'data-clear-record-list-params' => true) do
|
11
|
-
|
11
|
+
= t('tenon.common.all')
|
12
12
|
%span.count= @counts[:all]
|
13
13
|
|
14
14
|
%li
|
15
15
|
= link_to(url_for(type: 'unread'), class: 'record-list-updater') do
|
16
|
-
|
16
|
+
= t('tenon.contacts.unread')
|
17
17
|
%span.count= @counts[:unread]
|
18
18
|
|
19
19
|
%li
|
20
20
|
= link_to(url_for(type: 'read'), class: 'record-list-updater') do
|
21
|
-
|
21
|
+
= t('tenon.contacts.read')
|
22
22
|
%span.count= @counts[:read]
|
23
23
|
|
24
24
|
%li
|
25
25
|
= link_to(url_for(type: 'unreplied'), class: 'record-list-updater') do
|
26
|
-
|
26
|
+
= t('tenon.contacts.awaiting_reply')
|
27
27
|
%span.count= @counts[:unreplied]
|
28
28
|
|
29
29
|
%li
|
30
30
|
= link_to(url_for(type: 'replied'), class: 'record-list-updater') do
|
31
|
-
|
32
|
-
%span.count= @counts[:replied]
|
31
|
+
= t('tenon.contacts.replied')
|
32
|
+
%span.count= @counts[:replied]
|
@@ -1,7 +1,7 @@
|
|
1
1
|
= render "sidebar_index"
|
2
2
|
|
3
3
|
%header
|
4
|
-
%h1
|
4
|
+
%h1= t('tenon.contacts.contacts')
|
5
5
|
|
6
6
|
.tools
|
7
7
|
= render "tenon/shared/section_header/sidebar_toggle"
|
@@ -16,4 +16,4 @@
|
|
16
16
|
.main-content
|
17
17
|
%ul#contacts.record-list{data: {records: {url: contacts_path(format: 'json'), template: 'tenon/templates/contacts/contact_row', name: 'contact'}}}
|
18
18
|
|
19
|
-
= link_to
|
19
|
+
= link_to t('tenon.contacts.load_more'), '#', :class => 'btn btn-comp infinite-loader', 'data-record-list' => '#contacts'
|
@@ -1,9 +1,9 @@
|
|
1
1
|
json.records do
|
2
2
|
json.array!(@contacts) do |contact|
|
3
3
|
json.extract!(contact, :id, :name, :email, :phone, :content, :sent_date, :user_ip, :user_agent, :referrer)
|
4
|
-
json.display_link action_link(
|
5
|
-
json.read_link toggle_link(contact, 'read', toggle_read_contact_path(contact), ['folder-open-o', '
|
6
|
-
json.reply_link toggle_link(contact, 'replied', toggle_replied_contact_path(contact), ['check', '
|
4
|
+
json.display_link action_link(t('tenon.contacts.view_contact_details'), '#', 'eye', 'data-modal-target' => "#contact-#{contact.id}", 'data-modal-title' => t('tenon.contacts.contact_details'))
|
5
|
+
json.read_link toggle_link(contact, 'read', toggle_read_contact_path(contact), ['folder-open-o', t('tenon.contacts.mark_as_unread')], ['folder-o', t('tenon.contacts.mark_as_read')])
|
6
|
+
json.reply_link toggle_link(contact, 'replied', toggle_replied_contact_path(contact), ['check', t('tenon.contacts.mark_as_pending')], ['reply', t('tenon.contacts.mark_as_replied')])
|
7
7
|
json.delete_link delete_link(contact)
|
8
8
|
end
|
9
9
|
end
|
@@ -12,4 +12,4 @@ json.pagination do
|
|
12
12
|
json.currentPage @contacts.current_page
|
13
13
|
json.totalPages @contacts.total_pages
|
14
14
|
json.totalEntries @contacts.total_entries
|
15
|
-
end
|
15
|
+
end
|
@@ -1,8 +1,8 @@
|
|
1
1
|
- content_for :sidebar do
|
2
2
|
.sidebar
|
3
3
|
.content
|
4
|
-
%h2
|
5
|
-
= link_to
|
4
|
+
%h2= t('tenon.events.events')
|
5
|
+
= link_to t('tenon.events.new_event'), new_event_path, class: 'btn btn-block btn-primary'
|
6
6
|
|
7
7
|
= i18n_language_nav(:'tenon/events')
|
8
8
|
|
@@ -15,7 +15,7 @@
|
|
15
15
|
= f.tenon_content :description
|
16
16
|
|
17
17
|
.fields.small
|
18
|
-
%h4.box-label
|
18
|
+
%h4.box-label= t('tenon.events.event_details')
|
19
19
|
.box
|
20
20
|
.form-group.bordered= f.text_field :location, :placeholder => '--'
|
21
21
|
.form-group.bordered
|
@@ -23,14 +23,14 @@
|
|
23
23
|
.form-group.bordered
|
24
24
|
= f.text_field :ends_at, data: {behaviour: 'datetime-picker'}, placeholder: '--'
|
25
25
|
|
26
|
-
%h4.box-label
|
26
|
+
%h4.box-label= t('tenon.events.publish_your_event')
|
27
27
|
.box
|
28
28
|
.form-group
|
29
|
-
= f.text_field :publish_at, label:
|
29
|
+
= f.text_field :publish_at, label: t('tenon.common.publish_date'), data: {behaviour: 'datetime-picker'}, placeholder: '--'
|
30
30
|
|
31
31
|
.row.content
|
32
32
|
- if can?(:publish, @event)
|
33
|
-
%button.btn.btn-comp.btn-block.submit{ data: { disable_with:
|
33
|
+
%button.btn.btn-comp.btn-block.submit{ data: { disable_with: t('tenon.common.please_wait') } }= t('tenon.common.save')
|
34
34
|
- if can?(:create, Tenon::ItemVersion)
|
35
35
|
= save_draft_button(@event)
|
36
36
|
.last-autosave
|
@@ -40,5 +40,5 @@
|
|
40
40
|
= clear_draft_link if params[:version]
|
41
41
|
= load_draft_link(@event)
|
42
42
|
- if @event.persisted?
|
43
|
-
= link_to
|
43
|
+
= link_to t('tenon.common.delete'), @event, :data => { :method => :delete, :confirm => t('tenon.common.are_you_sure') }, :class => 'delete-link'
|
44
44
|
|
@@ -1,11 +1,11 @@
|
|
1
1
|
- content_for :sidebar do
|
2
2
|
.sidebar
|
3
3
|
.content
|
4
|
-
%h2
|
5
|
-
= link_to
|
4
|
+
%h2= t('tenon.events.events')
|
5
|
+
= link_to t('tenon.events.new_event'), new_event_path, class: 'btn btn-block btn-primary'
|
6
6
|
|
7
7
|
%header
|
8
|
-
%h1
|
8
|
+
%h1= t('tenon.events.events')
|
9
9
|
|
10
10
|
.tools
|
11
11
|
= render "tenon/shared/section_header/sidebar_toggle"
|
@@ -20,4 +20,4 @@
|
|
20
20
|
.main-content
|
21
21
|
%ul#events.record-list{data: {role: 'records-list', records: {url: events_path(format: 'json'), template: 'tenon/templates/events/event_row', name: 'event'}}}
|
22
22
|
|
23
|
-
= link_to
|
23
|
+
= link_to t('tenon.events.load_more'), '#', :class => 'btn btn-comp infinite-loader', 'data-record-list' => '#events'
|
@@ -3,7 +3,7 @@ json.records do
|
|
3
3
|
json.extract!(event, :id, :title, :display_date, :location, :edit_path, :edit_link, :delete_link)
|
4
4
|
|
5
5
|
if event.published? && main_app.respond_to?(:event_path)
|
6
|
-
json.view_link action_link(
|
6
|
+
json.view_link action_link(t('tenon.common.view_on_site'), main_app.event_path(event), "laptop")
|
7
7
|
end
|
8
8
|
|
9
9
|
end
|
@@ -21,12 +21,12 @@
|
|
21
21
|
|
22
22
|
.browse-button-holder{ class: ('with-remove' if opts[:remove_association]) }
|
23
23
|
.browse-button
|
24
|
-
= link_to '
|
24
|
+
= link_to t('tenon.common.browse'), new_item_asset_path, class: 'btn btn-comp browse', data: { modal_remote: true, modal_title: "#{t('tenon.fields.select')} #{field.to_s.titleize}", modal_handler: 'Tenon.features.AssetAttachment' }
|
25
25
|
- if opts[:remove_association]
|
26
26
|
%small
|
27
27
|
or
|
28
|
-
= link_to_remove_association
|
28
|
+
= link_to_remove_association t('tenon.fields.remove'), f
|
29
29
|
- else
|
30
30
|
%small
|
31
31
|
or
|
32
|
-
= link_to
|
32
|
+
= link_to t('tenon.fields.remove'), '#', class: 'remove-asset', data: { confirm: t('tenon.common.are_you_sure') }
|
@@ -1,8 +1,8 @@
|
|
1
1
|
- content_for :sidebar do
|
2
2
|
.sidebar
|
3
3
|
.content
|
4
|
-
%h2
|
5
|
-
= link_to
|
4
|
+
%h2= t('tenon.galleries.galleries')
|
5
|
+
= link_to t('tenon.galleries.new_gallery'), new_gallery_path, class: 'btn btn-block btn-primary'
|
6
6
|
|
7
7
|
= error_messages_for :gallery
|
8
8
|
|
@@ -13,18 +13,18 @@
|
|
13
13
|
|
14
14
|
.form-group
|
15
15
|
%p
|
16
|
-
= link_to_add_association
|
17
|
-
= link_to '
|
16
|
+
= link_to_add_association t('tenon.galleries.add_another_photo'), f, :photos, 'data-association-insertion-node' => '#photo-list', 'data-association-insertion-method' => 'append'
|
17
|
+
= link_to t('tenon.galleries.add_several'), new_item_asset_path(multiple: true), class: 'btn btn-comp browse', data: {'modal-remote' => true, 'modal-title' => "Select file", 'modal-handler' => 'Tenon.features.MultipleAssetAttachment', target: '.tn-tc-asset-fields' }
|
18
18
|
|
19
19
|
%ul.nested-field-list.sortable#photo-list
|
20
20
|
= f.nested_fields :photo
|
21
21
|
|
22
22
|
.fields.small
|
23
|
-
%h4.box-label
|
23
|
+
%h4.box-label= t('tenon.common.publish')
|
24
24
|
.box
|
25
25
|
.content
|
26
26
|
- if can?(:publish, @gallery)
|
27
|
-
= f.submit '
|
27
|
+
= f.submit t('tenon.common.save'), class: 'btn btn-block btn-comp', data: { disable_with: t('tenon.common.please_wait') }
|
28
28
|
|
29
29
|
- if can?(:create, Tenon::ItemVersion)
|
30
30
|
= save_draft_button(@gallery)
|
@@ -35,4 +35,4 @@
|
|
35
35
|
= clear_draft_link if params[:version]
|
36
36
|
= load_draft_link(@gallery)
|
37
37
|
- if @gallery.persisted?
|
38
|
-
= link_to
|
38
|
+
= link_to t('tenon.common.delete'), @gallery, :data => { :method => :delete, :confirm => t('tenon.common.are_you_sure') }, :class => 'delete-link'
|
@@ -1,10 +1,10 @@
|
|
1
1
|
- content_for :sidebar do
|
2
2
|
.sidebar
|
3
3
|
.content
|
4
|
-
%h2
|
5
|
-
= link_to
|
4
|
+
%h2= t('tenon.galleries.galleries')
|
5
|
+
= link_to t('tenon.galleries.new_gallery'), new_gallery_path, class: 'btn btn-block btn-primary'
|
6
6
|
%header
|
7
|
-
%h1
|
7
|
+
%h1= t('tenon.galleries.galleries')
|
8
8
|
|
9
9
|
.tools
|
10
10
|
= render "tenon/shared/section_header/sidebar_toggle"
|
@@ -17,6 +17,6 @@
|
|
17
17
|
= render "tenon/shared/section_header/quick_search", record_list: '#galleries'
|
18
18
|
|
19
19
|
.main-content
|
20
|
-
%ul#galleries.record-list{data: {records: {url: galleries_path(format: 'json'), template: 'tenon/templates/galleries/gallery_row', name: 'gallery'}}}
|
20
|
+
%ul#galleries.record-list{ data: { records: { url: galleries_path(format: 'json'), template: 'tenon/templates/galleries/gallery_row', name: 'gallery' } } }
|
21
21
|
|
22
|
-
= link_to
|
22
|
+
= link_to t('tenon.galleries.load_more'), '#', :class => 'btn btn-comp infinite-loader', 'data-record-list' => '#galleries'
|
@@ -1,22 +1,22 @@
|
|
1
1
|
- content_for :sidebar do
|
2
2
|
.sidebar
|
3
3
|
.content
|
4
|
-
%h2
|
4
|
+
%h2= t('tenon.index.notifications')
|
5
5
|
- unless @warnings.empty?
|
6
|
-
%h3
|
6
|
+
%h3= t('tenon.index.some_items_need_your_attention')
|
7
7
|
|
8
8
|
- @warnings.each do |warning|
|
9
9
|
.notification= warning
|
10
10
|
|
11
11
|
%header
|
12
|
-
%h1
|
12
|
+
%h1= t('tenon.index.welcome_to_tenon')
|
13
13
|
|
14
14
|
.tools
|
15
15
|
= render "tenon/shared/section_header/sidebar_toggle"
|
16
16
|
|
17
17
|
.main-content
|
18
18
|
#dashboard-callouts.container
|
19
|
-
|
19
|
+
- # change the count to test various quantities of callouts - eimaj
|
20
20
|
- @tenon_callouts.each do |callout|
|
21
21
|
.callout
|
22
22
|
%h4.title
|
@@ -1,7 +1,7 @@
|
|
1
1
|
.modal-tab-pane.tab-content
|
2
2
|
- unless params[:hide_upload]
|
3
3
|
#upload-asset
|
4
|
-
%h5
|
4
|
+
%h5= t('tenon.assets.from_your_computer')
|
5
5
|
#progress
|
6
6
|
= form_for Tenon::Asset.new, format: 'json', builder: Tenon::FormBuilder do |f|
|
7
7
|
= error_messages_for :asset
|
@@ -9,16 +9,16 @@
|
|
9
9
|
.form-group
|
10
10
|
.browse-button-holder.solo
|
11
11
|
.fileupload.btn.btn-comp.browse
|
12
|
-
%span#choose-files
|
12
|
+
%span#choose-files= t('tenon.common.browse')
|
13
13
|
%input{ :type => 'file', :class => 'upload', multiple: defined?(multiple) && multiple, style: 'width: 100%;', name: 'asset[attachment]' }
|
14
14
|
.spacer
|
15
15
|
|
16
16
|
#pick-asset
|
17
|
-
%h5
|
17
|
+
%h5= t('tenon.assets.from_the_asset_library')
|
18
18
|
|
19
|
-
.filter= text_field_tag :q, '', id: 'quick-search', class: 'filter search', placeholder: '
|
19
|
+
.filter= text_field_tag :q, '', id: 'quick-search', class: 'filter search', placeholder: t('tenon.assets.filter_assets'), data: { 'record-list' => '.asset-list' }
|
20
20
|
|
21
21
|
.asset-list-scroller
|
22
|
-
%ul#modal-asset-list.asset-list.record-grid.infinite-scroll{data: {records: {url: assets_path(format: 'json'), template: 'tenon/templates/assets/asset_row', name: 'asset'}}}
|
22
|
+
%ul#modal-asset-list.asset-list.record-grid.infinite-scroll{ data: { records: { url: assets_path(format: 'json'), template: 'tenon/templates/assets/asset_row', name: 'asset' } } }
|
23
23
|
|
24
|
-
= link_to
|
24
|
+
= link_to t('tenon.assets.load_more'), '#', :class => 'infinite-loader', 'data-record-list' => '#modal-asset-list'
|