rademade_admin 0.0.3 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/fonts/glyphicons-halflings-regular.eot +0 -0
- data/app/assets/fonts/glyphicons-halflings-regular.svg +229 -0
- data/app/assets/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/app/assets/fonts/glyphicons-halflings-regular.woff +0 -0
- data/app/assets/images/rademade_admin/ico/btn-attach.png +0 -0
- data/app/assets/images/rademade_admin/logos/logo.png +0 -0
- data/app/assets/javascripts/rademade_admin.coffee +8 -4
- data/app/assets/javascripts/rademade_admin/app/app.coffee +2 -1
- data/app/assets/javascripts/rademade_admin/app/common/datetime-picker.coffee +7 -0
- data/app/assets/javascripts/rademade_admin/app/common/dnd-sort.coffee +23 -32
- data/app/assets/javascripts/rademade_admin/app/common/droplist.coffee +8 -0
- data/app/assets/javascripts/rademade_admin/app/common/lang-panel.coffee +6 -0
- data/app/assets/javascripts/rademade_admin/app/common/related-index.coffee +6 -9
- data/app/assets/javascripts/rademade_admin/app/common/sort-list.coffee +10 -14
- data/app/assets/javascripts/rademade_admin/app/common/uploader.coffee +3 -3
- data/app/assets/javascripts/rademade_admin/app/form-popup/initializer.coffee +24 -37
- data/app/assets/javascripts/rademade_admin/app/form-popup/view.coffee +32 -18
- data/app/assets/javascripts/rademade_admin/app/forms/remove.coffee +4 -3
- data/app/assets/javascripts/rademade_admin/app/select2/model.coffee +7 -0
- data/app/assets/javascripts/rademade_admin/app/select2/related/collection-view.coffee +35 -0
- data/app/assets/javascripts/rademade_admin/app/select2/related/collection.coffee +28 -0
- data/app/assets/javascripts/rademade_admin/app/select2/related/model.coffee +15 -0
- data/app/assets/javascripts/rademade_admin/app/select2/related/view.coffee +40 -0
- data/app/assets/javascripts/rademade_admin/app/select2/view.coffee +78 -0
- data/app/assets/javascripts/rademade_admin/form/form-ajax.coffee +48 -0
- data/app/assets/javascripts/rademade_admin/form/form-initializater.coffee +45 -0
- data/app/assets/javascripts/rademade_admin/form/form-validation.coffee +42 -0
- data/app/assets/javascripts/rademade_admin/form/form.coffee +62 -0
- data/app/assets/javascripts/rademade_admin/library/ckeditor/config.js +14 -12
- data/app/assets/stylesheets/{rademade_admin/bootstrap → old/-bootstrap}/bootstrap-overrides.css.erb +0 -0
- data/app/assets/stylesheets/{rademade_admin/bootstrap → old/-bootstrap}/main.scss.erb +0 -0
- data/app/assets/stylesheets/{rademade_admin/detail_admin → old/-detail_admin}/chart-showcase.scss.erb +0 -0
- data/app/assets/stylesheets/{rademade_admin/detail_admin → old/-detail_admin}/datatables.scss.erb +0 -0
- data/app/assets/stylesheets/{rademade_admin/detail_admin → old/-detail_admin}/elements.scss.erb +0 -0
- data/app/assets/stylesheets/{rademade_admin/detail_admin → old/-detail_admin}/error.scss.erb +0 -0
- data/app/assets/stylesheets/{rademade_admin/detail_admin → old/-detail_admin}/form-showcase.scss.erb +0 -0
- data/app/assets/stylesheets/{rademade_admin/detail_admin → old/-detail_admin}/form-wizard.scss.erb +0 -0
- data/app/assets/stylesheets/{rademade_admin/detail_admin → old/-detail_admin}/gallery.scss.erb +0 -0
- data/app/assets/stylesheets/{rademade_admin/detail_admin → old/-detail_admin}/grids.scss.erb +0 -0
- data/app/assets/stylesheets/{rademade_admin/detail_admin → old/-detail_admin}/icons.scss.erb +0 -0
- data/app/assets/stylesheets/{rademade_admin/detail_admin → old/-detail_admin}/index.scss.erb +0 -0
- data/app/assets/stylesheets/{rademade_admin/detail_admin → old/-detail_admin}/layout.scss.erb +0 -0
- data/app/assets/stylesheets/{rademade_admin/detail_admin → old/-detail_admin}/new-user.scss.erb +0 -0
- data/app/assets/stylesheets/{rademade_admin/detail_admin → old/-detail_admin}/personal-info.scss.erb +0 -0
- data/app/assets/stylesheets/{rademade_admin/detail_admin → old/-detail_admin}/popup.scss.erb +0 -0
- data/app/assets/stylesheets/{rademade_admin/detail_admin → old/-detail_admin}/signin.scss.erb +0 -0
- data/app/assets/stylesheets/{rademade_admin/detail_admin → old/-detail_admin}/tables.scss.erb +0 -0
- data/app/assets/stylesheets/{rademade_admin/detail_admin → old/-detail_admin}/ui-elements.scss.erb +0 -0
- data/app/assets/stylesheets/{rademade_admin/detail_admin → old/-detail_admin}/user-list.scss.erb +0 -0
- data/app/assets/stylesheets/{rademade_admin/detail_admin → old/-detail_admin}/user-profile.scss.erb +0 -0
- data/app/assets/stylesheets/{rademade_admin/detail_admin → old/-detail_admin}/web-app-icons.scss.erb +0 -0
- data/app/assets/stylesheets/{rademade_admin/lib → old/-lib}/bootstrap.datepicker.css.erb +0 -0
- data/app/assets/stylesheets/{rademade_admin/lib → old/-lib}/morris.css.erb +0 -0
- data/app/assets/stylesheets/{rademade_admin → old}/base.scss.erb +0 -0
- data/app/assets/stylesheets/{rademade_admin → old}/edit.css +0 -0
- data/app/assets/stylesheets/{rademade_admin → old}/file-upload.scss.erb +0 -0
- data/app/assets/stylesheets/{rademade_admin → old}/notifier.custom.css.erb +0 -0
- data/app/assets/stylesheets/{rademade_admin → old}/scaffolds.scss.erb +0 -0
- data/app/assets/stylesheets/rademade_admin.sass.erb +96 -0
- data/app/assets/stylesheets/rademade_admin/base/main.sass +71 -0
- data/app/assets/stylesheets/rademade_admin/blocks/buttons/main.sass +81 -0
- data/app/assets/stylesheets/rademade_admin/blocks/form/input.sass +29 -0
- data/app/assets/stylesheets/rademade_admin/blocks/form/label.sass +31 -0
- data/app/assets/stylesheets/rademade_admin/blocks/form/select.sass +26 -0
- data/app/assets/stylesheets/rademade_admin/blocks/form/select2.sass +67 -0
- data/app/assets/stylesheets/rademade_admin/blocks/form/table.sass +42 -0
- data/app/assets/stylesheets/rademade_admin/blocks/form/texarea.sass +20 -0
- data/app/assets/stylesheets/rademade_admin/blocks/header/_logo.sass +7 -0
- data/app/assets/stylesheets/rademade_admin/blocks/header/_menu.sass +80 -0
- data/app/assets/stylesheets/rademade_admin/blocks/header/_search.sass +37 -0
- data/app/assets/stylesheets/rademade_admin/blocks/page/content/_main.sass +11 -0
- data/app/assets/stylesheets/rademade_admin/blocks/page/headline/main.sass +44 -0
- data/app/assets/stylesheets/rademade_admin/blocks/page/menu/_main.sass +31 -0
- data/app/assets/stylesheets/rademade_admin/lib/datepicker.sass +373 -0
- data/app/assets/stylesheets/rademade_admin/lib/glyphicon.sass.erb +618 -0
- data/app/assets/stylesheets/rademade_admin/lib/notifier.css.erb +661 -0
- data/app/assets/stylesheets/rademade_admin/lib/uploader.sass +66 -0
- data/app/assets/stylesheets/rademade_admin/mixins/clear.sass +5 -0
- data/app/assets/stylesheets/rademade_admin/mixins/fonts.sass +8 -0
- data/app/assets/stylesheets/rademade_admin/mixins/sprite.sass +7 -0
- data/app/assets/stylesheets/rademade_admin/mixins/text-overflow.sass +6 -0
- data/app/assets/stylesheets/rademade_admin/mixins/user-select.sass +5 -0
- data/app/assets/stylesheets/rademade_admin/modules/breadcrumbs/main.sass +30 -0
- data/app/assets/stylesheets/rademade_admin/modules/errors/error.sass.erb +19 -0
- data/app/assets/stylesheets/rademade_admin/modules/form/main.sass +15 -0
- data/app/assets/stylesheets/rademade_admin/modules/header/main.sass +6 -0
- data/app/assets/stylesheets/rademade_admin/modules/login/_main.sass +79 -0
- data/app/assets/stylesheets/rademade_admin/modules/main-menu/main.sass +0 -0
- data/app/assets/stylesheets/rademade_admin/modules/page/main.sass +16 -0
- data/app/assets/stylesheets/rademade_admin/modules/pagination/main.sass +51 -0
- data/app/assets/stylesheets/rademade_admin/modules/popup/new.sass +18 -0
- data/app/assets/stylesheets/rademade_admin/var/colors.sass +0 -0
- data/app/assets/stylesheets/rademade_admin/var/images.sass +2 -0
- data/app/assets/stylesheets/rademade_admin/var/width.sass +13 -0
- data/app/controllers/rademade_admin/abstract_controller.rb +18 -2
- data/app/controllers/rademade_admin/application_controller.rb +1 -1
- data/app/controllers/rademade_admin/dashboard_controller.rb +1 -1
- data/app/controllers/rademade_admin/file_controller.rb +25 -0
- data/app/controllers/rademade_admin/model_controller.rb +66 -47
- data/app/controllers/rademade_admin/sessions_controller.rb +3 -3
- data/app/helpers/rademade_admin/field_helper.rb +21 -32
- data/app/helpers/rademade_admin/form_helper.rb +57 -27
- data/app/helpers/rademade_admin/menu_helper.rb +12 -5
- data/app/helpers/rademade_admin/uri_helper.rb +50 -62
- data/app/inputs/rademade_admin/date_time_input.rb +13 -0
- data/app/inputs/rademade_admin/file_input.rb +72 -0
- data/app/inputs/rademade_admin/related_select_input.rb +78 -0
- data/app/serializers/autocomplete/link_serializer.rb +6 -4
- data/app/services/linker.rb +8 -14
- data/app/services/login.rb +5 -3
- data/app/services/model_controller/breadcrumbs.rb +36 -0
- data/app/services/model_controller/instance_options.rb +7 -5
- data/app/services/model_controller/model_options.rb +10 -7
- data/app/services/model_controller/notifier.rb +10 -6
- data/app/services/model_controller/templates.rb +4 -3
- data/app/services/relation_service.rb +11 -0
- data/app/services/saver.rb +59 -24
- data/app/services/search/conditions/abstract.rb +15 -14
- data/app/services/search/conditions/autocomplete.rb +11 -9
- data/app/services/search/conditions/list.rb +6 -5
- data/app/services/search/conditions/related_list.rb +17 -13
- data/app/services/search/{conditions/part/where.rb → part/abstract.rb} +7 -9
- data/app/services/search/part/order.rb +17 -0
- data/app/services/search/part/where.rb +19 -0
- data/app/services/sortable_service.rb +27 -27
- data/app/services/template_service.rb +68 -0
- data/app/services/upload/preview_service.rb +86 -0
- data/app/views/layouts/rademade_admin.html.erb +13 -4
- data/app/views/rademade_admin/_blocks/_header.html.erb +35 -28
- data/app/views/rademade_admin/_blocks/_menu.html.erb +20 -23
- data/app/views/rademade_admin/_blocks/_on_page_select.html.erb +15 -0
- data/app/views/rademade_admin/_blocks/_pagination.html.erb +1 -18
- data/app/views/rademade_admin/_blocks/_sub_menu.html.erb +3 -3
- data/app/views/rademade_admin/_blocks/form/_control.html.erb +3 -0
- data/app/views/rademade_admin/_blocks/form/_lang_panel.html.erb +19 -0
- data/app/views/rademade_admin/_blocks/sub_menu/_link.html.erb +6 -5
- data/app/views/rademade_admin/_blocks/table/_head.html.erb +13 -0
- data/app/views/rademade_admin/_layouts/inner.html.erb +21 -33
- data/app/views/rademade_admin/_layouts/inner/form.html.erb +6 -13
- data/app/views/rademade_admin/_layouts/inner/index_table.html.erb +31 -55
- data/app/views/rademade_admin/_layouts/inner/related_index_table.html.erb +26 -54
- data/app/views/rademade_admin/abstract/_form.html.erb +6 -9
- data/app/views/rademade_admin/abstract/edit.html.erb +3 -8
- data/app/views/rademade_admin/abstract/index.html.erb +38 -67
- data/app/views/rademade_admin/abstract/new.html.erb +3 -8
- data/app/views/rademade_admin/abstract/related.html.erb +48 -0
- data/app/views/rademade_admin/dashboard/index.html.erb +4 -5
- data/app/views/rademade_admin/dashboard/login.html.erb +19 -30
- data/config/initializers/carrier_wave/mongoid.rb +48 -0
- data/config/initializers/ckeditor.rb +3 -0
- data/config/initializers/kaminari_route_proxy.rb +16 -0
- data/config/initializers/simple_form.rb +147 -0
- data/config/initializers/simple_form/rademade_component.rb +9 -0
- data/config/initializers/simple_form/wrappers.rb +28 -0
- data/config/locales/rademade_admin.en.yml +28 -0
- data/config/locales/simple_form.en.yml +26 -0
- data/config/routes.rb +1 -2
- data/lib/rademade_admin.rb +7 -5
- data/lib/rademade_admin/bower/performer.rb +1 -1
- data/lib/rademade_admin/breadcrumbs/render/rademade.rb +31 -0
- data/lib/rademade_admin/engine.rb +2 -2
- data/lib/rademade_admin/input/related_select_input/model_data.rb +40 -0
- data/lib/rademade_admin/input/related_select_input/related_list.rb +60 -0
- data/lib/rademade_admin/model/adapter/data.rb +119 -0
- data/lib/rademade_admin/model/adapter/data/active_record.rb +109 -0
- data/lib/rademade_admin/model/adapter/data/mongoid.rb +77 -0
- data/{app/services/search/query_adapter/abstract.rb → lib/rademade_admin/model/adapter/query.rb} +15 -5
- data/lib/rademade_admin/model/adapter/query/active_record.rb +50 -0
- data/lib/rademade_admin/model/adapter/query/mongoid.rb +57 -0
- data/lib/rademade_admin/model/configuration.rb +43 -16
- data/lib/rademade_admin/model/configuration/field_label.rb +16 -0
- data/lib/rademade_admin/model/configuration/fields.rb +47 -21
- data/lib/rademade_admin/model/configuration/fields_labels.rb +31 -0
- data/lib/rademade_admin/model/configuration/form_field.rb +27 -0
- data/lib/rademade_admin/model/configuration/form_fields.rb +18 -0
- data/lib/rademade_admin/model/configuration/list_field.rb +21 -0
- data/lib/rademade_admin/model/configuration/list_fields.rb +18 -0
- data/lib/rademade_admin/model/graph.rb +9 -9
- data/lib/rademade_admin/model/info.rb +53 -68
- data/lib/rademade_admin/model/info/data_item.rb +130 -0
- data/lib/rademade_admin/model/info/data_items.rb +130 -0
- data/lib/rademade_admin/model/info/field.rb +39 -0
- data/lib/rademade_admin/model/info/fields.rb +87 -0
- data/lib/rademade_admin/model/info/relation.rb +49 -0
- data/lib/rademade_admin/model/info/relations.rb +40 -0
- data/lib/rademade_admin/model/info/uploader.rb +16 -0
- data/lib/rademade_admin/model/info/uploaders.rb +35 -0
- data/lib/rademade_admin/model/reflection.rb +38 -9
- data/lib/rademade_admin/routing/mapper.rb +9 -5
- data/lib/rademade_admin/search/searcher.rb +22 -0
- data/lib/rademade_admin/sortable.rb +1 -0
- data/lib/rademade_admin/uploader/photo.rb +1 -0
- data/lib/rademade_admin/user.rb +7 -6
- data/lib/rademade_admin/version.rb +1 -1
- data/lib/tasks/rademade_bower_install.rake +10 -2
- data/lib/templates/erb/scaffold/_form.html.erb +13 -0
- metadata +195 -109
- data/app/assets/javascripts/rademade_admin/app/common/relation-list.coffee +0 -109
- data/app/assets/javascripts/rademade_admin/app/form-popup/collection.coffee +0 -20
- data/app/assets/javascripts/rademade_admin/app/form-popup/model.coffee +0 -4
- data/app/assets/javascripts/rademade_admin/detail_admin/theme.js +0 -56
- data/app/assets/javascripts/rademade_admin/form/form-ajax-submit.coffee +0 -157
- data/app/assets/stylesheets/rademade_admin.scss.erb +0 -19
- data/app/helpers/rademade_admin/name_helper.rb +0 -18
- data/app/helpers/rademade_admin/upload_preview_helper.rb +0 -60
- data/app/inputs/rademade_admin/admin_file_input.rb +0 -71
- data/app/inputs/rademade_admin/admin_select_input.rb +0 -82
- data/app/inputs/rademade_admin/admin_textarea_input.rb +0 -6
- data/app/inputs/rademade_admin/boolean_input.rb +0 -14
- data/app/services/form_builder.rb +0 -4
- data/app/services/search/query_adapter/active_record.rb +0 -45
- data/app/services/search/query_adapter/mongoid.rb +0 -51
- data/app/services/search/searcher.rb +0 -20
- data/app/views/rademade_admin/_blocks/_form_control.html.erb +0 -5
- data/app/views/rademade_admin/abstract/related_index.html.erb +0 -85
- data/config/initializers/devise.rb +0 -251
- data/config/initializers/formtastic.rb +0 -13
- data/lib/rademade_admin/model/data_adapter.rb +0 -64
- data/lib/rademade_admin/model/data_adapter/active_record.rb +0 -59
- data/lib/rademade_admin/model/data_adapter/mongoid.rb +0 -54
- data/lib/rademade_admin/model/reflection/data.rb +0 -48
- data/lib/rademade_admin/model/reflection/uploader.rb +0 -18
@@ -2,12 +2,21 @@
|
|
2
2
|
<html>
|
3
3
|
<head>
|
4
4
|
<title>Rademade Admin</title>
|
5
|
-
<%= stylesheet_link_tag(:rademade_admin, :media =>
|
6
|
-
<%= javascript_include_tag(:rademade_admin,
|
5
|
+
<%= stylesheet_link_tag(:rademade_admin, :media => 'all', 'data-turbolinks-track' => true) %>
|
6
|
+
<%= javascript_include_tag(:rademade_admin, 'data-turbolinks-track' => true) %>
|
7
7
|
<%= csrf_meta_tags %>
|
8
|
-
<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
|
9
8
|
</head>
|
9
|
+
|
10
10
|
<body>
|
11
|
-
|
11
|
+
<div class="wrapper">
|
12
|
+
<%= yield %>
|
13
|
+
</div>
|
12
14
|
</body>
|
15
|
+
|
16
|
+
<%= javascript_tag do %>
|
17
|
+
I18n.defaultLocale = "<%= I18n.default_locale %>";
|
18
|
+
I18n.locale = "<%= I18n.locale %>";
|
19
|
+
I18n.fallbacks = true;
|
20
|
+
<% end %>
|
21
|
+
|
13
22
|
</html>
|
@@ -1,30 +1,37 @@
|
|
1
|
-
<header
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
<span class="icon-bar"></span>
|
7
|
-
<span class="icon-bar"></span>
|
8
|
-
<span class="icon-bar"></span>
|
9
|
-
</button>
|
10
|
-
|
11
|
-
<a class="navbar-brand" href="<%=url_for(:root)%>">
|
12
|
-
<img src="<%=image_path 'rademade_admin/logos/logo.png'%>" alt="logo">
|
13
|
-
</a>
|
14
|
-
</div>
|
15
|
-
|
16
|
-
<ul class="nav navbar-nav pull-right hidden-xs">
|
17
|
-
<li class="dropdown">
|
18
|
-
<a href="javascript:void(0);" class="dropdown-toggle hidden-xs hidden-sm" data-toggle="dropdown">
|
19
|
-
<span><%= @current_user %></span>
|
20
|
-
<b class="caret"></b>
|
1
|
+
<header>
|
2
|
+
<div class="header">
|
3
|
+
<div class="fix">
|
4
|
+
<a class="header-logo fl-l" href="<%= url_for(:root) %>">
|
5
|
+
<img src="<%= image_path 'rademade_admin/logos/logo.png' %>" alt="Rademade admin">
|
21
6
|
</a>
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
7
|
+
<div class="fl-r">
|
8
|
+
<form class="header-search fl-l" role="search">
|
9
|
+
<div class="header-search-box">
|
10
|
+
<input type="text" class="header-search-input" placeholder="<%= t('rademade_admin.search') %>">
|
11
|
+
</div>
|
12
|
+
<button type="submit" class="header-search-btn"><%= t('rademade_admin.submit') %></button>
|
13
|
+
</form>
|
14
|
+
<div class="header-menu fl-l">
|
15
|
+
<div class="menu-item">
|
16
|
+
<span class="menu-link disabled"><%= @current_user %> <b class="caret"></b></span>
|
17
|
+
</div>
|
18
|
+
<div class="menu-item js-box">
|
19
|
+
<span class="menu-link js-link"><i class="glyphicon glyphicon-list"></i></span>
|
20
|
+
<div class="menu-droplist js-droplist">
|
21
|
+
<%# <div class="menu-droplist-header">Active links</div>
|
22
|
+
<a class="menu-droplist-link" href="#">Link</a>
|
23
|
+
<a class="menu-droplist-link" href="#">Link</a>
|
24
|
+
<div class="menu-droplist-header">Disable links</div>
|
25
|
+
<span class="menu-droplist-link disabled">Disable link</span>
|
26
|
+
<span class="menu-droplist-link disabled">Disable link</span> %>
|
27
|
+
<%= link_to t('rademade_admin.exit'), [:logout, :sessions], { :method => :delete, :class => 'menu-droplist-link last' } %>
|
28
|
+
</div>
|
29
|
+
</div>
|
30
|
+
<div class="menu-item">
|
31
|
+
<%= link_to t('rademade_admin.exit'), [:logout, :sessions], { :method => :delete, :class => 'menu-link last' } %>
|
32
|
+
</div>
|
33
|
+
</div>
|
34
|
+
</div>
|
35
|
+
</div>
|
36
|
+
</div>
|
30
37
|
</header>
|
@@ -1,45 +1,42 @@
|
|
1
|
-
<div id="sidebar-nav">
|
1
|
+
<div id="sidebar-nav" class="content-menu">
|
2
2
|
<ul id="dashboard-menu"><%
|
3
3
|
main_menu.each do |menu_item|
|
4
4
|
has_sub_items = (menu_item[:sub].is_a? Array and menu_item[:sub].size > 0)
|
5
5
|
if has_sub_items || menu_item[:uri]
|
6
|
-
item_name = menu_item[:name] ||
|
6
|
+
item_name = menu_item[:name] || menu_item[:model_info].item_name
|
7
7
|
is_active = active?(menu_item)
|
8
|
-
%><li<%
|
8
|
+
%><li class="menu-box<%
|
9
9
|
if is_active
|
10
|
-
%>
|
10
|
+
%> active<%
|
11
11
|
end
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
<div class="pointer">
|
12
|
+
%>"><%
|
13
|
+
if is_active
|
14
|
+
%><div class="pointer">
|
16
15
|
<div class="arrow"></div>
|
17
16
|
<div class="arrow_border"></div>
|
18
|
-
</div
|
19
|
-
|
17
|
+
</div><%
|
18
|
+
end
|
20
19
|
|
21
|
-
|
20
|
+
%><a href="<%= menu_item[:uri] %>" class="menu-link<%
|
22
21
|
if has_sub_items
|
23
|
-
%>
|
22
|
+
%> dropdown-toggle<%
|
24
23
|
end
|
25
|
-
|
24
|
+
%>">
|
26
25
|
<i class="<%= menu_item[:ico] %>"></i>
|
27
|
-
<span><%= item_name %></span
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
26
|
+
<span><%= item_name %></span><%
|
27
|
+
if has_sub_items
|
28
|
+
%><span class="caret"></span><%
|
29
|
+
end
|
30
|
+
%></a><%
|
33
31
|
if has_sub_items
|
34
32
|
%><ul class="submenu"><%
|
35
|
-
concat render
|
33
|
+
concat render @template_service.sub_menu_link_block, {
|
36
34
|
:uri => admin_list_uri(menu_item[:model_info]),
|
37
|
-
:title =>
|
35
|
+
:title => menu_item[:model_info].item_name
|
38
36
|
}
|
39
|
-
concat render
|
37
|
+
concat render @template_service.sub_menu_block, :menu_item => menu_item
|
40
38
|
%></ul><%
|
41
39
|
end
|
42
|
-
|
43
40
|
%></li><%
|
44
41
|
end
|
45
42
|
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<div class="select-list fl-r">
|
2
|
+
<div class="select-list-text fl-l">
|
3
|
+
<span><%= t('rademade_admin.show_results') %></span>
|
4
|
+
</div>
|
5
|
+
<div class="select-list-box fl-r">
|
6
|
+
<form action="#" method="get">
|
7
|
+
<select class="btn blue-btn select-btn fl-l" id="perPageSelect" name="paginate"><%
|
8
|
+
[20, 40, 60].each do |per_page|
|
9
|
+
concat pagination_option(per_page)
|
10
|
+
end
|
11
|
+
%></select>
|
12
|
+
</form>
|
13
|
+
</div>
|
14
|
+
</div>
|
15
|
+
<div class="clear"></div>
|
@@ -1,18 +1 @@
|
|
1
|
-
|
2
|
-
<%= paginate @items %>
|
3
|
-
</div>
|
4
|
-
|
5
|
-
<div class="paginator-stats">
|
6
|
-
<%= page_entries_info @items %><br>
|
7
|
-
<span>Show results on page</span>
|
8
|
-
</div>
|
9
|
-
|
10
|
-
<div class="paginator-controll">
|
11
|
-
<form action="#" method="get">
|
12
|
-
<select id="perPageSelect" name="paginate"><%
|
13
|
-
[20, 40, 60].each do |per_page|
|
14
|
-
concat pagination_option(per_page)
|
15
|
-
end
|
16
|
-
%></select>
|
17
|
-
</form>
|
18
|
-
</div>
|
1
|
+
<%= paginate @items, :params => {:admin_params => {}} %>
|
@@ -1,10 +1,10 @@
|
|
1
1
|
<ul class="submenu"><%
|
2
2
|
menu_item[:sub].each do |sub_item|
|
3
|
-
concat render
|
3
|
+
concat render @template_service.sub_menu_link_block, {
|
4
4
|
:uri => admin_list_uri(sub_item[:model_info]),
|
5
|
-
:title =>
|
5
|
+
:title => sub_item[:model_info].item_name
|
6
6
|
}
|
7
|
-
concat render
|
7
|
+
concat render @template_service.sub_menu_block, {
|
8
8
|
:menu_item => sub_item
|
9
9
|
}
|
10
10
|
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<%
|
2
|
+
if @form_fields_with_locale.length > 0
|
3
|
+
%><div data-lang-panel>
|
4
|
+
<ul><%
|
5
|
+
I18n.available_locales.each do |locale|
|
6
|
+
%><li class="btn blue-btn" style="margin-right: 10px; padding: 0px">
|
7
|
+
<a href="#locale-<%= locale %>" style="color: #ffffff; display: block; width: 37px; line-height: 30px"><%= locale %></a>
|
8
|
+
</li><%
|
9
|
+
end
|
10
|
+
%></ul><%
|
11
|
+
I18n.available_locales.each do |locale|
|
12
|
+
%><div id="locale-<%= locale %>"><%
|
13
|
+
@form_fields_with_locale.each do |form_field|
|
14
|
+
admin_localized_field(f, form_field, @model_info, locale)
|
15
|
+
end
|
16
|
+
%></div><%
|
17
|
+
end
|
18
|
+
%></div><%
|
19
|
+
end %>
|
@@ -1,5 +1,6 @@
|
|
1
|
-
<%
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
1
|
+
<%
|
2
|
+
unless uri.nil?
|
3
|
+
%><li class="menu-box">
|
4
|
+
<a class="menu-link" href="<%= uri %>"><%= title %></a>
|
5
|
+
</li><%
|
6
|
+
end %>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<thead class="table-header">
|
2
|
+
<tr class="table-line"><%
|
3
|
+
list_fields.each do |field|
|
4
|
+
%><th class="table-item" data-column="<%= field.name %>">
|
5
|
+
<span><%= field.label + @sortable_service.sorting_sign(field) %></span>
|
6
|
+
</th><%
|
7
|
+
end
|
8
|
+
%><th class="table-item">
|
9
|
+
<span class="line"></span>
|
10
|
+
<span><%= t('rademade_admin.management') %></span>
|
11
|
+
</th>
|
12
|
+
</tr>
|
13
|
+
</thead>
|
@@ -1,37 +1,25 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
<div
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
1
|
+
<%
|
2
|
+
concat render @template_service.header_block
|
3
|
+
%><div class="page">
|
4
|
+
<div class="fix"><%
|
5
|
+
concat render @template_service.menu_block
|
6
|
+
%><div id="pad-wrapper" class="content"><%
|
7
|
+
concat breadcrumbs.render(:format => :rademade)
|
8
|
+
%><div class="table-wrapper products-table content-box"><%
|
9
|
+
if content_for?(:page_header)
|
10
|
+
%><div class="page-headline">
|
11
|
+
<%= yield(:page_header) %> <span class="small-desc hide">In this field small page description</span>
|
12
|
+
</div><%
|
13
|
+
end
|
14
|
+
if content_for?(:nav_buttons)
|
15
|
+
%><div class="row filter-block">
|
16
|
+
<div class="pull-right">
|
17
|
+
<%= yield(:nav_buttons) %>
|
18
|
+
</div>
|
19
|
+
</div><%
|
20
|
+
end
|
21
|
+
%><%= yield(:content) if content_for?(:content) %>
|
15
22
|
</div>
|
16
|
-
|
17
|
-
<% if content_for?(:page_header) %>
|
18
|
-
<div class="row head">
|
19
|
-
<div class="col-md-12">
|
20
|
-
<%= yield(:page_header) %>
|
21
|
-
</div>
|
22
|
-
</div>
|
23
|
-
<% end %>
|
24
|
-
|
25
|
-
<% if content_for?(:nav_buttons) %>
|
26
|
-
<div class="row filter-block">
|
27
|
-
<div class="pull-right">
|
28
|
-
<%= yield(:nav_buttons) %>
|
29
|
-
</div>
|
30
|
-
</div>
|
31
|
-
<% end %>
|
32
|
-
|
33
|
-
<%= yield(:content) if content_for?(:content) %>
|
34
|
-
|
35
23
|
</div>
|
36
24
|
</div>
|
37
25
|
</div>
|
@@ -1,15 +1,8 @@
|
|
1
|
-
<% content_for(:last_crumbs) do %>
|
2
|
-
<%= link_to @item_name + ' list', admin_list_uri(@model_info) %>
|
3
|
-
<span class="separator">-></span>
|
4
|
-
<%= yield(:form_last_crumbs) if content_for?(:form_last_crumbs) %>
|
5
|
-
<% end %>
|
6
|
-
|
7
1
|
<% content_for(:content) do %>
|
8
2
|
<div class="row form-wrapper">
|
9
|
-
<div class="col-md-9 with-sidebar"
|
10
|
-
|
11
|
-
|
12
|
-
</div
|
13
|
-
|
14
|
-
|
15
|
-
<%= render :template => 'rademade_admin/_layouts/inner' %>
|
3
|
+
<div class="col-md-9 with-sidebar"><%
|
4
|
+
concat render @form_template_path
|
5
|
+
%></div>
|
6
|
+
</div><%
|
7
|
+
end
|
8
|
+
concat render :template => @template_service.inner_layout %>
|
@@ -1,59 +1,35 @@
|
|
1
|
-
<% content_for :content do
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
<span><%= field_to_label(name) + @sortable_service.sorting_sign(name) %></span>
|
15
|
-
</th>
|
16
|
-
<% end %>
|
17
|
-
|
18
|
-
<th class="col-md-3 align-right">
|
19
|
-
<span class="line"></span>
|
20
|
-
<span>Management</span>
|
21
|
-
</th>
|
22
|
-
</tr>
|
23
|
-
</thead>
|
24
|
-
|
25
|
-
<% has_position = @sortable_service.has_position? %>
|
26
|
-
<tbody class="table-sortable" data-position='<%= has_position %>'>
|
27
|
-
<% @items.each_with_index do |item, index| %>
|
28
|
-
<tr<%
|
1
|
+
<% content_for :content do %><%
|
2
|
+
concat render @template_service.on_page_select_block
|
3
|
+
if @sortable_service.can_reset?
|
4
|
+
%><a href="<%= request.path %>"><%= t('rademade_admin.reset_sort') %></a><%
|
5
|
+
end
|
6
|
+
%><table class="table-box"><%
|
7
|
+
concat render @template_service.table_head_block, {
|
8
|
+
:list_fields => @list_fields
|
9
|
+
}
|
10
|
+
has_position = @sortable_service.has_position?
|
11
|
+
%><tbody class="table-content" data-sortable="<%= has_position %>"><%
|
12
|
+
@items.each do |item|
|
13
|
+
%><tr id="item_<%= item.id %>" class="table-line" data-id="<%= item.id %>"<%
|
29
14
|
if has_position
|
30
|
-
%>
|
15
|
+
%> data-position="<%= item.position %>"<%
|
31
16
|
end
|
32
|
-
|
33
|
-
|
34
|
-
%><td><%
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
end
|
41
|
-
%></td>
|
42
|
-
<% end %>
|
43
|
-
<td>
|
44
|
-
<ul class="actions">
|
45
|
-
<li><%= link_to 'Edit', admin_edit_uri(item) %></li>
|
46
|
-
<li><%= button_to 'Destroy', admin_delete_uri(item), {
|
17
|
+
%>><%
|
18
|
+
@list_fields.each do |field|
|
19
|
+
%><td class="table-item"><%= display_item_value(item, field) %></td><%
|
20
|
+
end
|
21
|
+
%><td class="table-item">
|
22
|
+
<span class="table-actions"><%
|
23
|
+
concat link_to t('rademade_admin.edit'), admin_edit_uri(item), :class => 'glyphicon glyphicon-pencil fl-l'
|
24
|
+
concat button_to t('rademade_admin.destroy'), admin_delete_uri(item), {
|
47
25
|
:method => :delete,
|
48
|
-
:form => {:class => 'delete-item-form'}
|
49
|
-
}
|
50
|
-
|
26
|
+
:form => { :class => 'delete-item-form' }
|
27
|
+
}
|
28
|
+
%></span>
|
51
29
|
</td>
|
52
|
-
</tr
|
53
|
-
|
54
|
-
|
55
|
-
</table
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
<% end %>
|
30
|
+
</tr><%
|
31
|
+
end
|
32
|
+
%></tbody>
|
33
|
+
</table><%
|
34
|
+
concat render @template_service.pagination_block
|
35
|
+
end %>
|
@@ -1,54 +1,26 @@
|
|
1
|
-
<% content_for :content do
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
end
|
28
|
-
%> data-id='<%= item.id %>'>
|
29
|
-
<% @list_fields.each do |name|
|
30
|
-
%><td><%
|
31
|
-
td_data = item.send(name)
|
32
|
-
if td_data.is_a? Mongoid::Document #rm_todo remove hard code, extract helper (data adapter)
|
33
|
-
concat link_to td_data.to_s, admin_edit_uri(td_data)
|
34
|
-
else
|
35
|
-
concat td_data
|
36
|
-
end
|
37
|
-
%></td>
|
38
|
-
<% end %>
|
39
|
-
<td>
|
40
|
-
<ul class="actions">
|
41
|
-
<li><%= button_to 'Unlink', admin_unlink_uri(item, params[:parent], params[:parent_id]), {
|
42
|
-
:method => :patch,
|
43
|
-
:form => {:class => 'delete-item-form'}
|
44
|
-
} %></li>
|
45
|
-
</ul>
|
46
|
-
</td>
|
47
|
-
</tr>
|
48
|
-
<% end %>
|
49
|
-
</tbody>
|
50
|
-
</table>
|
51
|
-
|
52
|
-
<%= render 'rademade_admin/_blocks/pagination' %>
|
53
|
-
|
54
|
-
<% end %>
|
1
|
+
<% content_for :content do %><%
|
2
|
+
concat render @template_service.on_page_select_block
|
3
|
+
%><table class="table-box"><%
|
4
|
+
concat render @template_service.table_head_block, {
|
5
|
+
:list_fields => @list_fields
|
6
|
+
}
|
7
|
+
%><tbody class="table-content" data-sortable="false"><%
|
8
|
+
@items.each do |item|
|
9
|
+
%><tr id="item_<%= item.id %>" class="table-line" data-id="<%= item.id %>"><%
|
10
|
+
@list_fields.each do |field|
|
11
|
+
%><td class="table-item"><%= display_item_value(item, field) %></td><%
|
12
|
+
end
|
13
|
+
%><td class="table-item">
|
14
|
+
<span class="table-actions"><%
|
15
|
+
concat button_to t('rademade_admin.unlink'), admin_unlink_uri(item, params[:parent], params[:parent_id]), {
|
16
|
+
:method => :patch,
|
17
|
+
:form => { :class => 'delete-item-form' }
|
18
|
+
}
|
19
|
+
%></span>
|
20
|
+
</td>
|
21
|
+
</tr><%
|
22
|
+
end
|
23
|
+
%></tbody>
|
24
|
+
</table><%
|
25
|
+
concat render @template_service.pagination_block
|
26
|
+
end %>
|