trestle 0.8.8 → 0.8.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.travis.yml +3 -0
- data/Gemfile +2 -0
- data/app/assets/javascripts/trestle/components/_confirmation.js +31 -14
- data/app/assets/javascripts/trestle/components/_form.js +19 -15
- data/app/assets/javascripts/trestle/components/_tabs.js +1 -1
- data/app/assets/stylesheets/trestle/components/_avatar.scss +1 -2
- data/app/assets/stylesheets/trestle/components/_breadcrumbs.scss +12 -0
- data/app/assets/stylesheets/trestle/components/_buttons.scss +102 -1
- data/app/assets/stylesheets/trestle/components/_content.scss +41 -21
- data/app/assets/stylesheets/trestle/components/_input-group.scss +8 -1
- data/app/assets/stylesheets/trestle/components/_modal.scss +3 -0
- data/app/assets/stylesheets/trestle/components/_pagination.scss +0 -3
- data/app/assets/stylesheets/trestle/components/_scopes.scss +11 -2
- data/app/assets/stylesheets/trestle/components/_table.scss +34 -10
- data/app/assets/stylesheets/trestle/components/_timestamp.scss +4 -1
- data/app/assets/stylesheets/trestle/components/_toolbars.scss +55 -0
- data/app/assets/stylesheets/trestle/core/_defaults.scss +13 -2
- data/app/assets/stylesheets/trestle/core/_mixins.scss +11 -0
- data/app/helpers/trestle/avatar_helper.rb +4 -2
- data/app/helpers/trestle/{debug_helper.rb → flash_helper.rb} +5 -1
- data/app/helpers/trestle/form_helper.rb +1 -5
- data/app/helpers/trestle/hook_helper.rb +10 -6
- data/app/helpers/trestle/timestamp_helper.rb +49 -7
- data/app/helpers/trestle/toolbars_helper.rb +34 -0
- data/app/views/layouts/trestle/admin.html.erb +2 -2
- data/app/views/trestle/application/_dialog.html.erb +9 -11
- data/app/views/trestle/application/_header.html.erb +22 -20
- data/app/views/trestle/flash/_alert.html.erb +4 -1
- data/app/views/trestle/flash/_flash.html.erb +2 -2
- data/app/views/trestle/resource/edit.html.erb +4 -6
- data/app/views/trestle/resource/index.html.erb +15 -6
- data/app/views/trestle/resource/new.html.erb +2 -2
- data/app/views/trestle/resource/show.html.erb +4 -6
- data/app/views/trestle/shared/_sidebar.html.erb +3 -1
- data/app/views/trestle/shared/_title.html.erb +14 -0
- data/config/locales/en.yml +2 -0
- data/config/locales/es-MX.yml +94 -0
- data/config/locales/es.yml +94 -0
- data/config/locales/lv.rb +18 -0
- data/config/locales/lv.yml +94 -0
- data/gemfiles/rails-4.2.gemfile +2 -0
- data/gemfiles/rails-5.0.gemfile +2 -0
- data/gemfiles/rails-5.1.gemfile +2 -0
- data/gemfiles/rails-5.2.gemfile +2 -0
- data/gemfiles/rails-edge.gemfile +2 -0
- data/lib/generators/trestle/install/templates/trestle.rb.erb +12 -2
- data/lib/trestle/configuration.rb +9 -3
- data/lib/trestle/engine.rb +5 -3
- data/lib/trestle/form/fields/form_control.rb +14 -4
- data/lib/trestle/form/renderer.rb +2 -2
- data/lib/trestle/hook.rb +27 -0
- data/lib/trestle/table/actions_column.rb +31 -26
- data/lib/trestle/table/column.rb +1 -0
- data/lib/trestle/toolbar/builder.rb +52 -0
- data/lib/trestle/toolbar/context.rb +39 -0
- data/lib/trestle/toolbar.rb +43 -0
- data/lib/trestle/version.rb +1 -1
- data/lib/trestle.rb +2 -0
- metadata +15 -5
- data/app/helpers/trestle/title_helper.rb +0 -26
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
module Trestle
|
|
2
|
-
module
|
|
2
|
+
module FlashHelper
|
|
3
|
+
def normalize_flash_alert(flash)
|
|
4
|
+
flash.is_a?(Hash) ? flash.with_indifferent_access : { message: flash }
|
|
5
|
+
end
|
|
6
|
+
|
|
3
7
|
def debug_form_errors?
|
|
4
8
|
Trestle.config.debug_form_errors && instance_has_errors?
|
|
5
9
|
end
|
|
@@ -5,7 +5,7 @@ module Trestle
|
|
|
5
5
|
options[:as] ||= admin.parameter_name
|
|
6
6
|
|
|
7
7
|
options[:data] ||= {}
|
|
8
|
-
options[:data].
|
|
8
|
+
options[:data].reverse_merge!(remote: true, type: :html, behavior: "trestle-form", turbolinks: false)
|
|
9
9
|
|
|
10
10
|
form_for(instance, options) do |f|
|
|
11
11
|
with_form(f) { yield f }
|
|
@@ -23,10 +23,6 @@ module Trestle
|
|
|
23
23
|
@_trestle_form
|
|
24
24
|
end
|
|
25
25
|
|
|
26
|
-
def toolbar(name, &block)
|
|
27
|
-
content_for(:"#{name}_toolbar", &block)
|
|
28
|
-
end
|
|
29
|
-
|
|
30
26
|
def sidebar(&block)
|
|
31
27
|
content_for(:sidebar, &block)
|
|
32
28
|
end
|
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
module Trestle
|
|
2
2
|
module HookHelper
|
|
3
3
|
def hook(name)
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
if hook?(name)
|
|
5
|
+
safe_join(hooks(name).map { |hook|
|
|
6
|
+
hook.evaluate(self)
|
|
7
|
+
}, "\n")
|
|
8
|
+
elsif block_given?
|
|
9
|
+
yield
|
|
10
|
+
end
|
|
7
11
|
end
|
|
8
12
|
|
|
9
13
|
def hook?(name)
|
|
10
|
-
hooks.key?(name.to_s) && hooks
|
|
14
|
+
Trestle.config.hooks.key?(name.to_s) && hooks(name).any?
|
|
11
15
|
end
|
|
12
16
|
|
|
13
17
|
protected
|
|
14
|
-
def hooks
|
|
15
|
-
Trestle.config.hooks
|
|
18
|
+
def hooks(name)
|
|
19
|
+
Trestle.config.hooks[name.to_s].select { |h| h.visible?(self) }
|
|
16
20
|
end
|
|
17
21
|
end
|
|
18
22
|
end
|
|
@@ -1,17 +1,59 @@
|
|
|
1
1
|
module Trestle
|
|
2
2
|
module TimestampHelper
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
# Renders a Time object as a formatted timestamp (using a <time> tag)
|
|
4
|
+
#
|
|
5
|
+
# time - The Time object to format.
|
|
6
|
+
# options - Hash of options (default: {}):
|
|
7
|
+
# :class - Additional HTML classes to add to the <time> tag.
|
|
8
|
+
# :precision - Time precision, either :minutes or :seconds (default: :minutes).
|
|
9
|
+
# :date_format - I18n date format to use for the date (default: :trestle_date).
|
|
10
|
+
# :time_format - I18n time format to use for the time (default: :trestle_time).
|
|
11
|
+
#
|
|
12
|
+
# Examples
|
|
13
|
+
#
|
|
14
|
+
# <%= timestamp(article.created_at) %>
|
|
15
|
+
#
|
|
16
|
+
# <%= timestamp(Time.current, class: "timestamp-inline", precision: :seconds) %>
|
|
17
|
+
#
|
|
18
|
+
# Returns the HTML representation of the given Time.
|
|
19
|
+
def timestamp(time, options={})
|
|
20
|
+
return unless time
|
|
21
|
+
|
|
22
|
+
classes = ["timestamp", options[:class]].compact
|
|
23
|
+
precision = options.fetch(:precision) { Trestle.config.timestamp_precision }
|
|
24
|
+
date_format = options.fetch(:date_format) { :trestle_date }
|
|
25
|
+
time_format = options.fetch(:time_format) { precision == :seconds ? :trestle_time_with_seconds : :trestle_time }
|
|
26
|
+
|
|
27
|
+
time_tag(time, class: classes) do
|
|
5
28
|
safe_join([
|
|
6
|
-
l(time, format:
|
|
7
|
-
content_tag(:small, l(time, format:
|
|
29
|
+
l(time, format: date_format, default: proc { |date| "#{date.day.ordinalize} %b %Y" }),
|
|
30
|
+
content_tag(:small, l(time, format: time_format, default: "%l:%M:%S %p"))
|
|
8
31
|
], "\n")
|
|
9
32
|
end
|
|
10
33
|
end
|
|
11
34
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
35
|
+
# Renders a Date object as formatted datestamp (using a <time> tag)
|
|
36
|
+
#
|
|
37
|
+
# date - The Date object to format.
|
|
38
|
+
# options - Hash of options (default: {}):
|
|
39
|
+
# :class - Additional HTML classes to add to the <time> tag.
|
|
40
|
+
# :format - I18n date format to use (default: :trestle_calendar).
|
|
41
|
+
#
|
|
42
|
+
# Examples
|
|
43
|
+
#
|
|
44
|
+
# <%= datestamp(Date.current) %>
|
|
45
|
+
#
|
|
46
|
+
# <%= datestamp(article.created_at, format: :trestle_date, class: "custom-datestamp") %>
|
|
47
|
+
#
|
|
48
|
+
# Returns the HTML representation of the given Date.
|
|
49
|
+
def datestamp(date, options={})
|
|
50
|
+
return unless date
|
|
51
|
+
|
|
52
|
+
classes = ["datestamp", options[:class]].compact
|
|
53
|
+
format = options.fetch(:format) { :trestle_calendar}
|
|
54
|
+
|
|
55
|
+
time_tag(date, class: classes) do
|
|
56
|
+
l(date, format: format, default: "%-m/%-d/%Y")
|
|
15
57
|
end
|
|
16
58
|
end
|
|
17
59
|
end
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
module Trestle
|
|
2
|
+
module ToolbarsHelper
|
|
3
|
+
def toolbar(name, &block)
|
|
4
|
+
toolbar = (toolbars[name.to_s] ||= Toolbar.new)
|
|
5
|
+
toolbar.prepend(&block) if block_given?
|
|
6
|
+
toolbar
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
def toolbars
|
|
10
|
+
@_toolbars ||= {}
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def render_toolbar(toolbar, *args)
|
|
14
|
+
result = toolbar.groups(self, *args).map do |items|
|
|
15
|
+
if items.many?
|
|
16
|
+
content_tag(:div, class: "btn-group", role: "group") do
|
|
17
|
+
safe_join(items, "\n")
|
|
18
|
+
end
|
|
19
|
+
else
|
|
20
|
+
items.first
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
safe_join(result, "\n")
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def deprecated_toolbar(name)
|
|
28
|
+
if content_for?(:"#{name}_toolbar")
|
|
29
|
+
ActiveSupport::Deprecation.warn("Using content_for(:#{name}_toolbar) is deprecated. Please use toolbar(:#{name}) instead.")
|
|
30
|
+
content_for(:"#{name}_toolbar")
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
@@ -36,14 +36,14 @@
|
|
|
36
36
|
<%= hook :head %>
|
|
37
37
|
</head>
|
|
38
38
|
|
|
39
|
-
<body<%= " class=\"sidebar-#{cookies["trestle:sidebar"]}\"" if cookies["trestle:sidebar"] %>>
|
|
39
|
+
<body<%=raw " class=\"sidebar-#{cookies["trestle:sidebar"]}\"" if cookies["trestle:sidebar"] %>>
|
|
40
40
|
<div class="app-wrapper">
|
|
41
41
|
<%= render "trestle/shared/sidebar" %>
|
|
42
42
|
|
|
43
43
|
<div class="app-container">
|
|
44
44
|
<%= render "trestle/shared/header" %>
|
|
45
45
|
|
|
46
|
-
<main class="app-main" data-context="<%= request.
|
|
46
|
+
<main class="app-main" data-context="<%= request.fullpath %>">
|
|
47
47
|
<%= yield %>
|
|
48
48
|
</main>
|
|
49
49
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
</div>
|
|
5
5
|
|
|
6
6
|
<div class="modal-flash">
|
|
7
|
-
<%= render "flash" %>
|
|
7
|
+
<%= render "trestle/flash/flash" %>
|
|
8
8
|
</div>
|
|
9
9
|
|
|
10
10
|
<div class="modal-tabs">
|
|
@@ -22,15 +22,13 @@
|
|
|
22
22
|
</div>
|
|
23
23
|
|
|
24
24
|
<div class="modal-footer">
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
<% end %>
|
|
25
|
+
<div class="btn-toolbar secondary-toolbar">
|
|
26
|
+
<%= render_toolbar(toolbar(:secondary)) %>
|
|
27
|
+
<%= deprecated_toolbar(:secondary) %>
|
|
28
|
+
</div>
|
|
30
29
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
<% end %>
|
|
30
|
+
<div class="btn-toolbar primary-toolbar">
|
|
31
|
+
<%= render_toolbar(toolbar(:primary)) %>
|
|
32
|
+
<%= deprecated_toolbar(:primary) %>
|
|
33
|
+
</div>
|
|
36
34
|
</div>
|
|
@@ -1,27 +1,29 @@
|
|
|
1
1
|
<header class="content-header">
|
|
2
|
-
|
|
2
|
+
<div class="content-header-title">
|
|
3
|
+
<h1>
|
|
4
|
+
<%= content_for(:title) %>
|
|
5
|
+
</h1>
|
|
6
|
+
|
|
7
|
+
<% unless local_assigns.fetch(:hide_breadcrumbs, false) %>
|
|
8
|
+
<ol class="breadcrumb">
|
|
9
|
+
<% breadcrumbs.each do |breadcrumb| %>
|
|
10
|
+
<li class="breadcrumb-item<% if breadcrumb == breadcrumbs.last %> active<% end %>">
|
|
11
|
+
<%= link_to breadcrumb.label, breadcrumb.path %>
|
|
12
|
+
</li>
|
|
13
|
+
<% end %>
|
|
14
|
+
</ol>
|
|
15
|
+
<% end %>
|
|
16
|
+
</div>
|
|
17
|
+
|
|
18
|
+
<div class="content-header-toolbars">
|
|
3
19
|
<div class="btn-toolbar primary-toolbar">
|
|
4
|
-
<%=
|
|
20
|
+
<%= render_toolbar(toolbar(:primary)) %>
|
|
21
|
+
<%= deprecated_toolbar(:primary) %>
|
|
5
22
|
</div>
|
|
6
|
-
<% end %>
|
|
7
23
|
|
|
8
|
-
<% if content_for?(:secondary_toolbar) %>
|
|
9
24
|
<div class="btn-toolbar secondary-toolbar">
|
|
10
|
-
<%=
|
|
25
|
+
<%= render_toolbar(toolbar(:secondary)) %>
|
|
26
|
+
<%= deprecated_toolbar(:secondary) %>
|
|
11
27
|
</div>
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
<h1>
|
|
15
|
-
<%= content_for(:title) %>
|
|
16
|
-
</h1>
|
|
17
|
-
|
|
18
|
-
<% unless local_assigns.fetch(:hide_breadcrumbs, false) %>
|
|
19
|
-
<ol class="breadcrumb">
|
|
20
|
-
<% breadcrumbs.each do |breadcrumb| %>
|
|
21
|
-
<li class="breadcrumb-item<% if breadcrumb == breadcrumbs.last %> active<% end %>">
|
|
22
|
-
<%= link_to breadcrumb.label, breadcrumb.path %>
|
|
23
|
-
</li>
|
|
24
|
-
<% end %>
|
|
25
|
-
</ol>
|
|
26
|
-
<% end %>
|
|
28
|
+
</div>
|
|
27
29
|
</header>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<% if flash[:message] -%>
|
|
2
|
-
<%= render "trestle/flash/alert", html_class: "alert-success", icon: icon("alert-icon ion-ios-checkmark-outline"), alert: flash[:message]
|
|
2
|
+
<%= render "trestle/flash/alert", html_class: "alert-success", icon: icon("alert-icon ion-ios-checkmark-outline"), alert: normalize_flash_alert(flash[:message]) %>
|
|
3
3
|
<% elsif flash[:error] -%>
|
|
4
|
-
<%= render layout: "trestle/flash/alert", locals: { html_class: "alert-danger", icon: icon("alert-icon ion-ios-close-outline"), alert: flash[:error]
|
|
4
|
+
<%= render layout: "trestle/flash/alert", locals: { html_class: "alert-danger", icon: icon("alert-icon ion-ios-close-outline"), alert: normalize_flash_alert(flash[:error]) } do %>
|
|
5
5
|
<%= render "trestle/flash/debug" if debug_form_errors? %>
|
|
6
6
|
<% end %>
|
|
7
7
|
<% end -%>
|
|
@@ -3,14 +3,12 @@
|
|
|
3
3
|
<% content_for(:title, title) %>
|
|
4
4
|
<% breadcrumb(title) %>
|
|
5
5
|
|
|
6
|
-
<%
|
|
7
|
-
<%=
|
|
6
|
+
<% toolbar(:primary) do |t| %>
|
|
7
|
+
<%= t.button admin.t("buttons.save", default: "Save %{model_name}"), style: :success if admin.actions.include?(:update) %>
|
|
8
8
|
<% end %>
|
|
9
9
|
|
|
10
|
-
<%
|
|
11
|
-
<%=
|
|
12
|
-
<%= icon("fa fa-trash") %> <%= admin.t("buttons.delete", default: "Delete %{model_name}") %>
|
|
13
|
-
<% end if admin.actions.include?(:destroy) %>
|
|
10
|
+
<% toolbar(:secondary) do |t| %>
|
|
11
|
+
<%= t.link admin.t("buttons.delete", default: "Delete %{model_name}"), instance, action: :destroy, method: :delete, style: :danger, icon: "fa fa-trash", data: { toggle: "confirm-delete", placement: "bottom" } if admin.actions.include?(:destroy) %>
|
|
14
12
|
<% end %>
|
|
15
13
|
|
|
16
14
|
<%= trestle_form_for instance, url: admin.actions.include?(:update) ? admin.instance_path(instance, action: :update) : "#", method: :patch do |f| %>
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
<% content_for(:title, admin.t("titles.index", default: "Listing %{pluralized_model_name}")) %>
|
|
2
2
|
|
|
3
|
-
<%
|
|
4
|
-
<%=
|
|
5
|
-
<%= icon("fa fa-plus") %>
|
|
6
|
-
<span class="sr-only"><%= admin.t("buttons.new", default: "New %{model_name}") %></span>
|
|
7
|
-
<% end if admin.actions.include?(:new) %>
|
|
3
|
+
<% toolbar(:primary) do |t| %>
|
|
4
|
+
<%= t.link admin.t("buttons.new", default: "New %{model_name}"), action: :new, icon: "fa fa-plus", class: "btn-new-resource" if admin.actions.include?(:new) %>
|
|
8
5
|
<% end %>
|
|
9
6
|
|
|
10
7
|
<% content_for(:utilities) do %>
|
|
@@ -12,5 +9,17 @@
|
|
|
12
9
|
<% end if admin.scopes.any? %>
|
|
13
10
|
|
|
14
11
|
<%= render layout: "layout" do %>
|
|
15
|
-
|
|
12
|
+
<% if hook?("resource.index.header") %>
|
|
13
|
+
<header class="main-content-header">
|
|
14
|
+
<%= hook("resource.index.header") %>
|
|
15
|
+
</header>
|
|
16
|
+
<% end %>
|
|
17
|
+
|
|
18
|
+
<%= render "trestle/table/table", table: admin.table, collection: collection %>
|
|
19
|
+
|
|
20
|
+
<footer class="main-content-footer">
|
|
21
|
+
<%= hook("resource.index.footer") %>
|
|
22
|
+
|
|
23
|
+
<%= render "trestle/table/pagination", collection: collection, entry_name: admin.model_name %>
|
|
24
|
+
</footer>
|
|
16
25
|
<% end %>
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
<% content_for(:title, title) %>
|
|
4
4
|
<% breadcrumb(title) %>
|
|
5
5
|
|
|
6
|
-
<%
|
|
7
|
-
<%=
|
|
6
|
+
<% toolbar(:primary) do |t| %>
|
|
7
|
+
<%= t.button admin.t("buttons.save", default: "Save %{model_name}"), style: :success if admin.actions.include?(:create) %>
|
|
8
8
|
<% end %>
|
|
9
9
|
|
|
10
10
|
<%= trestle_form_for instance, url: admin.path(:create), method: :post do |f| %>
|
|
@@ -3,14 +3,12 @@
|
|
|
3
3
|
<% content_for(:title, title) %>
|
|
4
4
|
<% breadcrumb(title) unless admin.singular? %>
|
|
5
5
|
|
|
6
|
-
<%
|
|
7
|
-
<%=
|
|
6
|
+
<% toolbar(:primary) do |t| %>
|
|
7
|
+
<%= t.button admin.t("buttons.save", default: "Save %{model_name}"), style: :success if admin.actions.include?(:update) %>
|
|
8
8
|
<% end %>
|
|
9
9
|
|
|
10
|
-
<%
|
|
11
|
-
<%=
|
|
12
|
-
<%= icon("fa fa-trash") %> <%= admin.t("buttons.delete", default: "Delete %{model_name}") %>
|
|
13
|
-
<% end if admin.actions.include?(:destroy) %>
|
|
10
|
+
<% toolbar(:secondary) do |t| %>
|
|
11
|
+
<%= t.link admin.t("buttons.delete", default: "Delete %{model_name}"), instance, action: :destroy, method: :delete, style: :danger, icon: "fa fa-trash", data: { toggle: "confirm-delete", placement: "bottom" } if admin.actions.include?(:destroy) %>
|
|
14
12
|
<% end %>
|
|
15
13
|
|
|
16
14
|
<%= trestle_form_for instance, url: admin.actions.include?(:update) ? admin.instance_path(instance, action: :update) : "#", method: :patch do |f| %>
|
|
@@ -7,7 +7,9 @@
|
|
|
7
7
|
<span class="icon-bar"></span>
|
|
8
8
|
</button>
|
|
9
9
|
|
|
10
|
-
<%= link_to
|
|
10
|
+
<%= link_to Trestle.config.root, class: "navbar-brand" do %>
|
|
11
|
+
<%= hook("view.title") { render "trestle/shared/title" } %>
|
|
12
|
+
<% end %>
|
|
11
13
|
</header>
|
|
12
14
|
|
|
13
15
|
<div class="app-sidebar-inner">
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<% if Trestle.config.site_logo %>
|
|
2
|
+
<% if Trestle.config.site_logo_small %>
|
|
3
|
+
<%= image_tag(Trestle.config.site_logo, class: "visible-xs-inline visible-lg-inline", alt: Trestle.config.site_title) %>
|
|
4
|
+
<%= image_tag(Trestle.config.site_logo_small, class: "visible-sm-inline visible-md-inline", alt: Trestle.config.site_title) %>
|
|
5
|
+
<% else %>
|
|
6
|
+
<%= image_tag(Trestle.config.site_logo) %>
|
|
7
|
+
<% end %>
|
|
8
|
+
<% elsif Trestle.config.site_logo_small %>
|
|
9
|
+
<%= image_tag(Trestle.config.site_logo_small, alt: "") %>
|
|
10
|
+
<span class="visible-xs-inline visible-lg-inline"><%= Trestle.config.site_title %></span>
|
|
11
|
+
<% else %>
|
|
12
|
+
<span class="visible-xs-inline visible-lg-inline"><%= Trestle.config.site_title %></span>
|
|
13
|
+
<span class="visible-sm-inline visible-md-inline"><%= Trestle.config.site_title.split(/ /).map(&:first).first(3).join %></span>
|
|
14
|
+
<% end %>
|
data/config/locales/en.yml
CHANGED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
es-MX:
|
|
2
|
+
trestle:
|
|
3
|
+
title: "Trestle Administrador"
|
|
4
|
+
footer: "Impulsado por Trestle"
|
|
5
|
+
version: "Version"
|
|
6
|
+
|
|
7
|
+
helpers:
|
|
8
|
+
page_entries_info:
|
|
9
|
+
one_page:
|
|
10
|
+
display_entries:
|
|
11
|
+
zero: "No %{entry_name} encontrado"
|
|
12
|
+
one: "Mostrando <strong>1</strong> %{entry_name}"
|
|
13
|
+
other: "Mostrando <strong>total %{count}</strong> %{entry_name}"
|
|
14
|
+
|
|
15
|
+
more_pages:
|
|
16
|
+
display_entries: "Mostrando %{entry_name} <strong>%{first} - %{last}</strong> of <b>%{total}</b>"
|
|
17
|
+
|
|
18
|
+
onboarding:
|
|
19
|
+
welcome: "Bienvenido a Trestle"
|
|
20
|
+
no_admins: "Para poder ingresar, por favor crea una cuenta de administrador en <code>app/admin</code>."
|
|
21
|
+
no_template: "Para personalizar esta plantilla, por favor crea en <code>%{path}</code>."
|
|
22
|
+
no_form: "Por favor define una forma de bloque o crea un parcial <code>_form.html</code>."
|
|
23
|
+
|
|
24
|
+
ui:
|
|
25
|
+
toggle_navigation: "Cambiar (modo de) navegación"
|
|
26
|
+
toggle_sidebar: "Alternar la barra lateral"
|
|
27
|
+
|
|
28
|
+
dialog:
|
|
29
|
+
error: "La solicitud no pudo ser completada."
|
|
30
|
+
|
|
31
|
+
confirmation:
|
|
32
|
+
title: "¿Estás seguro?"
|
|
33
|
+
delete: "Borrar"
|
|
34
|
+
cancel: "Cancelar"
|
|
35
|
+
|
|
36
|
+
admin:
|
|
37
|
+
titles:
|
|
38
|
+
index: "Listado de %{pluralized_model_name}"
|
|
39
|
+
new: "Nuevo %{model_name}"
|
|
40
|
+
edit: "Editando %{model_name}"
|
|
41
|
+
|
|
42
|
+
buttons:
|
|
43
|
+
new: "Nuevo %{model_name}"
|
|
44
|
+
save: "Guardar %{model_name}"
|
|
45
|
+
delete: "Borrar %{model_name}"
|
|
46
|
+
ok: "Aceptar"
|
|
47
|
+
|
|
48
|
+
breadcrumbs:
|
|
49
|
+
home: "Inicio"
|
|
50
|
+
|
|
51
|
+
flash:
|
|
52
|
+
create:
|
|
53
|
+
success:
|
|
54
|
+
title: "¡Exitosamente!"
|
|
55
|
+
message: "El %{lowercase_model_name} fue creado exitosamente."
|
|
56
|
+
|
|
57
|
+
failure:
|
|
58
|
+
title: "¡Advertencia!"
|
|
59
|
+
message: "Por favor corrige los siguientes errores."
|
|
60
|
+
|
|
61
|
+
update:
|
|
62
|
+
success:
|
|
63
|
+
title: "¡Exitosamente!"
|
|
64
|
+
message: "El %{lowercase_model_name} se actualizo exitosamente."
|
|
65
|
+
|
|
66
|
+
failure:
|
|
67
|
+
title: "¡Advertencia!"
|
|
68
|
+
message: "Por favor corrige los siguientes errores."
|
|
69
|
+
|
|
70
|
+
destroy:
|
|
71
|
+
success:
|
|
72
|
+
title: "¡Exitosamente!"
|
|
73
|
+
message: "El %{lowercase_model_name} fue borrado exitosamente."
|
|
74
|
+
|
|
75
|
+
failure:
|
|
76
|
+
title: "¡Advertencia!"
|
|
77
|
+
message: "%{lowercase_model_name} no pudo ser borrado."
|
|
78
|
+
|
|
79
|
+
table:
|
|
80
|
+
headers:
|
|
81
|
+
id: "ID"
|
|
82
|
+
|
|
83
|
+
form:
|
|
84
|
+
select:
|
|
85
|
+
prompt: "- Selecciona %{attribute_name} -"
|
|
86
|
+
|
|
87
|
+
format:
|
|
88
|
+
blank: "Ninguno"
|
|
89
|
+
|
|
90
|
+
datepicker:
|
|
91
|
+
formats:
|
|
92
|
+
date: "m/d/Y"
|
|
93
|
+
datetime: "m/d/Y h:i K"
|
|
94
|
+
time: "h:i K"
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
es:
|
|
2
|
+
trestle:
|
|
3
|
+
title: "Trestle Administrador"
|
|
4
|
+
footer: "Patrocinado por Trestle"
|
|
5
|
+
version: "Version"
|
|
6
|
+
|
|
7
|
+
helpers:
|
|
8
|
+
page_entries_info:
|
|
9
|
+
one_page:
|
|
10
|
+
display_entries:
|
|
11
|
+
zero: "No %{entry_name} encontrado"
|
|
12
|
+
one: "Mostrando <strong>1</strong> %{entry_name}"
|
|
13
|
+
other: "Mostrando <strong>total %{count}</strong> %{entry_name}"
|
|
14
|
+
|
|
15
|
+
more_pages:
|
|
16
|
+
display_entries: "Mostrando %{entry_name} <strong>%{first} - %{last}</strong> of <b>%{total}</b>"
|
|
17
|
+
|
|
18
|
+
onboarding:
|
|
19
|
+
welcome: "Bienvenido a Trestle"
|
|
20
|
+
no_admins: "Para poder ingresar, por favor crea una cuenta de administrador en <code>app/admin</code>."
|
|
21
|
+
no_template: "Para personalizar esta plantilla, por favor crea <code>%{path}</code>."
|
|
22
|
+
no_form: "Por favor define una forma de bloque o crea un parcial <code>_form.html</code>."
|
|
23
|
+
|
|
24
|
+
ui:
|
|
25
|
+
toggle_navigation: "Cambiar (modo de) navegación"
|
|
26
|
+
toggle_sidebar: "Alternar la barra lateral"
|
|
27
|
+
|
|
28
|
+
dialog:
|
|
29
|
+
error: "La solicitud no pudo ser completada."
|
|
30
|
+
|
|
31
|
+
confirmation:
|
|
32
|
+
title: "¿Estás seguro?"
|
|
33
|
+
delete: "Borrar"
|
|
34
|
+
cancel: "Cancelar"
|
|
35
|
+
|
|
36
|
+
admin:
|
|
37
|
+
titles:
|
|
38
|
+
index: "Listado de %{pluralized_model_name}"
|
|
39
|
+
new: "Nuevo %{model_name}"
|
|
40
|
+
edit: "Editando %{model_name}"
|
|
41
|
+
|
|
42
|
+
buttons:
|
|
43
|
+
new: "Nuevo %{model_name}"
|
|
44
|
+
save: "Guardar %{model_name}"
|
|
45
|
+
delete: "Borrar %{model_name}"
|
|
46
|
+
ok: "Aceptar"
|
|
47
|
+
|
|
48
|
+
breadcrumbs:
|
|
49
|
+
home: "Inicio"
|
|
50
|
+
|
|
51
|
+
flash:
|
|
52
|
+
create:
|
|
53
|
+
success:
|
|
54
|
+
title: "¡Exito!"
|
|
55
|
+
message: "El %{lowercase_model_name} fue creado exitosamente."
|
|
56
|
+
|
|
57
|
+
failure:
|
|
58
|
+
title: "¡Advertencia!"
|
|
59
|
+
message: "Por favor corrige los siguientes errores."
|
|
60
|
+
|
|
61
|
+
update:
|
|
62
|
+
success:
|
|
63
|
+
title: "¡Exito!"
|
|
64
|
+
message: "El %{lowercase_model_name} se actualizo exitosamente."
|
|
65
|
+
|
|
66
|
+
failure:
|
|
67
|
+
title: "¡Advertencia!"
|
|
68
|
+
message: "Por favor corrige los siguientes errores."
|
|
69
|
+
|
|
70
|
+
destroy:
|
|
71
|
+
success:
|
|
72
|
+
title: "¡Exito!"
|
|
73
|
+
message: "El %{lowercase_model_name} fue borrado exitosamente."
|
|
74
|
+
|
|
75
|
+
failure:
|
|
76
|
+
title: "¡Advertencia!"
|
|
77
|
+
message: "%{lowercase_model_name} no pudo ser borrado."
|
|
78
|
+
|
|
79
|
+
table:
|
|
80
|
+
headers:
|
|
81
|
+
id: "ID"
|
|
82
|
+
|
|
83
|
+
form:
|
|
84
|
+
select:
|
|
85
|
+
prompt: "- Selecciona %{attribute_name} -"
|
|
86
|
+
|
|
87
|
+
format:
|
|
88
|
+
blank: "Ninguno"
|
|
89
|
+
|
|
90
|
+
datepicker:
|
|
91
|
+
formats:
|
|
92
|
+
date: "m/d/Y"
|
|
93
|
+
datetime: "m/d/Y h:i K"
|
|
94
|
+
time: "h:i K"
|