conte_rails_template 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/breadcrumbs_renderer.rb +11 -0
- data/lib/conte_rails_template/version.rb +1 -1
- data/lib/generators/conte_rails_template/install_generator.rb +4 -4
- data/lib/generators/conte_rails_template/templates/navigation_renderers.rb +2 -0
- data/lib/generators/conte_rails_template/templates/simple_navigation.rb +75 -0
- data/lib/generators/conte_rails_template/templates/wice_grid_config.rb +142 -0
- data/lib/generators/conte_rails_template/templates/wice_grid_local.yml +502 -0
- data/lib/navigation_renderer.rb +56 -0
- metadata +23 -1
@@ -0,0 +1,11 @@
|
|
1
|
+
module ConteRailsTemplate
|
2
|
+
class BreadcrumbsRenderer < SimpleNavigation::Renderer::Breadcrumbs
|
3
|
+
def render(item_container)
|
4
|
+
contents = a_tags.inject([]) do |list, item|
|
5
|
+
list << content_tag(:li, item.html_safe)
|
6
|
+
list
|
7
|
+
end
|
8
|
+
contents.join('').html_safe
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
@@ -7,10 +7,10 @@ module ConteRailsTemplate #:nodoc:
|
|
7
7
|
def copy_stuff #:nodoc:
|
8
8
|
copy_file 'layout.html.erb', 'app/views/layouts/application.html.erb'
|
9
9
|
copy_file 'session.html.erb', 'app/views/layouts/single.html.erb'
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
10
|
+
copy_file 'navigation_renderers.rb', 'config/initializers/conte_navigation_renderers.rb'
|
11
|
+
copy_file 'simple_navigation.rb', 'config/navigation.rb'
|
12
|
+
copy_file 'wice_grid_config.rb', 'config/initializers/wice_grid_config.rb'
|
13
|
+
copy_file 'wice_grid_local.yml', 'config/locales/wice_grid.yml'
|
14
14
|
end
|
15
15
|
|
16
16
|
end
|
@@ -0,0 +1,75 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
# Configures your navigation
|
3
|
+
SimpleNavigation::Configuration.run do |navigation|
|
4
|
+
# Specify a custom renderer if needed.
|
5
|
+
# The default renderer is SimpleNavigation::Renderer::List which renders HTML lists.
|
6
|
+
# The renderer can also be specified as option in the render_navigation call.
|
7
|
+
# navigation.renderer = Your::Custom::Renderer
|
8
|
+
|
9
|
+
# Specify the class that will be applied to active navigation items. Defaults to 'selected'
|
10
|
+
navigation.selected_class = 'active'
|
11
|
+
|
12
|
+
# Specify the class that will be applied to the current leaf of
|
13
|
+
# active navigation items. Defaults to 'simple-navigation-active-leaf'
|
14
|
+
navigation.active_leaf_class = nil
|
15
|
+
|
16
|
+
# Item keys are normally added to list items as id.
|
17
|
+
# This setting turns that off
|
18
|
+
navigation.autogenerate_item_ids = false
|
19
|
+
|
20
|
+
# You can override the default logic that is used to autogenerate the item ids.
|
21
|
+
# To do this, define a Proc which takes the key of the current item as argument.
|
22
|
+
# The example below would add a prefix to each key.
|
23
|
+
# navigation.id_generator = Proc.new {|key| "my-prefix-#{key}"}
|
24
|
+
|
25
|
+
# If you need to add custom html around item names, you can define a proc that will be called with the name you pass in to the navigation.
|
26
|
+
# The example below shows how to wrap items spans.
|
27
|
+
# navigation.name_generator = Proc.new {|name| "<span>#{name}</span>"}
|
28
|
+
|
29
|
+
# The auto highlight feature is turned on by default.
|
30
|
+
# This turns it off globally (for the whole plugin)
|
31
|
+
# navigation.auto_highlight = false
|
32
|
+
|
33
|
+
# Define the primary navigation
|
34
|
+
navigation.items do |primary|
|
35
|
+
# Add an item to the primary navigation. The following params apply:
|
36
|
+
# key - a symbol which uniquely defines your navigation item in the scope of the primary_navigation
|
37
|
+
# name - will be displayed in the rendered navigation. This can also be a call to your I18n-framework.
|
38
|
+
# url - the address that the generated item links to. You can also use url_helpers (named routes, restful routes helper, url_for etc.)
|
39
|
+
# options - can be used to specify attributes that will be included in the rendered navigation item (e.g. id, class etc.)
|
40
|
+
# some special options that can be set:
|
41
|
+
# :if - Specifies a proc to call to determine if the item should
|
42
|
+
# be rendered (e.g. <tt>:if => Proc.new { current_user.admin? }</tt>). The
|
43
|
+
# proc should evaluate to a true or false value and is evaluated in the context of the view.
|
44
|
+
# :unless - Specifies a proc to call to determine if the item should not
|
45
|
+
# be rendered (e.g. <tt>:unless => Proc.new { current_user.admin? }</tt>). The
|
46
|
+
# proc should evaluate to a true or false value and is evaluated in the context of the view.
|
47
|
+
# :method - Specifies the http-method for the generated link - default is :get.
|
48
|
+
# :highlights_on - if autohighlighting is turned off and/or you want to explicitly specify
|
49
|
+
# when the item should be highlighted, you can set a regexp which is matched
|
50
|
+
# against the current URI. You may also use a proc, or the symbol <tt>:subpath</tt>.
|
51
|
+
#
|
52
|
+
primary.item :key_1, 'name', url, options
|
53
|
+
|
54
|
+
# Add an item which has a sub navigation (same params, but with block)
|
55
|
+
primary.item :key_2, 'name', url, options do |sub_nav|
|
56
|
+
# Add an item to the sub navigation (same params again)
|
57
|
+
sub_nav.item :key_2_1, 'name', url, options
|
58
|
+
end
|
59
|
+
|
60
|
+
# You can also specify a condition-proc that needs to be fullfilled to display an item.
|
61
|
+
# Conditions are part of the options. They are evaluated in the context of the views,
|
62
|
+
# thus you can use all the methods and vars you have available in the views.
|
63
|
+
primary.item :key_3, 'Admin', url, :class => 'special', :if => Proc.new { current_user.admin? }
|
64
|
+
primary.item :key_4, 'Account', url, :unless => Proc.new { logged_in? }
|
65
|
+
|
66
|
+
# you can also specify a css id or class to attach to this particular level
|
67
|
+
# works for all levels of the menu
|
68
|
+
# primary.dom_id = 'menu-id'
|
69
|
+
# primary.dom_class = 'menu-class'
|
70
|
+
|
71
|
+
# You can turn off auto highlighting for a specific level
|
72
|
+
# primary.auto_highlight = false
|
73
|
+
end
|
74
|
+
|
75
|
+
end
|
@@ -0,0 +1,142 @@
|
|
1
|
+
if defined?(Wice::Defaults)
|
2
|
+
|
3
|
+
# Default number of rows to show per page.
|
4
|
+
Wice::Defaults::PER_PAGE = 20
|
5
|
+
|
6
|
+
# Default order direction
|
7
|
+
Wice::Defaults::ORDER_DIRECTION = 'asc'
|
8
|
+
|
9
|
+
# Default name for a grid. A grid name is the basis for a lot of
|
10
|
+
# names including parameter names, DOM IDs, etc
|
11
|
+
# The shorter the name is the shorter the request URI will be.
|
12
|
+
Wice::Defaults::GRID_NAME = 'grid'
|
13
|
+
|
14
|
+
# If REUSE_LAST_COLUMN_FOR_FILTER_ICONS is true and the last column doesn't have any filter and column name, it will be used
|
15
|
+
# for filter related icons (filter icon, reset icon, show/hide icon), otherwise an additional table column is added.
|
16
|
+
Wice::Defaults::REUSE_LAST_COLUMN_FOR_FILTER_ICONS = true
|
17
|
+
|
18
|
+
# The label of the first option of a custom dropdown list meaning 'All items'
|
19
|
+
Wice::Defaults::CUSTOM_FILTER_ALL_LABEL = '--'
|
20
|
+
|
21
|
+
# A list of classes for the table tag of the grid
|
22
|
+
Wice::Defaults::DEFAULT_TABLE_CLASSES = ['table', 'table-striped', 'table-bordered', 'table-hover']
|
23
|
+
|
24
|
+
# Allow switching between a single and multiple selection modes in custom filters (dropdown boxes)
|
25
|
+
Wice::Defaults::ALLOW_MULTIPLE_SELECTION = true
|
26
|
+
|
27
|
+
# Show the upper pagination panel by default or not
|
28
|
+
Wice::Defaults::SHOW_UPPER_PAGINATION_PANEL = false
|
29
|
+
|
30
|
+
# Disabling CSV export by default
|
31
|
+
Wice::Defaults::ENABLE_EXPORT_TO_CSV = false
|
32
|
+
|
33
|
+
# Default CSV field separator
|
34
|
+
Wice::Defaults::CSV_FIELD_SEPARATOR = ','
|
35
|
+
|
36
|
+
|
37
|
+
# The strategy when to show the filter.
|
38
|
+
# * <tt>:when_filtered</tt> - when the table is the result of filtering
|
39
|
+
# * <tt>:always</tt> - show the filter always
|
40
|
+
# * <tt>:no</tt> - never show the filter
|
41
|
+
Wice::Defaults::SHOW_FILTER = :always
|
42
|
+
|
43
|
+
# A boolean value specifying if a change in a filter triggers reloading of the grid.
|
44
|
+
Wice::Defaults::AUTO_RELOAD = false
|
45
|
+
|
46
|
+
|
47
|
+
# SQL operator used for matching strings in string filters.
|
48
|
+
Wice::Defaults::STRING_MATCHING_OPERATOR = 'LIKE'
|
49
|
+
# STRING_MATCHING_OPERATOR = 'ILIKE' # Use this for Postgresql case-insensitive matching.
|
50
|
+
|
51
|
+
|
52
|
+
# Defining one string matching operator globally for the whole application turns is not enough
|
53
|
+
# when you connect to two databases one of which is MySQL and the other is Postgresql.
|
54
|
+
# If the key for an adapter is missing it will fall back to Wice::Defaults::STRING_MATCHING_OPERATOR
|
55
|
+
Wice::Defaults::STRING_MATCHING_OPERATORS = {
|
56
|
+
'ActiveRecord::ConnectionAdapters::MysqlAdapter' => 'LIKE',
|
57
|
+
'ActiveRecord::ConnectionAdapters::PostgreSQLAdapter' => 'ILIKE'
|
58
|
+
}
|
59
|
+
|
60
|
+
|
61
|
+
|
62
|
+
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
63
|
+
# Advanced Filters #
|
64
|
+
|
65
|
+
# Switch of the negation checkbox in all text filters
|
66
|
+
Wice::Defaults::NEGATION_IN_STRING_FILTERS = false
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
71
|
+
# Showing All Queries #
|
72
|
+
|
73
|
+
# Enable or disable showing all queries (non-paginated table)
|
74
|
+
Wice::Defaults::ALLOW_SHOWING_ALL_QUERIES = true
|
75
|
+
|
76
|
+
# If number of all queries is more than this value, the user will be given a warning message
|
77
|
+
Wice::Defaults::START_SHOWING_WARNING_FROM = 100
|
78
|
+
|
79
|
+
|
80
|
+
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
81
|
+
# Saving Queries #
|
82
|
+
|
83
|
+
# ActiveRecord model to store queries. Read the documentation for details
|
84
|
+
# QUERY_STORE_MODEL = 'WiceGridSerializedQuery'
|
85
|
+
Wice::Defaults::QUERY_STORE_MODEL = 'WiceGridSerializedQuery'
|
86
|
+
|
87
|
+
|
88
|
+
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
89
|
+
# Here go settings related to the calendar helpers #
|
90
|
+
|
91
|
+
# The default style of the date and datetime helper
|
92
|
+
# * <tt>:calendar</tt> - JS calendar
|
93
|
+
# * <tt>:standard</tt> - standard Rails date and datetime helpers
|
94
|
+
Wice::Defaults::HELPER_STYLE = :calendar
|
95
|
+
|
96
|
+
# Format of the datetime displayed.
|
97
|
+
# If you change the format, make sure to check if +DATETIME_PARSER+ can still parse this string.
|
98
|
+
Wice::Defaults::DATETIME_FORMAT = "%Y-%m-%d %H:%M"
|
99
|
+
|
100
|
+
# Format of the date displayed.
|
101
|
+
# If you change the format, make sure to check if +DATE_PARSER+ can still parse this string.
|
102
|
+
Wice::Defaults::DATE_FORMAT = "%Y-%m-%d"
|
103
|
+
|
104
|
+
# Format of the date displayed in jQuery's Datepicker
|
105
|
+
# If you change the format, make sure to check if +DATE_PARSER+ can still parse this string.
|
106
|
+
Wice::Defaults::DATE_FORMAT_JQUERY = "yy-mm-dd"
|
107
|
+
|
108
|
+
|
109
|
+
# With Calendar helpers enabled the parameter sent is the string displayed. This lambda will be given a date string in the
|
110
|
+
# format defined by +DATETIME_FORMAT+ and must generate a DateTime object.
|
111
|
+
# In many cases <tt>Time.zone.parse</tt> is enough, for instance, <tt>%Y-%m-%d</tt>. If you change the format, make sure to check this code
|
112
|
+
# and modify it if needed.
|
113
|
+
Wice::Defaults::DATETIME_PARSER = lambda{|datetime_string|
|
114
|
+
if datetime_string.blank?
|
115
|
+
nil
|
116
|
+
elsif Time.zone
|
117
|
+
Time.zone.parse(datetime_string)
|
118
|
+
else
|
119
|
+
Time.parse(datetime_string)
|
120
|
+
end
|
121
|
+
}
|
122
|
+
|
123
|
+
|
124
|
+
# With Calendar helpers enabled the parameter sent is the string displayed. This lambda will be given a date string in the
|
125
|
+
# format defined by +DATETIME+ and must generate a Date object.
|
126
|
+
# In many cases <tt>Date.parse</tt> is enough, for instance, <tt>%Y-%m-%d</tt>. If you change the format, make sure to check this code
|
127
|
+
# and modify it if needed.
|
128
|
+
Wice::Defaults::DATE_PARSER = lambda{|date_string|
|
129
|
+
if date_string.blank?
|
130
|
+
nil
|
131
|
+
else
|
132
|
+
Date.parse(date_string)
|
133
|
+
end
|
134
|
+
}
|
135
|
+
|
136
|
+
# Icon to popup the calendar.
|
137
|
+
Wice::Defaults::CALENDAR_ICON = "/assets/icons/grid/calendar_view_month.png"
|
138
|
+
|
139
|
+
# popup calendar will be shown relative to the popup trigger element or to the mouse pointer
|
140
|
+
Wice::Defaults::POPUP_PLACEMENT_STRATEGY = :trigger # :pointer
|
141
|
+
|
142
|
+
end
|
@@ -0,0 +1,502 @@
|
|
1
|
+
en:
|
2
|
+
date:
|
3
|
+
order:
|
4
|
+
- :year
|
5
|
+
- :month
|
6
|
+
- :day
|
7
|
+
wice_grid:
|
8
|
+
show_filter_tooltip: Show filter
|
9
|
+
hide_filter_tooltip: Hide filter
|
10
|
+
csv_export_tooltip: Export to CSV
|
11
|
+
filter_tooltip: Filter
|
12
|
+
reset_filter_tooltip: Reset
|
13
|
+
boolean_filter_true_label: "yes"
|
14
|
+
boolean_filter_false_label: "no"
|
15
|
+
previous_label: «
|
16
|
+
next_label: »
|
17
|
+
# Title of the icon clicking on which will show the calendar to set the FROM date.
|
18
|
+
date_selector_tooltip_from: From
|
19
|
+
# Title of the icon clicking on which will show the calendar to set the TO date.
|
20
|
+
date_selector_tooltip_to: To
|
21
|
+
# The title of the checkox to turn on negation
|
22
|
+
negation_checkbox_title: Exclude
|
23
|
+
# link to switch to show all records
|
24
|
+
show_all_records_label: show all
|
25
|
+
# tooltip for the link to switch to show all records
|
26
|
+
show_all_records_tooltip: Show all records
|
27
|
+
# Warning message shown when the user wants to switch to all-records mode
|
28
|
+
all_queries_warning: Are you sure you want to display all records?
|
29
|
+
# link to paginated view
|
30
|
+
switch_back_to_paginated_mode_label: back to paginated view
|
31
|
+
# tooltip for the link to paginated view
|
32
|
+
switch_back_to_paginated_mode_tooltip: Switch back to the view with pages
|
33
|
+
# Title of the date string.
|
34
|
+
date_string_tooltip: Click to delete
|
35
|
+
saved_query_panel_title: Saved Queries
|
36
|
+
save_query_button_label: Save the state of filters
|
37
|
+
saved_query_deletion_confirmation: Are you sure?
|
38
|
+
saved_query_deletion_link_title: Delete query
|
39
|
+
saved_query_link_title: Load query
|
40
|
+
validates_uniqueness_error: A query with this name already exists
|
41
|
+
validates_presence_error: Please submit the name of the custom query
|
42
|
+
query_deleted_message: Saved query deleted.
|
43
|
+
query_saved_message: Query saved.
|
44
|
+
select_all: Select all
|
45
|
+
deselect_all: Remove selection
|
46
|
+
expand: Expand
|
47
|
+
collapse: Collapse
|
48
|
+
|
49
|
+
|
50
|
+
is:
|
51
|
+
date:
|
52
|
+
order:
|
53
|
+
- :year
|
54
|
+
- :month
|
55
|
+
- :day
|
56
|
+
wice_grid:
|
57
|
+
show_filter_tooltip: Sýna síumöguleika
|
58
|
+
hide_filter_tooltip: Fela síumoguleika
|
59
|
+
csv_export_tooltip: Flytja út CSV
|
60
|
+
filter_tooltip: Sía
|
61
|
+
reset_filter_tooltip: Hreinsa
|
62
|
+
boolean_filter_true_label: Já
|
63
|
+
boolean_filter_false_label: Nei
|
64
|
+
previous_label: «
|
65
|
+
next_label: »
|
66
|
+
# Title of the icon clicking on which will show the calendar to set the FROM date.
|
67
|
+
date_selector_tooltip_from: Frá
|
68
|
+
# Title of the icon clicking on which will show the calendar to set the TO date.
|
69
|
+
date_selector_tooltip_to: Til
|
70
|
+
# The title of the checkox to turn on negation
|
71
|
+
negation_checkbox_title: Undanskilja
|
72
|
+
# link to switch to show all records
|
73
|
+
show_all_records_label: Sýna allt
|
74
|
+
# tooltip for the link to switch to show all records
|
75
|
+
show_all_records_tooltip: Sýna öll gögn
|
76
|
+
# Warning message shown when the user wants to switch to all-records mode
|
77
|
+
all_queries_warning: Ertu viss um að þú viljir láta sýna öll gögn?
|
78
|
+
# link to paginated view
|
79
|
+
switch_back_to_paginated_mode_label: Aftur til síðuhorfs
|
80
|
+
# tooltip for the link to paginated view
|
81
|
+
switch_back_to_paginated_mode_tooltip: Aftur til síðuhorfs
|
82
|
+
# Title of the date string.
|
83
|
+
date_string_tooltip: Smella á til að eyða
|
84
|
+
saved_query_panel_title: Vistaðar leitarskipanir
|
85
|
+
save_query_button_label: Vista síuval
|
86
|
+
saved_query_deletion_confirmation: Ertu viss?
|
87
|
+
saved_query_deletion_link_title: Eyða leitarskipun
|
88
|
+
saved_query_link_title: Hlaða leitarskipun
|
89
|
+
validates_uniqueness_error: Leitarskipun með þessu nafni er þegar til
|
90
|
+
validates_presence_error: Vinsamlegast gefið heiti fyrir leitarskipun
|
91
|
+
query_deleted_message: Vistaðri leitarskipun hefur verið eytt
|
92
|
+
query_saved_message: leitaskipun hefur verið vistuð
|
93
|
+
# To do: translate
|
94
|
+
select_all: Select all
|
95
|
+
deselect_all: Remove selection
|
96
|
+
|
97
|
+
nl:
|
98
|
+
date:
|
99
|
+
order:
|
100
|
+
- :year
|
101
|
+
- :month
|
102
|
+
- :day
|
103
|
+
wice_grid:
|
104
|
+
show_filter_tooltip: Filter tonen
|
105
|
+
hide_filter_tooltip: Filter verbergen
|
106
|
+
csv_export_tooltip: Als CSV exporteren
|
107
|
+
filter_tooltip: Filter
|
108
|
+
reset_filter_tooltip: Terugstellen
|
109
|
+
boolean_filter_true_label: ja
|
110
|
+
boolean_filter_false_label: neen
|
111
|
+
previous_label: «
|
112
|
+
next_label: »
|
113
|
+
# Title of the icon clicking on which will show the calendar to set the FROM date.
|
114
|
+
date_selector_tooltip_from: Vanaf
|
115
|
+
# Title of the icon clicking on which will show the calendar to set the TO date.
|
116
|
+
date_selector_tooltip_to: Tot
|
117
|
+
# The title of the checkox to turn on negation
|
118
|
+
negation_checkbox_title: Uitsluiten
|
119
|
+
# link to switch to show all records
|
120
|
+
show_all_records_label: Alle rijen tonen
|
121
|
+
# tooltip for the link to switch to show all records
|
122
|
+
show_all_records_tooltip: Alle rijen tonen
|
123
|
+
# Warning message shown when the user wants to switch to all-records mode
|
124
|
+
all_queries_warning: Bent u zeker dat u alle rijen wilt tonen?
|
125
|
+
# link to paginated view
|
126
|
+
switch_back_to_paginated_mode_label: Terug naar pagina's
|
127
|
+
# tooltip for the link to paginated view
|
128
|
+
switch_back_to_paginated_mode_tooltip: Terug naar pagina's
|
129
|
+
# Title of the date string.
|
130
|
+
date_string_tooltip: Klik om te verwijderen
|
131
|
+
saved_query_panel_title: Opgeslagen query's
|
132
|
+
save_query_button_label: Query opslaan
|
133
|
+
saved_query_deletion_confirmation: Bent u zeker?
|
134
|
+
saved_query_deletion_link_title: Query verwijderen
|
135
|
+
saved_query_link_title: Query laden
|
136
|
+
validates_uniqueness_error: Deze query bestaat reeds
|
137
|
+
validates_presence_error: Gelieve de naam van de query in te vullen
|
138
|
+
query_deleted_message: Opgeslagen query verwijderd.
|
139
|
+
query_saved_message: Query opgeslagen
|
140
|
+
select_all: Selecteer alle rijen
|
141
|
+
deselect_all: Deselecteer alle rijen
|
142
|
+
|
143
|
+
fr:
|
144
|
+
date:
|
145
|
+
order:
|
146
|
+
- :year
|
147
|
+
- :month
|
148
|
+
- :day
|
149
|
+
wice_grid:
|
150
|
+
show_filter_tooltip: Afficher le filtre
|
151
|
+
hide_filter_tooltip: Cacher le filtrer
|
152
|
+
csv_export_tooltip: Exporter en CSV
|
153
|
+
filter_tooltip: Filtrer
|
154
|
+
reset_filter_tooltip: Effacer
|
155
|
+
boolean_filter_true_label: oui
|
156
|
+
boolean_filter_false_label: non
|
157
|
+
previous_label: «
|
158
|
+
next_label: »
|
159
|
+
# Title of the icon clicking on which will show the calendar to set the FROM date.
|
160
|
+
date_selector_tooltip_from: De
|
161
|
+
# Title of the icon clicking on which will show the calendar to set the TO date.
|
162
|
+
date_selector_tooltip_to: à
|
163
|
+
# The title of the checkox to turn on negation
|
164
|
+
negation_checkbox_title: Exclure
|
165
|
+
# link to switch to show all records
|
166
|
+
show_all_records_label: Voir tous
|
167
|
+
# tooltip for the link to switch to show all records
|
168
|
+
show_all_records_tooltip: Voir tous les enregistrements
|
169
|
+
# Warning message shown when the user wants to switch to all-records mode
|
170
|
+
all_queries_warning: Etes-vous certain de vouloir afficher tous les enregistrements?
|
171
|
+
# link to paginated view
|
172
|
+
switch_back_to_paginated_mode_label: Retour à la vue paginée
|
173
|
+
# tooltip for the link to paginated view
|
174
|
+
switch_back_to_paginated_mode_tooltip: Retour à la vue par pages
|
175
|
+
# Title of the date string.
|
176
|
+
date_string_tooltip: Cliquez pour effacer
|
177
|
+
saved_query_panel_title: Requêtes sauvées
|
178
|
+
save_query_button_label: Sauver l'état des filtres
|
179
|
+
saved_query_deletion_confirmation: Etes vous sûr?
|
180
|
+
saved_query_deletion_link_title: Effacer la requête
|
181
|
+
saved_query_link_title: Charger la requête
|
182
|
+
validates_uniqueness_error: Un requête existante porte déjà ce nom
|
183
|
+
validates_presence_error: Veuillez indiquer le nom de la requête que vous souhaitez sauver
|
184
|
+
query_deleted_message: La requête a été effacée.
|
185
|
+
query_saved_message: La requête a été sauvée.
|
186
|
+
select_all: Sélectionner tout
|
187
|
+
deselect_all: Désélectionner tout
|
188
|
+
|
189
|
+
ru:
|
190
|
+
date:
|
191
|
+
order:
|
192
|
+
- :year
|
193
|
+
- :month
|
194
|
+
- :day
|
195
|
+
wice_grid:
|
196
|
+
show_filter_tooltip: Показать фильтр
|
197
|
+
hide_filter_tooltip: Спрятать фильтр
|
198
|
+
csv_export_tooltip: Экспорт в CSV
|
199
|
+
filter_tooltip: Фильтровать
|
200
|
+
reset_filter_tooltip: Сброс
|
201
|
+
boolean_filter_true_label: да
|
202
|
+
boolean_filter_false_label: нет
|
203
|
+
previous_label: «
|
204
|
+
next_label: »
|
205
|
+
# Title of the icon clicking on which will show the calendar to set the FROM date.
|
206
|
+
date_selector_tooltip_from: С
|
207
|
+
# Title of the icon clicking on which will show the calendar to set the TO date.
|
208
|
+
date_selector_tooltip_to: До
|
209
|
+
# The title of the checkox to turn on negation
|
210
|
+
negation_checkbox_title: Исключая строки
|
211
|
+
# link to switch to show all records
|
212
|
+
show_all_records_label: показать все
|
213
|
+
# tooltip for the link to switch to show all records
|
214
|
+
show_all_records_tooltip: Показать все записи
|
215
|
+
# Warning message shown when the user wants to switch to all-records mode
|
216
|
+
all_queries_warning: Вы уверены в том, что хотите отобразить все записи?
|
217
|
+
# link to paginated view
|
218
|
+
switch_back_to_paginated_mode_label: Назад к постраничному выводу
|
219
|
+
# tooltip for the link to paginated view
|
220
|
+
switch_back_to_paginated_mode_tooltip: Назад к постраничному выводу
|
221
|
+
# Title of the date string.
|
222
|
+
date_string_tooltip: Кликните, чтобы удалить дату
|
223
|
+
saved_query_panel_title: Сохранённые фильтры
|
224
|
+
save_query_button_label: Сохранить фильтр
|
225
|
+
saved_query_deletion_confirmation: Вы уверены?
|
226
|
+
saved_query_deletion_link_title: Удалить сохранённый фильтр
|
227
|
+
saved_query_link_title: Загрузить сохранённый фильтр
|
228
|
+
validates_uniqueness_error: Сохранённый фильтр с таким именем уже существует
|
229
|
+
validates_presence_error: Пожалуйста введите имя сохраняемого фильтра
|
230
|
+
query_deleted_message: Сохранённый фильтр удалён.
|
231
|
+
query_saved_message: Сохранённый фильтр сохранён.
|
232
|
+
select_all: Отметить все
|
233
|
+
deselect_all: Убрать выделение
|
234
|
+
|
235
|
+
|
236
|
+
pt:
|
237
|
+
date:
|
238
|
+
order:
|
239
|
+
- :year
|
240
|
+
- :month
|
241
|
+
- :day
|
242
|
+
wice_grid:
|
243
|
+
show_filter_tooltip: Mostrar o filtro
|
244
|
+
hide_filter_tooltip: Esconder o filtro
|
245
|
+
csv_export_tooltip: Exportar em CSV
|
246
|
+
filter_tooltip: Filtrar
|
247
|
+
reset_filter_tooltip: Reinicializar
|
248
|
+
boolean_filter_true_label: sim
|
249
|
+
boolean_filter_false_label: não
|
250
|
+
previous_label: «
|
251
|
+
next_label: »
|
252
|
+
# Title of the icon clicking on which will show the calendar to set the FROM date.
|
253
|
+
date_selector_tooltip_from: De
|
254
|
+
# Title of the icon clicking on which will show the calendar to set the TO date.
|
255
|
+
date_selector_tooltip_to: a
|
256
|
+
# The title of the checkox to turn on negation
|
257
|
+
negation_checkbox_title: Excluir
|
258
|
+
# link to switch to show all records
|
259
|
+
show_all_records_label: Ver todos
|
260
|
+
# tooltip for the link to switch to show all records
|
261
|
+
show_all_records_tooltip: Ver todos os registos
|
262
|
+
# Warning message shown when the user wants to switch to all-records mode
|
263
|
+
all_queries_warning: Tem a certeza de querer visualizar todos os registos?
|
264
|
+
# link to paginated view
|
265
|
+
switch_back_to_paginated_mode_label: Retorno à vista paginada
|
266
|
+
# tooltip for the link to paginated view
|
267
|
+
switch_back_to_paginated_mode_tooltip: Retorno à vista por página
|
268
|
+
# Title of the date string.
|
269
|
+
date_string_tooltip: Cliquar para apagar
|
270
|
+
saved_query_panel_title: Queries gravadas
|
271
|
+
save_query_button_label: Gravar o estado dos filtros
|
272
|
+
saved_query_deletion_confirmation: Tem a certeza?
|
273
|
+
saved_query_deletion_link_title: Apagar a query
|
274
|
+
saved_query_link_title: Caregar a query
|
275
|
+
validates_uniqueness_error: Já existe uma query com o mesmo nome
|
276
|
+
validates_presence_error: Queira indicar o nome da query que deseja gravar
|
277
|
+
query_deleted_message: A query foi apagada.
|
278
|
+
query_saved_message: A query foi gravada.
|
279
|
+
select_all: Selecionar todos
|
280
|
+
deselect_all: Remover seleção
|
281
|
+
|
282
|
+
pt-BR:
|
283
|
+
date:
|
284
|
+
order:
|
285
|
+
- :year
|
286
|
+
- :month
|
287
|
+
- :day
|
288
|
+
wice_grid:
|
289
|
+
show_filter_tooltip: Mostrar o filtro
|
290
|
+
hide_filter_tooltip: Esconder o filtro
|
291
|
+
csv_export_tooltip: Exportar em CSV
|
292
|
+
filter_tooltip: Filtrar
|
293
|
+
reset_filter_tooltip: Reinicializar
|
294
|
+
boolean_filter_true_label: sim
|
295
|
+
boolean_filter_false_label: não
|
296
|
+
previous_label: «
|
297
|
+
next_label: »
|
298
|
+
date_selector_tooltip_from: De
|
299
|
+
date_selector_tooltip_to: a
|
300
|
+
negation_checkbox_title: Excluir
|
301
|
+
show_all_records_label: Ver todos
|
302
|
+
show_all_records_tooltip: Ver todos os registos
|
303
|
+
all_queries_warning: Tem certeza que gostaria de visualizar todos os registos?
|
304
|
+
switch_back_to_paginated_mode_label: Voltar à lista paginada
|
305
|
+
switch_back_to_paginated_mode_tooltip: Voltar à lista por página
|
306
|
+
date_string_tooltip: Clique para apagar
|
307
|
+
saved_query_panel_title: Filtros gravados
|
308
|
+
save_query_button_label: Gravar o estado dos filtros
|
309
|
+
saved_query_deletion_confirmation: Tem certeza?
|
310
|
+
saved_query_deletion_link_title: Apagar o filtro
|
311
|
+
saved_query_link_title: Carregar o filtro
|
312
|
+
validates_uniqueness_error: Já existe um filtro com o mesmo nome
|
313
|
+
validates_presence_error: Indique o nome do filtro que deseja gravar
|
314
|
+
query_deleted_message: O filtro foi apagado.
|
315
|
+
query_saved_message: O filtro foi gravado.
|
316
|
+
select_all: Selecionar todos
|
317
|
+
deselect_all: Remover seleção
|
318
|
+
|
319
|
+
|
320
|
+
sk:
|
321
|
+
date:
|
322
|
+
order:
|
323
|
+
- :year
|
324
|
+
- :month
|
325
|
+
- :day
|
326
|
+
wice_grid:
|
327
|
+
show_filter_tooltip: Zobraziť filter
|
328
|
+
hide_filter_tooltip: Skryť filter
|
329
|
+
csv_export_tooltip: Exportovať do CSV
|
330
|
+
filter_tooltip: Filter
|
331
|
+
reset_filter_tooltip: Zrušiť filtre
|
332
|
+
boolean_filter_true_label: "áno"
|
333
|
+
boolean_filter_false_label: "nie"
|
334
|
+
previous_label: «
|
335
|
+
next_label: »
|
336
|
+
# Title of the icon clicking on which will show the calendar to set the FROM date.
|
337
|
+
date_selector_tooltip_from: Dátum od
|
338
|
+
# Title of the icon clicking on which will show the calendar to set the TO date.
|
339
|
+
date_selector_tooltip_to: Dátum do
|
340
|
+
# The title of the checkox to turn on negation
|
341
|
+
negation_checkbox_title: Inverzný výber
|
342
|
+
# link to switch to show all records
|
343
|
+
show_all_records_label: Zobraziť všetko
|
344
|
+
# tooltip for the link to switch to show all records
|
345
|
+
show_all_records_tooltip: Zobrazí všetky záznamy v databáze
|
346
|
+
# Warning message shown when the user wants to switch to all-records mode
|
347
|
+
all_queries_warning: Určite chceš zobraziť všetky záznamy v databáze?
|
348
|
+
# link to paginated view
|
349
|
+
switch_back_to_paginated_mode_label: späť na stránkové zobrazenie
|
350
|
+
# tooltip for the link to paginated view
|
351
|
+
switch_back_to_paginated_mode_tooltip: Prepnúť do stránkového zobrazenia
|
352
|
+
# Title of the date string.
|
353
|
+
date_string_tooltip: Kliknutím zmažeš
|
354
|
+
saved_query_panel_title: Uložené filtre/výsledky
|
355
|
+
save_query_button_label: Uložiť stav filtrov
|
356
|
+
saved_query_deletion_confirmation: Si si istý?
|
357
|
+
saved_query_deletion_link_title: Vymazať uložený filter
|
358
|
+
saved_query_link_title: Nahrať uložený filter
|
359
|
+
validates_uniqueness_error: Filter s uvedeným názvom už existuje.
|
360
|
+
validates_presence_error: Prosím zadaj názov uloženého filtra.
|
361
|
+
query_deleted_message: Uložený filter bol vymazaný.
|
362
|
+
query_saved_message: Filter bol uložený.
|
363
|
+
select_all: Vyber všetko
|
364
|
+
deselect_all: Zrušiť výber
|
365
|
+
|
366
|
+
cz:
|
367
|
+
date:
|
368
|
+
order:
|
369
|
+
- :year
|
370
|
+
- :month
|
371
|
+
- :day
|
372
|
+
wice_grid:
|
373
|
+
show_filter_tooltip: Zobrazit filtr
|
374
|
+
hide_filter_tooltip: Skrýt filtr
|
375
|
+
csv_export_tooltip: Exportovat do CSV
|
376
|
+
filter_tooltip: Filtr
|
377
|
+
reset_filter_tooltip: Zrušit filtr
|
378
|
+
boolean_filter_true_label: "áno"
|
379
|
+
boolean_filter_false_label: "ne"
|
380
|
+
previous_label: «
|
381
|
+
next_label: »
|
382
|
+
# Title of the icon clicking on which will show the calendar to set the FROM date.
|
383
|
+
date_selector_tooltip_from: Dátum od
|
384
|
+
# Title of the icon clicking on which will show the calendar to set the TO date.
|
385
|
+
date_selector_tooltip_to: Dátum do
|
386
|
+
# The title of the checkox to turn on negation
|
387
|
+
negation_checkbox_title: Inverzní výběr
|
388
|
+
# link to switch to show all records
|
389
|
+
show_all_records_label: Zobrazit všechno
|
390
|
+
# tooltip for the link to switch to show all records
|
391
|
+
show_all_records_tooltip: Zobrazí všechny záznamy v databáze
|
392
|
+
# Warning message shown when the user wants to switch to all-records mode
|
393
|
+
all_queries_warning: Určitě chceš zobrazit všechny záznamy v databáze?
|
394
|
+
# link to paginated view
|
395
|
+
switch_back_to_paginated_mode_label: zpět na stránkové zobrazení
|
396
|
+
# tooltip for the link to paginated view
|
397
|
+
switch_back_to_paginated_mode_tooltip: Přepnout do stránkového zobrazení
|
398
|
+
# Title of the date string.
|
399
|
+
date_string_tooltip: Kliknutím zmažeš
|
400
|
+
saved_query_panel_title: Uložené filtry
|
401
|
+
save_query_button_label: Uložit aktuálni stav filtrů
|
402
|
+
saved_query_deletion_confirmation: Seš si jistej?
|
403
|
+
saved_query_deletion_link_title: Smazat uloženej filtr
|
404
|
+
saved_query_link_title: Použít uloženej filtr
|
405
|
+
validates_uniqueness_error: Filtr už existuje.
|
406
|
+
validates_presence_error: Prosím zadej název filtru.
|
407
|
+
query_deleted_message: Uložený filtr byl smazán.
|
408
|
+
query_saved_message: Filtr byl uložen.
|
409
|
+
select_all: Vyber všechno
|
410
|
+
deselect_all: Zrušit výběr
|
411
|
+
|
412
|
+
de:
|
413
|
+
date:
|
414
|
+
order:
|
415
|
+
- :year
|
416
|
+
- :month
|
417
|
+
- :day
|
418
|
+
wice_grid:
|
419
|
+
show_filter_tooltip: Filter einblenden
|
420
|
+
hide_filter_tooltip: Filter ausblenden
|
421
|
+
csv_export_tooltip: CSV Export
|
422
|
+
filter_tooltip: Filter
|
423
|
+
reset_filter_tooltip: Reset
|
424
|
+
boolean_filter_true_label: "Ja"
|
425
|
+
boolean_filter_false_label: "Nein"
|
426
|
+
previous_label: «
|
427
|
+
next_label: »
|
428
|
+
# Title of the icon clicking on which will show the calendar to set the FROM date.
|
429
|
+
date_selector_tooltip_from: Von
|
430
|
+
# Title of the icon clicking on which will show the calendar to set the TO date.
|
431
|
+
date_selector_tooltip_to: Bis
|
432
|
+
# The title of the checkox to turn on negation
|
433
|
+
negation_checkbox_title: Ausschließen
|
434
|
+
# link to switch to show all records
|
435
|
+
show_all_records_label: Alle anzeigen
|
436
|
+
# tooltip for the link to switch to show all records
|
437
|
+
show_all_records_tooltip: Alle anzeigen
|
438
|
+
# Warning message shown when the user wants to switch to all-records mode
|
439
|
+
all_queries_warning: Wollen Sie wirkliche alle Einträge anzeigen?
|
440
|
+
# link to paginated view
|
441
|
+
switch_back_to_paginated_mode_label: Zurück zur seitenbasierten Ansicht
|
442
|
+
# tooltip for the link to paginated view
|
443
|
+
switch_back_to_paginated_mode_tooltip: Zurück zur seitenbasierten Ansicht
|
444
|
+
# Title of the date string.
|
445
|
+
date_string_tooltip: Löschen
|
446
|
+
saved_query_panel_title: Gespeicherte Abfragen
|
447
|
+
save_query_button_label: Filter speichern
|
448
|
+
saved_query_deletion_confirmation: Sind Sie sicher?
|
449
|
+
saved_query_deletion_link_title: Abfrage löschen
|
450
|
+
saved_query_link_title: Abfrage laden
|
451
|
+
validates_uniqueness_error: Eine Abfrage mit dieser Bezeichnung existiert bereits!
|
452
|
+
validates_presence_error: Bitte vergeben Sie einen Namen!
|
453
|
+
query_deleted_message: Abfrage gelöscht.
|
454
|
+
query_saved_message: Abfrage gespeichert.
|
455
|
+
select_all: Alle auswählen
|
456
|
+
deselect_all: Auswahl aufheben
|
457
|
+
|
458
|
+
zh-CN:
|
459
|
+
date:
|
460
|
+
order:
|
461
|
+
- :year
|
462
|
+
- :month
|
463
|
+
- :day
|
464
|
+
wice_grid:
|
465
|
+
show_filter_tooltip: 显示过滤
|
466
|
+
hide_filter_tooltip: 隐藏过滤
|
467
|
+
csv_export_tooltip: 输出CSV档
|
468
|
+
filter_tooltip: 过滤
|
469
|
+
reset_filter_tooltip: 清除过滤
|
470
|
+
boolean_filter_true_label: "是"
|
471
|
+
boolean_filter_false_label: "否"
|
472
|
+
previous_label: «
|
473
|
+
next_label: »
|
474
|
+
# Title of the icon clicking on which will show the calendar to set the FROM date.
|
475
|
+
date_selector_tooltip_from: 从
|
476
|
+
# Title of the icon clicking on which will show the calendar to set the TO date.
|
477
|
+
date_selector_tooltip_to: 至
|
478
|
+
# The title of the checkox to turn on negation
|
479
|
+
negation_checkbox_title: 排除
|
480
|
+
# link to switch to show all records
|
481
|
+
show_all_records_label: 显示全部
|
482
|
+
# tooltip for the link to switch to show all records
|
483
|
+
show_all_records_tooltip: 显示全部记录
|
484
|
+
# Warning message shown when the user wants to switch to all-records mode
|
485
|
+
all_queries_warning: 确定要显示全部记录?
|
486
|
+
# link to paginated view
|
487
|
+
switch_back_to_paginated_mode_label: 回到分页显示
|
488
|
+
# tooltip for the link to paginated view
|
489
|
+
switch_back_to_paginated_mode_tooltip: 切换到分页显示
|
490
|
+
# Title of the date string.
|
491
|
+
date_string_tooltip: 按下以清除
|
492
|
+
saved_query_panel_title: 查询存储
|
493
|
+
save_query_button_label: 储存查询状态
|
494
|
+
saved_query_deletion_confirmation: 确定删除?
|
495
|
+
saved_query_deletion_link_title: 删除查询
|
496
|
+
saved_query_link_title: 读取查询
|
497
|
+
validates_uniqueness_error: 已存在相同名称的查询
|
498
|
+
validates_presence_error: 请为此查询命名
|
499
|
+
query_deleted_message: 查询已删除
|
500
|
+
query_saved_message: 查询已储存
|
501
|
+
select_all: 全选
|
502
|
+
deselect_all: 全清
|
@@ -0,0 +1,56 @@
|
|
1
|
+
module ConteRailsTemplate
|
2
|
+
class NavigationRenderer < SimpleNavigation::Renderer::Base
|
3
|
+
|
4
|
+
def render(item_container)
|
5
|
+
if options[:is_subnavigation]
|
6
|
+
ul_class = "child"
|
7
|
+
else
|
8
|
+
ul_class = "parent"
|
9
|
+
end
|
10
|
+
|
11
|
+
list_content = item_container.items.inject([]) do |list, item|
|
12
|
+
li_options = item.html_options.reject {|k, v| k == :link}
|
13
|
+
li_content = tag_for(item)
|
14
|
+
if include_sub_navigation?(item)
|
15
|
+
li_content << render_sub_navigation_for(item)
|
16
|
+
end
|
17
|
+
list << content_tag(:li, li_content, li_options)
|
18
|
+
end.join
|
19
|
+
if skip_if_empty? && item_container.empty?
|
20
|
+
''
|
21
|
+
else
|
22
|
+
content_tag(:ul, list_content, { :id => item_container.dom_id, :class => [item_container.dom_class, ul_class].flatten.compact.join(' ') })
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
def render_sub_navigation_for(item)
|
27
|
+
item.sub_navigation.render(self.options.merge(:is_subnavigation => true))
|
28
|
+
end
|
29
|
+
|
30
|
+
protected
|
31
|
+
|
32
|
+
def tag_for(item)
|
33
|
+
if item.url.nil?
|
34
|
+
content_tag('span', item.name, link_options_for(item).except(:method))
|
35
|
+
else
|
36
|
+
link_content = item.name
|
37
|
+
if item.url == "javascript:void(0);"
|
38
|
+
link_content = "#{item.name}<b class=\"caret\"></b>"
|
39
|
+
end
|
40
|
+
|
41
|
+
link_to(link_content, item.url, link_options_for(item))
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
# Extracts the options relevant for the generated link
|
46
|
+
#
|
47
|
+
def link_options_for(item)
|
48
|
+
special_options = {:method => item.method}.reject {|k, v| v.nil? }
|
49
|
+
link_options = item.html_options[:link] || {}
|
50
|
+
opts = special_options.merge(link_options)
|
51
|
+
opts[:class] = [link_options[:class], item.selected_class].flatten.compact.join(' ')
|
52
|
+
opts.delete(:class) if opts[:class].nil? || opts[:class] == ''
|
53
|
+
opts
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: conte_rails_template
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.9
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -75,6 +75,22 @@ dependencies:
|
|
75
75
|
- - ! '>='
|
76
76
|
- !ruby/object:Gem::Version
|
77
77
|
version: '0'
|
78
|
+
- !ruby/object:Gem::Dependency
|
79
|
+
name: simple-navigation
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
82
|
+
requirements:
|
83
|
+
- - ! '>='
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: '0'
|
86
|
+
type: :runtime
|
87
|
+
prerelease: false
|
88
|
+
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
90
|
+
requirements:
|
91
|
+
- - ! '>='
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '0'
|
78
94
|
description: Rails Theme Template for Conte
|
79
95
|
email:
|
80
96
|
- babaru.trinit@gmail.com
|
@@ -82,11 +98,17 @@ executables: []
|
|
82
98
|
extensions: []
|
83
99
|
extra_rdoc_files: []
|
84
100
|
files:
|
101
|
+
- lib/breadcrumbs_renderer.rb
|
85
102
|
- lib/conte_rails_template/version.rb
|
86
103
|
- lib/conte_rails_template.rb
|
87
104
|
- lib/generators/conte_rails_template/install_generator.rb
|
88
105
|
- lib/generators/conte_rails_template/templates/layout.html.erb
|
106
|
+
- lib/generators/conte_rails_template/templates/navigation_renderers.rb
|
89
107
|
- lib/generators/conte_rails_template/templates/session.html.erb
|
108
|
+
- lib/generators/conte_rails_template/templates/simple_navigation.rb
|
109
|
+
- lib/generators/conte_rails_template/templates/wice_grid_config.rb
|
110
|
+
- lib/generators/conte_rails_template/templates/wice_grid_local.yml
|
111
|
+
- lib/navigation_renderer.rb
|
90
112
|
- vendor/assets/images/app_logo.png
|
91
113
|
- vendor/assets/images/breadcrumb_bg.png
|
92
114
|
- vendor/assets/images/login_logo.png
|