typus 3.1.0.rc8 → 3.1.0.rc9
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitmodules +1 -1
- data/app/controllers/admin/resources_controller.rb +29 -13
- data/app/helpers/admin/resources/data_types/datetime_helper.rb +2 -0
- data/app/helpers/admin/resources/data_types/dragonfly_helper.rb +1 -2
- data/app/helpers/admin/resources/data_types/float_helper.rb +0 -1
- data/app/helpers/admin/resources/data_types/paperclip_helper.rb +11 -13
- data/app/helpers/admin/resources/data_types/string_helper.rb +2 -0
- data/app/helpers/admin/resources/filters_helper.rb +14 -16
- data/app/helpers/admin/resources/relationships_helper.rb +1 -5
- data/app/helpers/admin/resources_helper.rb +1 -1
- data/app/mailers/admin/mailer.rb +1 -2
- data/app/themes/default/assets/javascripts/typus.js +8 -0
- data/app/{assets → themes/default/assets}/javascripts/typus/application.js +0 -1
- data/app/{assets → themes/default/assets}/javascripts/typus/jquery.application.js +0 -0
- data/app/{assets → themes/default/assets}/stylesheets/typus.css +2 -1
- data/app/{assets → themes/default/assets}/stylesheets/typus/application.css +0 -0
- data/app/{assets → themes/default/assets}/stylesheets/typus/pagination.css +0 -0
- data/app/{assets → themes/default/assets}/stylesheets/typus/reset.css +0 -0
- data/app/{assets → themes/default/assets}/stylesheets/typus/screen.css +0 -0
- data/app/{views → themes/default/views}/admin/account/forgot_password.html.erb +0 -0
- data/app/{views → themes/default/views}/admin/account/new.html.erb +0 -0
- data/app/{views → themes/default/views}/admin/base/user_guide.html.erb +0 -0
- data/app/{views → themes/default/views}/admin/dashboard/_applications.html.erb +0 -0
- data/app/{views → themes/default/views}/admin/dashboard/_sidebar.html.erb +0 -0
- data/app/{views → themes/default/views}/admin/dashboard/show.html.erb +0 -0
- data/app/{views → themes/default/views}/admin/dashboard/styles.html.erb +0 -0
- data/app/{views → themes/default/views}/admin/mailer/reset_password_link.text.erb +0 -0
- data/app/{views → themes/default/views}/admin/resources/_edit.html.erb +0 -0
- data/app/{views → themes/default/views}/admin/resources/_form.html.erb +0 -0
- data/app/{views → themes/default/views}/admin/resources/_index.html.erb +0 -0
- data/app/{views → themes/default/views}/admin/resources/_new.html.erb +0 -0
- data/app/{views → themes/default/views}/admin/resources/_show.html.erb +0 -0
- data/app/{views → themes/default/views}/admin/resources/edit.html.erb +0 -0
- data/app/{views → themes/default/views}/admin/resources/index.html.erb +0 -0
- data/app/{views → themes/default/views}/admin/resources/new.html.erb +0 -0
- data/app/{views → themes/default/views}/admin/resources/show.html.erb +0 -0
- data/app/{views → themes/default/views}/admin/session/new.html.erb +0 -0
- data/app/{views → themes/default/views}/admin/shared/_head.html.erb +0 -0
- data/app/{views → themes/default/views}/admin/templates/_belongs_to.html.erb +0 -0
- data/app/{views → themes/default/views}/admin/templates/_belongs_to_with_autocomplete.html.erb +1 -1
- data/app/{views → themes/default/views}/admin/templates/_boolean.html.erb +0 -0
- data/app/{views → themes/default/views}/admin/templates/_date.html.erb +0 -0
- data/app/{views → themes/default/views}/admin/templates/_datetime.html.erb +0 -0
- data/app/{views → themes/default/views}/admin/templates/_dragonfly.html.erb +0 -0
- data/app/{views → themes/default/views}/admin/templates/_dragonfly_preview.html.erb +0 -0
- data/app/{views → themes/default/views}/admin/templates/_has_n.html.erb +0 -0
- data/app/{views → themes/default/views}/admin/templates/_has_one.html.erb +0 -0
- data/app/{views → themes/default/views}/admin/templates/_paperclip.html.erb +0 -0
- data/app/{views → themes/default/views}/admin/templates/_paperclip_preview.html.erb +0 -0
- data/app/{views → themes/default/views}/admin/templates/_password.html.erb +0 -0
- data/app/{views → themes/default/views}/admin/templates/_profile_sidebar.html.erb +0 -0
- data/app/{views → themes/default/views}/admin/templates/_selector.html.erb +0 -0
- data/app/{views → themes/default/views}/admin/templates/_string.html.erb +0 -0
- data/app/{views → themes/default/views}/admin/templates/_string_with_preview.html.erb +0 -0
- data/app/{views → themes/default/views}/admin/templates/_text.html.erb +0 -0
- data/app/{views → themes/default/views}/admin/templates/_text_with_ckeditor.html.erb +1 -1
- data/app/{views → themes/default/views}/admin/templates/_text_with_ckeditor_and_assets.html.erb +1 -1
- data/app/{views → themes/default/views}/admin/templates/_time.html.erb +0 -0
- data/app/{views → themes/default/views}/admin/templates/_tree.html.erb +0 -0
- data/app/{views → themes/default/views}/helpers/admin/base/_apps.html.erb +0 -0
- data/app/{views → themes/default/views}/helpers/admin/base/_flash_message.html.erb +0 -0
- data/app/{views → themes/default/views}/helpers/admin/base/_header.html.erb +0 -0
- data/app/{views → themes/default/views}/helpers/admin/base/_login_info.html.erb +0 -0
- data/app/{views → themes/default/views}/helpers/admin/dashboard/_resources.html.erb +0 -0
- data/app/{views → themes/default/views}/helpers/admin/resources/_actions.html.erb +0 -0
- data/app/{views → themes/default/views}/helpers/admin/resources/_errors.html.erb +0 -0
- data/app/{views → themes/default/views}/helpers/admin/resources/_filters.html.erb +0 -0
- data/app/{views → themes/default/views}/helpers/admin/resources/_search.html.erb +0 -0
- data/app/{views → themes/default/views}/helpers/admin/resources/_sidebar.html.erb +0 -0
- data/app/{views → themes/default/views}/helpers/admin/resources/_table.html.erb +0 -0
- data/app/{views → themes/default/views}/layouts/admin/base.html.erb +0 -0
- data/app/{views → themes/default/views}/layouts/admin/headless.html.erb +0 -0
- data/app/{views → themes/default/views}/layouts/admin/session.html.erb +0 -0
- data/config/locales/typus.pt-PT.models.yml +17 -0
- data/config/locales/typus.pt-PT.yml +83 -0
- data/lib/typus.rb +3 -2
- data/lib/typus/controller/associations.rb +1 -1
- data/lib/typus/controller/format.rb +1 -1
- data/lib/typus/engine.rb +2 -1
- data/lib/typus/orm/base.rb +1 -1
- data/lib/typus/version.rb +1 -1
- data/typus.gemspec +1 -1
- data/{app → vendor}/assets/images/blank.gif +0 -0
- data/{app → vendor}/assets/images/fancy_close.png +0 -0
- data/{app → vendor}/assets/images/fancy_loading.png +0 -0
- data/{app → vendor}/assets/images/fancy_nav_left.png +0 -0
- data/{app → vendor}/assets/images/fancy_nav_right.png +0 -0
- data/{app → vendor}/assets/images/fancy_shadow_e.png +0 -0
- data/{app → vendor}/assets/images/fancy_shadow_n.png +0 -0
- data/{app → vendor}/assets/images/fancy_shadow_ne.png +0 -0
- data/{app → vendor}/assets/images/fancy_shadow_nw.png +0 -0
- data/{app → vendor}/assets/images/fancy_shadow_s.png +0 -0
- data/{app → vendor}/assets/images/fancy_shadow_se.png +0 -0
- data/{app → vendor}/assets/images/fancy_shadow_sw.png +0 -0
- data/{app → vendor}/assets/images/fancy_shadow_w.png +0 -0
- data/{app → vendor}/assets/images/fancy_title_left.png +0 -0
- data/{app → vendor}/assets/images/fancy_title_main.png +0 -0
- data/{app → vendor}/assets/images/fancy_title_over.png +0 -0
- data/{app → vendor}/assets/images/fancy_title_right.png +0 -0
- data/{app → vendor}/assets/images/fancybox-x.png +0 -0
- data/{app → vendor}/assets/images/fancybox-y.png +0 -0
- data/{app → vendor}/assets/images/fancybox.png +0 -0
- data/{app/assets/vendor/jquery.fancybox-1.3.4/fancybox → vendor/assets/javascripts}/jquery.fancybox-1.3.4.pack.js +0 -0
- data/{app/assets/javascripts/typus → vendor/assets/javascripts}/jquery.rails.autocomplete.js +0 -0
- data/{app/assets/javascripts/typus → vendor/assets/javascripts}/jquery.searchField.js +0 -0
- data/{app/assets/vendor/jquery-tokeninput/js → vendor/assets/javascripts}/jquery.tokeninput.js +0 -0
- data/{app/assets/vendor/jquery.fancybox-1.3.4/fancybox → vendor/assets/stylesheets}/jquery.fancybox-1.3.4.css +0 -0
- data/{app/assets/vendor/jquery-tokeninput/css → vendor/assets/stylesheets}/token-input.css +0 -0
- metadata +175 -219
- data/app/assets/javascripts/typus.js +0 -7
- data/app/assets/vendor/jquery-tokeninput/css/token-input-facebook.css +0 -122
- data/app/assets/vendor/jquery-tokeninput/css/token-input-mac.css +0 -204
- data/app/assets/vendor/jquery-ui-1.8.12.custom/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png +0 -0
- data/app/assets/vendor/jquery-ui-1.8.12.custom/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png +0 -0
- data/app/assets/vendor/jquery-ui-1.8.12.custom/css/ui-lightness/images/ui-bg_flat_10_000000_40x100.png +0 -0
- data/app/assets/vendor/jquery-ui-1.8.12.custom/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png +0 -0
- data/app/assets/vendor/jquery-ui-1.8.12.custom/css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png +0 -0
- data/app/assets/vendor/jquery-ui-1.8.12.custom/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/app/assets/vendor/jquery-ui-1.8.12.custom/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png +0 -0
- data/app/assets/vendor/jquery-ui-1.8.12.custom/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png +0 -0
- data/app/assets/vendor/jquery-ui-1.8.12.custom/css/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png +0 -0
- data/app/assets/vendor/jquery-ui-1.8.12.custom/css/ui-lightness/images/ui-icons_222222_256x240.png +0 -0
- data/app/assets/vendor/jquery-ui-1.8.12.custom/css/ui-lightness/images/ui-icons_228ef1_256x240.png +0 -0
- data/app/assets/vendor/jquery-ui-1.8.12.custom/css/ui-lightness/images/ui-icons_ef8c08_256x240.png +0 -0
- data/app/assets/vendor/jquery-ui-1.8.12.custom/css/ui-lightness/images/ui-icons_ffd27a_256x240.png +0 -0
- data/app/assets/vendor/jquery-ui-1.8.12.custom/css/ui-lightness/images/ui-icons_ffffff_256x240.png +0 -0
- data/app/assets/vendor/jquery-ui-1.8.12.custom/css/ui-lightness/jquery-ui-1.8.12.custom.css +0 -578
- data/app/assets/vendor/jquery-ui-1.8.12.custom/index.html +0 -367
- data/app/assets/vendor/jquery-ui-1.8.12.custom/js/jquery-ui-1.8.12.custom.min.js +0 -783
- data/app/assets/vendor/jquery.fancybox-1.3.4/fancybox/blank.gif +0 -0
- data/app/assets/vendor/jquery.fancybox-1.3.4/fancybox/fancy_close.png +0 -0
- data/app/assets/vendor/jquery.fancybox-1.3.4/fancybox/fancy_loading.png +0 -0
- data/app/assets/vendor/jquery.fancybox-1.3.4/fancybox/fancy_nav_left.png +0 -0
- data/app/assets/vendor/jquery.fancybox-1.3.4/fancybox/fancy_nav_right.png +0 -0
- data/app/assets/vendor/jquery.fancybox-1.3.4/fancybox/fancy_shadow_e.png +0 -0
- data/app/assets/vendor/jquery.fancybox-1.3.4/fancybox/fancy_shadow_n.png +0 -0
- data/app/assets/vendor/jquery.fancybox-1.3.4/fancybox/fancy_shadow_ne.png +0 -0
- data/app/assets/vendor/jquery.fancybox-1.3.4/fancybox/fancy_shadow_nw.png +0 -0
- data/app/assets/vendor/jquery.fancybox-1.3.4/fancybox/fancy_shadow_s.png +0 -0
- data/app/assets/vendor/jquery.fancybox-1.3.4/fancybox/fancy_shadow_se.png +0 -0
- data/app/assets/vendor/jquery.fancybox-1.3.4/fancybox/fancy_shadow_sw.png +0 -0
- data/app/assets/vendor/jquery.fancybox-1.3.4/fancybox/fancy_shadow_w.png +0 -0
- data/app/assets/vendor/jquery.fancybox-1.3.4/fancybox/fancy_title_left.png +0 -0
- data/app/assets/vendor/jquery.fancybox-1.3.4/fancybox/fancy_title_main.png +0 -0
- data/app/assets/vendor/jquery.fancybox-1.3.4/fancybox/fancy_title_over.png +0 -0
- data/app/assets/vendor/jquery.fancybox-1.3.4/fancybox/fancy_title_right.png +0 -0
- data/app/assets/vendor/jquery.fancybox-1.3.4/fancybox/fancybox-x.png +0 -0
- data/app/assets/vendor/jquery.fancybox-1.3.4/fancybox/fancybox-y.png +0 -0
- data/app/assets/vendor/jquery.fancybox-1.3.4/fancybox/fancybox.png +0 -0
- data/app/assets/vendor/jquery.fancybox-1.3.4/fancybox/jquery.easing-1.3.pack.js +0 -72
- data/app/assets/vendor/jquery.fancybox-1.3.4/fancybox/jquery.fancybox-1.3.4.js +0 -1156
- data/app/assets/vendor/jquery.fancybox-1.3.4/fancybox/jquery.mousewheel-3.0.4.pack.js +0 -14
data/.gitmodules
CHANGED
@@ -151,31 +151,47 @@ class Admin::ResourcesController < Admin::BaseController
|
|
151
151
|
end
|
152
152
|
|
153
153
|
def get_objects
|
154
|
-
|
154
|
+
set_scope
|
155
|
+
set_wheres
|
156
|
+
set_joins
|
157
|
+
check_resources_ownership if @resource.typus_options_for(:only_user_items)
|
158
|
+
set_order
|
159
|
+
set_eager_loading
|
160
|
+
end
|
161
|
+
|
162
|
+
def fields
|
163
|
+
@resource.typus_fields_for(params[:action])
|
164
|
+
end
|
165
|
+
helper_method :fields
|
155
166
|
|
167
|
+
# Here we set the current scope!
|
168
|
+
def set_scope
|
169
|
+
end
|
170
|
+
|
171
|
+
def set_wheres
|
156
172
|
@resource.build_conditions(params).each do |condition|
|
157
173
|
@resource = @resource.where(condition)
|
158
174
|
end
|
175
|
+
end
|
159
176
|
|
177
|
+
def set_joins
|
160
178
|
@resource.build_my_joins(params).each do |join|
|
161
179
|
@resource = @resource.joins(join)
|
162
180
|
end
|
163
|
-
|
164
|
-
if @resource.typus_options_for(:only_user_items)
|
165
|
-
check_resources_ownership
|
166
|
-
end
|
167
|
-
|
168
|
-
@resource = @resource.order(set_order).includes(eager_loading)
|
169
|
-
end
|
170
|
-
|
171
|
-
def fields
|
172
|
-
@resource.typus_fields_for(params[:action])
|
173
181
|
end
|
174
|
-
helper_method :fields
|
175
182
|
|
176
183
|
def set_order
|
177
184
|
params[:sort_order] ||= "desc"
|
178
|
-
|
185
|
+
|
186
|
+
if (order = params[:order_by] ? "#{params[:order_by]} #{params[:sort_order]}" : @resource.typus_order_by).present?
|
187
|
+
@resource = @resource.order(order)
|
188
|
+
end
|
189
|
+
end
|
190
|
+
|
191
|
+
def set_eager_loading
|
192
|
+
if (eager_loading = @resource.reflect_on_all_associations(:belongs_to).reject { |i| i.options[:polymorphic] }.map { |i| i.name }).any?
|
193
|
+
@resource = @resource.includes(eager_loading)
|
194
|
+
end
|
179
195
|
end
|
180
196
|
|
181
197
|
def redirect_on_success
|
@@ -11,10 +11,9 @@ module Admin::Resources::DataTypes::DragonflyHelper
|
|
11
11
|
|
12
12
|
if attachment.present? && !validators.include?(attribute) && attachment
|
13
13
|
attribute_i18n = @item.class.human_attribute_name(attribute)
|
14
|
-
message = Typus::I18n.t("Remove")
|
15
14
|
label_text = <<-HTML
|
16
15
|
#{attribute_i18n}
|
17
|
-
<small>#{link_to
|
16
|
+
<small>#{link_to Typus::I18n.t("Remove"), { :action => 'update', :id => @item.id, :attribute => attribute, :_continue => true }, :confirm => Typus::I18n.t("Are you sure?")}</small>
|
18
17
|
HTML
|
19
18
|
label_text.html_safe
|
20
19
|
end
|
@@ -11,27 +11,25 @@ module Admin::Resources::DataTypes::PaperclipHelper
|
|
11
11
|
|
12
12
|
if attachment.exists? && !validators.include?("#{attribute}_file_name") && attachment
|
13
13
|
attribute_i18n = @item.class.human_attribute_name(attribute)
|
14
|
-
message = Typus::I18n.t("Remove")
|
15
14
|
label_text = <<-HTML
|
16
15
|
#{attribute_i18n}
|
17
|
-
<small>#{link_to
|
16
|
+
<small>#{link_to Typus::I18n.t("Remove"), { :action => 'update', :id => @item.id, :attribute => attribute, :_continue => true }, :confirm => Typus::I18n.t("Are you sure?")}</small>
|
18
17
|
HTML
|
19
18
|
label_text.html_safe
|
20
19
|
end
|
21
20
|
end
|
22
21
|
|
23
22
|
def typus_paperclip_preview(item, attachment, options = {})
|
24
|
-
data = item.send(attachment)
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
link_to data.original_filename, data.url(:original, false)
|
23
|
+
if (data = item.send(attachment)).exists?
|
24
|
+
styles = data.styles.keys
|
25
|
+
if data.content_type =~ /^image\/.+/ && styles.include?(Typus.file_preview) && styles.include?(Typus.file_thumbnail)
|
26
|
+
render "admin/templates/paperclip_preview",
|
27
|
+
:preview => data.url(Typus.file_preview, false),
|
28
|
+
:thumb => data.url(Typus.file_thumbnail, false),
|
29
|
+
:options => options
|
30
|
+
else
|
31
|
+
link_to data.original_filename, data.url(:original, false)
|
32
|
+
end
|
35
33
|
end
|
36
34
|
end
|
37
35
|
|
@@ -8,6 +8,7 @@ module Admin::Resources::DataTypes::StringHelper
|
|
8
8
|
alias_method :display_position, :display_string
|
9
9
|
alias_method :display_integer, :display_string
|
10
10
|
alias_method :display_decimal, :display_string
|
11
|
+
alias_method :display_float, :display_string
|
11
12
|
|
12
13
|
def string_filter(filter)
|
13
14
|
values = set_context.send(filter.to_s).to_a
|
@@ -25,5 +26,6 @@ module Admin::Resources::DataTypes::StringHelper
|
|
25
26
|
alias :table_float_field :table_string_field
|
26
27
|
alias :table_integer_field :table_string_field
|
27
28
|
alias :table_virtual_field :table_string_field
|
29
|
+
alias :table_password_field :table_string_field
|
28
30
|
|
29
31
|
end
|
@@ -1,27 +1,25 @@
|
|
1
1
|
module Admin::Resources::FiltersHelper
|
2
2
|
|
3
3
|
def build_filters(resource = @resource, params = params)
|
4
|
-
typus_filters = resource.typus_filters
|
4
|
+
if (typus_filters = resource.typus_filters).any?
|
5
|
+
locals = {}
|
5
6
|
|
6
|
-
|
7
|
+
locals[:filters] = typus_filters.map do |key, value|
|
8
|
+
{ :filter => set_filter(key, value), :items => send("#{value}_filter", key) }
|
9
|
+
end
|
7
10
|
|
8
|
-
|
11
|
+
locals[:hidden_filters] = params.dup
|
9
12
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
+
# Remove default params.
|
14
|
+
rejections = %w(controller action locale utf8 sort_order order_by)
|
15
|
+
locals[:hidden_filters].delete_if { |k, v| rejections.include?(k) }
|
13
16
|
|
14
|
-
|
17
|
+
# Remove also custom params.
|
18
|
+
rejections = locals[:filters].map { |f| f[:filter] }
|
19
|
+
locals[:hidden_filters].delete_if { |k, v| rejections.include?(k) }
|
15
20
|
|
16
|
-
|
17
|
-
|
18
|
-
locals[:hidden_filters].delete_if { |k, v| rejections.include?(k) }
|
19
|
-
|
20
|
-
# Remove also custom params.
|
21
|
-
rejections = locals[:filters].map { |f| f[:filter] }
|
22
|
-
locals[:hidden_filters].delete_if { |k, v| rejections.include?(k) }
|
23
|
-
|
24
|
-
render "helpers/admin/resources/filters", locals
|
21
|
+
render "helpers/admin/resources/filters", locals
|
22
|
+
end
|
25
23
|
end
|
26
24
|
|
27
25
|
def set_filter(key, value)
|
@@ -39,11 +39,7 @@ module Admin::Resources::RelationshipsHelper
|
|
39
39
|
end
|
40
40
|
|
41
41
|
def set_condition
|
42
|
-
|
43
|
-
admin_user.owns?(@item)
|
44
|
-
else
|
45
|
-
true
|
46
|
-
end
|
42
|
+
(@resource.typus_user_id? && admin_user.is_not_root?) ? admin_user.owns?(@item) : true
|
47
43
|
end
|
48
44
|
|
49
45
|
def set_conditions
|
@@ -15,7 +15,7 @@ module Admin::ResourcesHelper
|
|
15
15
|
resources = ActiveSupport::OrderedHash.new
|
16
16
|
app_name = @resource.typus_application
|
17
17
|
|
18
|
-
admin_user.application(app_name)
|
18
|
+
admin_user.application(app_name) { |a,b| a.typus_constantize.model_name.human <=> b.typus_constantize.model_name.human }.each do |resource|
|
19
19
|
klass = resource.typus_constantize
|
20
20
|
resources[resource] = [ link_to_unless_current(Typus::I18n.t("All #{klass.model_name.human.pluralize}"), :action => "index") ]
|
21
21
|
resources[resource] << link_to_unless_current(Typus::I18n.t("Add New"), :action => "new") if admin_user.can?("create", klass)
|
data/app/mailers/admin/mailer.rb
CHANGED
@@ -3,8 +3,7 @@ class Admin::Mailer < ActionMailer::Base
|
|
3
3
|
default :from => Typus.mailer_sender
|
4
4
|
|
5
5
|
def reset_password_link(user, url)
|
6
|
-
@user = user
|
7
|
-
@url = url
|
6
|
+
@user, @url = user, url
|
8
7
|
|
9
8
|
mail :to => user.email,
|
10
9
|
:subject => "[#{Typus.admin_title}] #{Typus::I18n.t("Reset password")}"
|
@@ -0,0 +1,8 @@
|
|
1
|
+
//= require jquery
|
2
|
+
//= require jquery_ujs
|
3
|
+
//= require jquery.fancybox-1.3.4.pack.js
|
4
|
+
//= require jquery.rails.autocomplete
|
5
|
+
//= require jquery.searchField
|
6
|
+
//= require jquery.tokeninput.js
|
7
|
+
//= require typus/jquery.application
|
8
|
+
//= require typus/application
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/app/{views → themes/default/views}/admin/templates/_belongs_to_with_autocomplete.html.erb
RENAMED
@@ -2,7 +2,7 @@
|
|
2
2
|
<% label = "#{@item.class.model_name.underscore.gsub("/","_")}_#{related_fk}" %>
|
3
3
|
<script type="text/javascript">
|
4
4
|
$(document).ready(function () {
|
5
|
-
$("#tokenInput_for_<%= related_fk %>").tokenInput("/admin/<%= association.
|
5
|
+
$("#tokenInput_for_<%= related_fk %>").tokenInput("/admin/<%= association.class_name.tableize %>/autocomplete", {
|
6
6
|
hintText: "",
|
7
7
|
queryParam: 'term',
|
8
8
|
tokenLimit: 1,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# Portuguese (pt-PT) translations for Typus by:
|
2
|
+
# - Nuno Baldaia <http://nunobaldaia.com/>
|
3
|
+
|
4
|
+
"pt-PT":
|
5
|
+
activerecord:
|
6
|
+
models:
|
7
|
+
admin_user: "Utilizador"
|
8
|
+
attributes:
|
9
|
+
admin_user:
|
10
|
+
email:
|
11
|
+
first_name: "Primeiro nome"
|
12
|
+
last_name: "Último nome"
|
13
|
+
locale: "Linguagem"
|
14
|
+
password: "Senha"
|
15
|
+
password_confirmation: "Confirmação de senha"
|
16
|
+
role: "Função no sistema"
|
17
|
+
status: "Estado"
|
@@ -0,0 +1,83 @@
|
|
1
|
+
# Portuguese (pt-PT) translations for Typus by:
|
2
|
+
# - Nuno Baldaia <http://nunobaldaia.com/>
|
3
|
+
|
4
|
+
"pt-PT":
|
5
|
+
|
6
|
+
"Actions": "Acções"
|
7
|
+
"Active": "Activo"
|
8
|
+
"Add": "Adicionar"
|
9
|
+
"Add new": "Adicionar novo"
|
10
|
+
"Are you sure?": "Tem a certeza?"
|
11
|
+
"Are you sure you want to sign out and end your session?": "Tem certeza que quer sair e encerrar sua sessão?"
|
12
|
+
|
13
|
+
"Change %{attribute}?": "Mudar %{attribute}?"
|
14
|
+
"Create %{resource}": "Criar %{resource}"
|
15
|
+
|
16
|
+
"Dashboard": "Painel"
|
17
|
+
"Down": "Descer"
|
18
|
+
|
19
|
+
"Edit": "Editar"
|
20
|
+
"Edit %{resource}": "Editar %{resource}"
|
21
|
+
"Enter your email below to create the first user": "Introduza o seu email para criar o primeiro utilizador"
|
22
|
+
|
23
|
+
"False": "Falso"
|
24
|
+
"Filter": "Filtrar"
|
25
|
+
|
26
|
+
"I remember my password": "Lembro-me da minha senha"
|
27
|
+
"If you didn't request a password update, you can ignore this message": "Se não pediu uma renovação de senha, por favor ignore esta mensagem."
|
28
|
+
"If you have made any changes to the fields without clicking the Save/Update entry button, your changes will be lost": "Se fez alterações nos campos e não clicou no botão de Salvar/Atualizar, as suas alterações serão perdidas"
|
29
|
+
"Inactive": "Inactivo"
|
30
|
+
|
31
|
+
"Last few days": "Últimos dias"
|
32
|
+
"Last 30 days": "Últimos 30 dias"
|
33
|
+
"Last 7 days": "Últimos 7 dias"
|
34
|
+
"List": "Lista"
|
35
|
+
"Logged as": "Logado como"
|
36
|
+
"Login": "Login"
|
37
|
+
|
38
|
+
"New": "Novo"
|
39
|
+
"New %{resource}": "Novo %{resource}"
|
40
|
+
"Next": "Próximo"
|
41
|
+
"No %{resources} found": "Nenhum resultado encontrado em %{resources}"
|
42
|
+
|
43
|
+
"Password recovery link sent to your email": "Foi enviado para o seu email um link para recuperação da senha."
|
44
|
+
"Previous": "Anterior"
|
45
|
+
|
46
|
+
"Record moved %{to}": "Registro movido %{to}."
|
47
|
+
"Recover password": "Recuperar senha"
|
48
|
+
"Remove": "Remover"
|
49
|
+
"Remove %{resource}?": "Remover %{resource}?"
|
50
|
+
"Reset password": "Trocar senha"
|
51
|
+
"Resources": "Recursos"
|
52
|
+
|
53
|
+
"Save %{resource}": "Salvar %{resource}"
|
54
|
+
"Search": "Procurar"
|
55
|
+
"Show": "Mostrar"
|
56
|
+
"Show all dates": "Mostrar todas as datas"
|
57
|
+
"Show by %{attribute}": "Mostrar por %{attribute}"
|
58
|
+
"Show %{resource}": "Mostrar %{resource}"
|
59
|
+
"Sign in": "Entrar"
|
60
|
+
"Sign out": "Sair"
|
61
|
+
"Sign up": "Criar conta"
|
62
|
+
"System Users Administration": "Administração de utilizadores de sistema"
|
63
|
+
|
64
|
+
"Today": "Hoje"
|
65
|
+
"True": "Verdadeiro"
|
66
|
+
|
67
|
+
"Unrelate": "Desvincular"
|
68
|
+
"Up": "Subir"
|
69
|
+
|
70
|
+
"View all %{attribute}": "Ver todos %{attribute}"
|
71
|
+
"View site": "Ver site"
|
72
|
+
|
73
|
+
"You can't toggle your status": "Não pode trocar o seu estado."
|
74
|
+
"You can update your password at": "Pode atualizar a sua senha em"
|
75
|
+
"You can't change your role": "Não pode mudar sua própria função no sistema."
|
76
|
+
|
77
|
+
"%{errors} prohibited this page from being saved:":
|
78
|
+
"%{model} successfully created": "%{model} criado com sucesso."
|
79
|
+
"%{model} successfully removed": "%{model} removido com sucesso."
|
80
|
+
"%{model} successfully updated": "%{model} atualizado com sucesso."
|
81
|
+
|
82
|
+
"Top": "Topo"
|
83
|
+
"Bottom": "Fundo"
|