typus 3.1.0.rc14 → 3.1.0.rc15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitmodules +3 -0
- data/README.md +10 -14
- data/Rakefile +7 -5
- data/app/assets/javascripts/typus.js +1 -0
- data/app/assets/javascripts/typus/jquery.application.js +0 -2
- data/app/assets/stylesheets/typus.css +13 -1
- data/app/assets/stylesheets/typus/account.css +53 -0
- data/app/assets/stylesheets/typus/actions.css +11 -0
- data/app/assets/stylesheets/typus/content.css +92 -0
- data/app/assets/stylesheets/typus/defaults.css +31 -0
- data/app/assets/stylesheets/typus/errors.css +33 -0
- data/app/assets/stylesheets/typus/footer.css +8 -0
- data/app/assets/stylesheets/typus/forms.css +52 -0
- data/app/assets/stylesheets/typus/hacks.css +20 -0
- data/app/assets/stylesheets/typus/header.css +55 -0
- data/app/assets/stylesheets/typus/layout.css +4 -0
- data/app/assets/stylesheets/typus/pagination.css +34 -8
- data/app/assets/stylesheets/typus/sidebar.css +23 -0
- data/app/assets/stylesheets/typus/tables.css +47 -0
- data/app/helpers/admin/base_helper.rb +1 -1
- data/app/helpers/admin/resources/data_types/belongs_to_helper.rb +1 -0
- data/app/helpers/admin/resources/data_types/tree_helper.rb +1 -0
- data/app/helpers/admin/resources/display_helper.rb +1 -1
- data/app/helpers/admin/resources/form_helper.rb +1 -0
- data/app/helpers/admin/resources_helper.rb +3 -5
- data/app/views/admin/account/forgot_password.html.erb +7 -1
- data/app/views/admin/base/user_guide.html.erb +61 -57
- data/app/views/admin/dashboard/show.html.erb +6 -16
- data/app/views/admin/dashboard/widgets/_applications.html.erb +31 -0
- data/app/views/admin/dashboard/widgets/_models.html.erb +23 -0
- data/app/views/admin/dashboard/widgets/_models_extended.html.erb +25 -0
- data/app/views/admin/dashboard/widgets/_resources.html.erb +23 -0
- data/app/views/admin/resources/_actions.html.erb +23 -0
- data/app/views/admin/resources/edit.html.erb +26 -20
- data/app/views/admin/resources/edit/_actions.html.erb +7 -0
- data/app/views/admin/resources/edit/_rencently_edited.html.erb +8 -0
- data/app/views/admin/resources/index.html.erb +42 -32
- data/app/views/admin/resources/new.html.erb +16 -8
- data/app/views/admin/resources/show.html.erb +22 -14
- data/app/views/admin/session/new.html.erb +9 -1
- data/app/views/admin/templates/_belongs_to.html.erb +1 -1
- data/app/views/admin/templates/_belongs_to_with_autocomplete.html.erb +1 -1
- data/app/views/admin/templates/_boolean.html.erb +1 -1
- data/app/views/admin/templates/_date.html.erb +1 -1
- data/app/views/admin/templates/_datetime.html.erb +1 -1
- data/app/views/admin/templates/_dragonfly.html.erb +1 -1
- data/app/views/admin/templates/_paperclip.html.erb +1 -1
- data/app/views/admin/templates/_password.html.erb +1 -1
- data/app/views/admin/templates/_selector.html.erb +1 -1
- data/app/views/admin/templates/_string.html.erb +1 -1
- data/app/views/admin/templates/_string_with_preview.html.erb +1 -1
- data/app/views/admin/templates/_text.html.erb +1 -1
- data/app/views/admin/templates/_text_with_ckeditor.html.erb +16 -2
- data/app/views/admin/templates/_text_with_ckeditor_and_assets.html.erb +16 -2
- data/app/views/admin/templates/_time.html.erb +1 -1
- data/app/views/admin/templates/_tree.html.erb +1 -1
- data/app/views/helpers/admin/resources/_sidebar.html.erb +36 -12
- data/app/views/helpers/admin/resources/_table.html.erb +5 -3
- data/app/views/layouts/admin/base.html.erb +16 -29
- data/app/views/layouts/admin/headless.html.erb +1 -1
- data/app/views/layouts/admin/session.html.erb +6 -0
- data/lib/support/fake_user.rb +2 -8
- data/lib/typus.rb +6 -2
- data/lib/typus/authentication/devise.rb +19 -0
- data/lib/typus/controller/headless.rb +1 -1
- data/lib/typus/orm/active_record/admin_user_v1.rb +15 -1
- data/lib/typus/orm/active_record/admin_user_v2.rb +16 -2
- data/lib/typus/orm/active_record/user/class_methods.rb +2 -3
- data/lib/typus/orm/active_record/user/instance_methods.rb +5 -2
- data/lib/typus/orm/active_record/user/instance_methods_more.rb +19 -0
- data/lib/typus/version.rb +1 -1
- data/vendor/assets/adapt/css/1200.css +357 -0
- data/vendor/assets/adapt/css/1200.min.css +1 -0
- data/vendor/assets/adapt/css/1560.css +357 -0
- data/vendor/assets/adapt/css/1560.min.css +1 -0
- data/vendor/assets/adapt/css/720.css +357 -0
- data/vendor/assets/adapt/css/720.min.css +1 -0
- data/vendor/assets/adapt/css/960.css +357 -0
- data/vendor/assets/adapt/css/960.min.css +1 -0
- data/vendor/assets/adapt/css/fluid.css +345 -0
- data/vendor/assets/adapt/css/fluid.min.css +1 -0
- data/vendor/assets/adapt/css/master.css +120 -0
- data/vendor/assets/adapt/css/mobile.css +20 -0
- data/vendor/assets/adapt/css/mobile.min.css +1 -0
- data/vendor/assets/adapt/css/reset.css +202 -0
- data/vendor/assets/adapt/css/text.css +81 -0
- data/vendor/assets/adapt/images/h1.png +0 -0
- data/vendor/assets/adapt/js/adapt.js +135 -0
- data/vendor/assets/adapt/js/adapt.min.js +1 -0
- data/vendor/assets/formalize/.gitignore +1 -0
- data/vendor/assets/formalize/css/_formalize.sass +332 -0
- data/vendor/assets/formalize/css/demo.css +47 -0
- data/vendor/assets/formalize/css/formalize.css +395 -0
- data/vendor/assets/formalize/css/reset.css +202 -0
- data/vendor/assets/formalize/css/text.css +81 -0
- data/vendor/assets/formalize/images/button.png +0 -0
- data/vendor/assets/formalize/images/select_arrow.gif +0 -0
- data/vendor/assets/formalize/js/dojo.formalize.js +166 -0
- data/vendor/assets/formalize/js/dojo.formalize.min.js +1 -0
- data/vendor/assets/formalize/js/extjs.formalize.js +163 -0
- data/vendor/assets/formalize/js/extjs.formalize.min.js +1 -0
- data/vendor/assets/formalize/js/jquery.formalize.js +150 -0
- data/vendor/assets/formalize/js/jquery.formalize.min.js +1 -0
- data/vendor/assets/formalize/js/mootools.formalize.js +155 -0
- data/vendor/assets/formalize/js/mootools.formalize.min.js +1 -0
- data/vendor/assets/formalize/js/prototype.formalize.js +163 -0
- data/vendor/assets/formalize/js/prototype.formalize.min.js +1 -0
- data/vendor/assets/formalize/js/yui.formalize.js +152 -0
- data/vendor/assets/formalize/js/yui.formalize.min.js +1 -0
- metadata +79 -47
- data/app/assets/stylesheets/typus/screen.css +0 -340
- data/app/helpers/admin/dashboard_helper.rb +0 -8
- data/app/views/admin/dashboard/_applications.html.erb +0 -21
- data/config/locales/typus.ca.models.yml +0 -17
- data/config/locales/typus.ca.yml +0 -80
- data/config/locales/typus.de.models.yml +0 -17
- data/config/locales/typus.de.yml +0 -79
- data/config/locales/typus.el.models.yml +0 -17
- data/config/locales/typus.el.yml +0 -81
- data/config/locales/typus.es.models.yml +0 -18
- data/config/locales/typus.es.yml +0 -81
- data/config/locales/typus.fr.models.yml +0 -18
- data/config/locales/typus.fr.yml +0 -85
- data/config/locales/typus.hu.models.yml +0 -17
- data/config/locales/typus.hu.yml +0 -79
- data/config/locales/typus.it.models.yml +0 -18
- data/config/locales/typus.it.yml +0 -88
- data/config/locales/typus.locale.models.yml.template +0 -17
- data/config/locales/typus.locale.yml.template +0 -80
- data/config/locales/typus.pt-BR.models.yml +0 -17
- data/config/locales/typus.pt-BR.yml +0 -79
- data/config/locales/typus.pt-PT.models.yml +0 -17
- data/config/locales/typus.pt-PT.yml +0 -83
- data/config/locales/typus.ru.models.yml +0 -17
- data/config/locales/typus.ru.yml +0 -79
- data/config/locales/typus.zh-CN.models.yml +0 -17
- data/config/locales/typus.zh-CN.yml +0 -78
|
@@ -1,16 +1,42 @@
|
|
|
1
|
-
.pagination {
|
|
1
|
+
.pagination {
|
|
2
|
+
border-top: 1px solid #D3D3D3;
|
|
3
|
+
border-bottom: 1px solid #D3D3D3;
|
|
4
|
+
margin: -1em auto 1em auto;
|
|
5
|
+
padding: 1em 0;
|
|
6
|
+
text-align: center;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.pagination em {
|
|
10
|
+
font-style: normal!important;
|
|
11
|
+
}
|
|
2
12
|
|
|
3
|
-
.pagination em { font-style: normal!important; }
|
|
4
13
|
.pagination em,
|
|
5
|
-
.pagination a {
|
|
14
|
+
.pagination a {
|
|
15
|
+
padding: 3px 5px;
|
|
16
|
+
text-decoration: none;
|
|
17
|
+
}
|
|
18
|
+
|
|
6
19
|
.pagination a:hover,
|
|
7
|
-
.pagination em {
|
|
20
|
+
.pagination em {
|
|
21
|
+
background: #000;
|
|
22
|
+
color: #FFF;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.pagination span.disabled {
|
|
26
|
+
color: #D3D3D3;
|
|
27
|
+
margin: 2px;
|
|
28
|
+
padding: 2px 3px; }
|
|
8
29
|
|
|
9
|
-
.pagination
|
|
30
|
+
.pagination .prev {
|
|
31
|
+
float: left;
|
|
32
|
+
}
|
|
10
33
|
|
|
11
|
-
.pagination .
|
|
12
|
-
|
|
34
|
+
.pagination .next {
|
|
35
|
+
float: right;
|
|
36
|
+
}
|
|
13
37
|
|
|
14
38
|
.pagination .first,
|
|
15
39
|
.pagination .last,
|
|
16
|
-
.pagination .current {
|
|
40
|
+
.pagination .current {
|
|
41
|
+
display: none;
|
|
42
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
#sidebar ul li.header {
|
|
2
|
+
-moz-border-radius: 4px;
|
|
3
|
+
-webkit-border-radius: 4px;
|
|
4
|
+
background: #242527;
|
|
5
|
+
color: #FFF;
|
|
6
|
+
font-size: 1.20em;
|
|
7
|
+
font-weight: bold;
|
|
8
|
+
padding: 0.25em 0.5em;
|
|
9
|
+
margin: 0.5em 0;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
#sidebar ul {
|
|
13
|
+
margin: 0;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
#sidebar ul ul li {
|
|
17
|
+
list-style: none;
|
|
18
|
+
padding-left: 0.5em;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
#sidebar a {
|
|
22
|
+
text-decoration: none;
|
|
23
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
table {
|
|
2
|
+
margin-bottom: 2em!important;
|
|
3
|
+
width: 100%;
|
|
4
|
+
text-align: left;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
table a {
|
|
8
|
+
text-decoration: none;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
table th {
|
|
12
|
+
background: #242527;
|
|
13
|
+
color: #FFF;
|
|
14
|
+
padding: 6px;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
table th a {
|
|
18
|
+
color: #FFF!important;
|
|
19
|
+
text-decoration: none;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
table th a:hover {
|
|
23
|
+
text-decoration: underline;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
table td.right {
|
|
27
|
+
text-align: right;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
table tr.even {
|
|
31
|
+
background: #FFF!important;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
table tr.even:hover,
|
|
35
|
+
table tr.odd:hover {
|
|
36
|
+
background: #E4E4E4!important;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
table tr.odd {
|
|
40
|
+
background: #F3F3F3;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
table td {
|
|
44
|
+
border: none;
|
|
45
|
+
padding: 5px;
|
|
46
|
+
vertical-align: top;
|
|
47
|
+
}
|
|
@@ -32,7 +32,7 @@ module Admin::BaseHelper
|
|
|
32
32
|
def admin_sign_out_path
|
|
33
33
|
case Typus.authentication
|
|
34
34
|
when :devise
|
|
35
|
-
send("destroy_#{Typus.user_class_name.underscore}
|
|
35
|
+
send("destroy_#{Typus.user_class_name.underscore}_session_path")
|
|
36
36
|
else
|
|
37
37
|
destroy_admin_session_path
|
|
38
38
|
end
|
|
@@ -38,6 +38,7 @@ module Admin::Resources::DataTypes::BelongsToHelper
|
|
|
38
38
|
:association => association,
|
|
39
39
|
:resource => @resource,
|
|
40
40
|
:attribute => attribute,
|
|
41
|
+
:attribute_id => "#{@resource.table_name}_#{attribute}",
|
|
41
42
|
:form => form,
|
|
42
43
|
:related_fk => related_fk,
|
|
43
44
|
:related => related,
|
|
@@ -6,6 +6,7 @@ module Admin::Resources::DataTypes::TreeHelper
|
|
|
6
6
|
|
|
7
7
|
def typus_tree_field(attribute, form)
|
|
8
8
|
locals = { :attribute => attribute,
|
|
9
|
+
:attribute_id => "#{@resource.table_name}_#{attribute}",
|
|
9
10
|
:form => form,
|
|
10
11
|
:label_text => @resource.human_attribute_name(attribute),
|
|
11
12
|
:values => expand_tree_into_select_field(@resource.roots, "parent_id") }
|
|
@@ -2,7 +2,7 @@ module Admin::Resources::DisplayHelper
|
|
|
2
2
|
|
|
3
3
|
def build_display(item, fields)
|
|
4
4
|
fields.map do |attribute, type|
|
|
5
|
-
value = if (type == :boolean) || (data = item.send(attribute))
|
|
5
|
+
value = if (type == :boolean) || (data = item.send(attribute)).present?
|
|
6
6
|
send("display_#{type}", item, attribute)
|
|
7
7
|
else
|
|
8
8
|
"—".html_safe
|
|
@@ -17,7 +17,9 @@ module Admin::ResourcesHelper
|
|
|
17
17
|
|
|
18
18
|
admin_user.application(app_name).each do |resource|
|
|
19
19
|
klass = resource.constantize
|
|
20
|
-
|
|
20
|
+
if (new_link = sidebar_add_new(klass))
|
|
21
|
+
resources[resource] = [new_link]
|
|
22
|
+
end
|
|
21
23
|
end
|
|
22
24
|
|
|
23
25
|
render "helpers/admin/resources/sidebar", :resources => resources
|
|
@@ -29,10 +31,6 @@ module Admin::ResourcesHelper
|
|
|
29
31
|
end
|
|
30
32
|
end
|
|
31
33
|
|
|
32
|
-
def sidebar_all_resource(klass)
|
|
33
|
-
{ :message => Typus::I18n.t("All #{klass.model_name.human.pluralize}"), :url => { :action => "index" } }
|
|
34
|
-
end
|
|
35
|
-
|
|
36
34
|
# TODO: This method should be moved to `lib/typus/controller/actions.rb`
|
|
37
35
|
def resource_actions
|
|
38
36
|
@resource_actions ||= []
|
|
@@ -13,9 +13,15 @@
|
|
|
13
13
|
</li>
|
|
14
14
|
|
|
15
15
|
<li>
|
|
16
|
-
<%= submit_tag Typus::I18n.t("Submit"), :class => "button", :disable_with => Typus::I18n.t("Sending data ...") %>
|
|
16
|
+
<%= submit_tag Typus::I18n.t("Submit"), :class => "button", :disable_with => Typus::I18n.t("Sending data ...") %>
|
|
17
17
|
</li>
|
|
18
18
|
|
|
19
19
|
</ul>
|
|
20
20
|
|
|
21
21
|
<% end %>
|
|
22
|
+
|
|
23
|
+
<% content_for :actions do %>
|
|
24
|
+
<ul>
|
|
25
|
+
<li><%= link_to Typus::I18n.t("I remember my password"), new_admin_session_path %></li>
|
|
26
|
+
</ul>
|
|
27
|
+
<% end %>
|
|
@@ -1,83 +1,87 @@
|
|
|
1
|
-
<% content_for :sidebar do %>
|
|
2
|
-
|
|
3
|
-
<h3>User Guide</h3>
|
|
4
|
-
|
|
5
|
-
<ul>
|
|
6
|
-
<li><%= link_to "Introduction", "#introduction" %></li>
|
|
7
|
-
<li><%= link_to "Basics", "#basics" %></li>
|
|
8
|
-
<li><%= link_to "Registered Users", "#registered-users" %></li>
|
|
9
|
-
</ul>
|
|
10
|
-
|
|
11
|
-
<% end %>
|
|
12
|
-
|
|
13
1
|
<%
|
|
14
2
|
rails = "http://rubyonrails.org/"
|
|
15
3
|
typus = "http://core.typuscms.com/"
|
|
16
4
|
%>
|
|
17
5
|
|
|
18
|
-
|
|
6
|
+
<% content_for :main_grid do %>
|
|
7
|
+
<a name="introduction"></a>
|
|
19
8
|
|
|
20
|
-
<h2>Introduction</h2>
|
|
9
|
+
<h2>Introduction</h2>
|
|
21
10
|
|
|
22
|
-
<p>This website is powered by <%= link_to "Ruby on Rails", rails %> and
|
|
23
|
-
<%= link_to "Typus", typus %>.</p>
|
|
11
|
+
<p>This website is powered by <%= link_to "Ruby on Rails", rails %> and
|
|
12
|
+
<%= link_to "Typus", typus %>.</p>
|
|
24
13
|
|
|
25
|
-
<p>With <%= link_to "Typus", typus %>, also known as the application backend
|
|
26
|
-
or admin interface, you'll be able to update your application contents and
|
|
27
|
-
perform the most common operations for the site maintenance.</p>
|
|
14
|
+
<p>With <%= link_to "Typus", typus %>, also known as the application backend
|
|
15
|
+
or admin interface, you'll be able to update your application contents and
|
|
16
|
+
perform the most common operations for the site maintenance.</p>
|
|
28
17
|
|
|
29
|
-
<p>You can get more information at <%= link_to typus, typus %>.</p>
|
|
18
|
+
<p>You can get more information at <%= link_to typus, typus %>.</p>
|
|
30
19
|
|
|
31
|
-
<a name="basics"></a>
|
|
20
|
+
<a name="basics"></a>
|
|
32
21
|
|
|
33
|
-
<h2>Basic Actions</h2>
|
|
22
|
+
<h2>Basic Actions</h2>
|
|
34
23
|
|
|
35
|
-
<h3>Create Entries</h3>
|
|
24
|
+
<h3>Create Entries</h3>
|
|
36
25
|
|
|
37
|
-
<p>To create a new entry:</p>
|
|
26
|
+
<p>To create a new entry:</p>
|
|
38
27
|
|
|
39
|
-
<ul>
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
</ul>
|
|
28
|
+
<ul>
|
|
29
|
+
<li>Click on entries tab.</li>
|
|
30
|
+
<li>Click "Add New" sub tab.</li>
|
|
31
|
+
<li>Start filling in the blanks.</li>
|
|
32
|
+
<li>When you are ready, click "Save Entry".</li>
|
|
33
|
+
</ul>
|
|
45
34
|
|
|
46
|
-
<h3>Editing & Updating Entries</h3>
|
|
35
|
+
<h3>Editing & Updating Entries</h3>
|
|
47
36
|
|
|
48
|
-
<p>To edit entries:</p>
|
|
37
|
+
<p>To edit entries:</p>
|
|
49
38
|
|
|
50
|
-
<ul>
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
</ul>
|
|
39
|
+
<ul>
|
|
40
|
+
<li>Click on entries tab.</li>
|
|
41
|
+
<li>You'll see a list of entries, if you have already create some.</li>
|
|
42
|
+
<li>Click on "Edit".</li>
|
|
43
|
+
<li>Edit the entry.</li>
|
|
44
|
+
<li>When you are ready, click "Update Entry".</li>
|
|
45
|
+
</ul>
|
|
46
|
+
|
|
47
|
+
<h3>Removing Entries</h3>
|
|
48
|
+
|
|
49
|
+
<p>To remove entries:</p>
|
|
50
|
+
|
|
51
|
+
<ul>
|
|
52
|
+
<li>Click on entries tab.</li>
|
|
53
|
+
<li>You'll see a list of entries, if you have already create some.</li>
|
|
54
|
+
<li>Click on "Trash".</li>
|
|
55
|
+
<li>Click "Ok" on the dialog to confirm you want to remove the entry.</li>
|
|
56
|
+
</ul>
|
|
57
57
|
|
|
58
|
-
<
|
|
58
|
+
<p>Removing entries will be only available if you have permissions to do so.</p>
|
|
59
59
|
|
|
60
|
-
<
|
|
60
|
+
<a name="registered-users"></a>
|
|
61
61
|
|
|
62
|
-
<
|
|
63
|
-
<li>Click on entries tab.</li>
|
|
64
|
-
<li>You'll see a list of entries, if you have already create some.</li>
|
|
65
|
-
<li>Click on "Trash".</li>
|
|
66
|
-
<li>Click "Ok" on the dialog to confirm you want to remove the entry.</li>
|
|
67
|
-
</ul>
|
|
62
|
+
<h2>Registered Users</h2>
|
|
68
63
|
|
|
69
|
-
<p>
|
|
64
|
+
<p>Registered users can do a variety of different things on a <strong>Typus</strong>
|
|
65
|
+
driven site. The various elements available to the user are determined by their
|
|
66
|
+
user level.</p>
|
|
70
67
|
|
|
71
|
-
<
|
|
68
|
+
<p>When <code>:session</code> authentication is enabled <strong>Typus</strong>
|
|
69
|
+
will enable a a default role which will allow registered users perform all kind
|
|
70
|
+
of operations on entries: create, read, update and destroy.</p>
|
|
72
71
|
|
|
73
|
-
<
|
|
72
|
+
<p>It's usually recommended having an extra role which some restrictions.</p>
|
|
73
|
+
<% end %>
|
|
74
74
|
|
|
75
|
-
<
|
|
76
|
-
|
|
77
|
-
user level.</p>
|
|
75
|
+
<div class="grid_2">
|
|
76
|
+
<h2>User Guide</h2>
|
|
78
77
|
|
|
79
|
-
<
|
|
80
|
-
|
|
81
|
-
|
|
78
|
+
<ul>
|
|
79
|
+
<li><%= link_to "Introduction", "#introduction" %></li>
|
|
80
|
+
<li><%= link_to "Basics", "#basics" %></li>
|
|
81
|
+
<li><%= link_to "Registered Users", "#registered-users" %></li>
|
|
82
|
+
</ul>
|
|
83
|
+
</div>
|
|
82
84
|
|
|
83
|
-
<
|
|
85
|
+
<div class="grid_8">
|
|
86
|
+
<%= yield :main_grid %>
|
|
87
|
+
</div>
|
|
@@ -3,20 +3,10 @@
|
|
|
3
3
|
title(page_title)
|
|
4
4
|
%>
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
<%= render
|
|
8
|
-
|
|
6
|
+
<div class="grid_2">
|
|
7
|
+
<%= render 'admin/dashboard/sidebar' %>
|
|
8
|
+
</div>
|
|
9
9
|
|
|
10
|
-
<
|
|
11
|
-
<%=
|
|
12
|
-
</
|
|
13
|
-
|
|
14
|
-
<% if admin_user.applications.any? %>
|
|
15
|
-
<%= render 'applications' %>
|
|
16
|
-
<% else %>
|
|
17
|
-
<div class="notice">
|
|
18
|
-
No applications detected.
|
|
19
|
-
</div>
|
|
20
|
-
<% end %>
|
|
21
|
-
|
|
22
|
-
<%= resources(admin_user) %>
|
|
10
|
+
<div class="grid_10">
|
|
11
|
+
<%= render 'admin/dashboard/widgets/applications' %>
|
|
12
|
+
</div>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<!-- Applications list with models. -->
|
|
2
|
+
|
|
3
|
+
<h2><%= Typus::I18n.t("Applications") %></h2>
|
|
4
|
+
|
|
5
|
+
<% if admin_user.applications.any? %>
|
|
6
|
+
<% admin_user.applications.each do |app| %>
|
|
7
|
+
|
|
8
|
+
<table>
|
|
9
|
+
|
|
10
|
+
<thead>
|
|
11
|
+
<tr>
|
|
12
|
+
<th><%= Typus::I18n.t(app) %></th>
|
|
13
|
+
</tr>
|
|
14
|
+
</thead>
|
|
15
|
+
|
|
16
|
+
<% admin_user.application(app).map { |i| i.constantize }.each do |klass| %>
|
|
17
|
+
<tr class="<%= cycle("even", "odd") %>">
|
|
18
|
+
<td>
|
|
19
|
+
<%= link_to klass.model_name.human.pluralize, :controller => "/admin/#{klass.to_resource}" %>
|
|
20
|
+
</td>
|
|
21
|
+
</tr>
|
|
22
|
+
<% end %>
|
|
23
|
+
|
|
24
|
+
</table>
|
|
25
|
+
|
|
26
|
+
<% end %>
|
|
27
|
+
<% else %>
|
|
28
|
+
<div class="notice">
|
|
29
|
+
No applications detected.
|
|
30
|
+
</div>
|
|
31
|
+
<% end %>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<!-- List of all available models -->
|
|
2
|
+
|
|
3
|
+
<h2><%= Typus::I18n.t("Site Administration") %></h2>
|
|
4
|
+
|
|
5
|
+
<table>
|
|
6
|
+
|
|
7
|
+
<thead>
|
|
8
|
+
<tr>
|
|
9
|
+
<th><%= Typus::I18n.t("Model name") %></th>
|
|
10
|
+
<th></th>
|
|
11
|
+
</tr>
|
|
12
|
+
</thead>
|
|
13
|
+
|
|
14
|
+
<% admin_user.models.map { |i| i.constantize }.each do |klass| %>
|
|
15
|
+
<tr class="<%= cycle("even", "odd") %>">
|
|
16
|
+
<td><%= link_to klass.model_name.human.pluralize, :controller => "/admin/#{klass.to_resource}" %></td>
|
|
17
|
+
<td width="80px" align="right">
|
|
18
|
+
<%= link_to Typus::I18n.t("Add New"), :controller => "/admin/#{klass.to_resource}", :action => 'new' %>
|
|
19
|
+
</td>
|
|
20
|
+
</tr>
|
|
21
|
+
<% end %>
|
|
22
|
+
|
|
23
|
+
</table>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<!-- List of all available models -->
|
|
2
|
+
|
|
3
|
+
<h2><%= Typus::I18n.t("Site Administration") %></h2>
|
|
4
|
+
|
|
5
|
+
<table>
|
|
6
|
+
|
|
7
|
+
<thead>
|
|
8
|
+
<tr>
|
|
9
|
+
<th><%= Typus::I18n.t("Model name") %></th>
|
|
10
|
+
<th><%= Typus::I18n.t("Records") %></th>
|
|
11
|
+
<th></th>
|
|
12
|
+
</tr>
|
|
13
|
+
</thead>
|
|
14
|
+
|
|
15
|
+
<% admin_user.models.map { |i| i.constantize }.each do |klass| %>
|
|
16
|
+
<tr class="<%= cycle("even", "odd") %>">
|
|
17
|
+
<td><%= link_to klass.model_name.human.pluralize, :controller => "/admin/#{klass.to_resource}" %></td>
|
|
18
|
+
<td width="30px" align="right"><%= klass.count %></td>
|
|
19
|
+
<td width="80px" align="right">
|
|
20
|
+
<%= link_to Typus::I18n.t("Add New"), :controller => "/admin/#{klass.to_resource}", :action => 'new' %>
|
|
21
|
+
</td>
|
|
22
|
+
</tr>
|
|
23
|
+
<% end %>
|
|
24
|
+
|
|
25
|
+
</table>
|