typus 3.1.0.rc11 → 3.1.0.rc12
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +4 -16
- data/.gitmodules +3 -6
- data/README.md +50 -16
- data/Rakefile +19 -26
- data/app/helpers/admin/resources/data_types/belongs_to_helper.rb +15 -18
- data/app/helpers/admin/resources/data_types/position_helper.rb +9 -11
- data/app/helpers/admin/resources/form_helper.rb +13 -13
- data/app/helpers/admin/resources/relationships_helper.rb +4 -1
- data/app/helpers/admin/resources/table_helper.rb +11 -14
- data/app/helpers/admin/resources_helper.rb +12 -3
- data/app/themes/default/assets/javascripts/typus/jquery.application.js +0 -6
- data/app/themes/default/assets/stylesheets/typus/pagination.css +1 -2
- data/app/themes/default/views/admin/base/user_guide.html.erb +25 -27
- data/app/themes/default/views/admin/dashboard/_applications.html.erb +2 -10
- data/app/themes/default/views/admin/dashboard/_sidebar.html.erb +9 -2
- data/app/themes/default/views/admin/dashboard/styles.html.erb +10 -15
- data/app/themes/default/views/admin/resources/_form.html.erb +4 -2
- data/app/themes/default/views/admin/resources/_form_javascripts.html.erb +0 -0
- data/app/themes/default/views/admin/templates/README.md +5 -0
- data/app/themes/default/views/admin/templates/_dragonfly.html.erb +1 -0
- data/app/themes/default/views/admin/templates/_has_one.html.erb +1 -1
- data/app/themes/default/views/admin/templates/_position.html.erb +5 -0
- data/app/themes/default/views/admin/templates/_profile_sidebar.html.erb +2 -1
- data/app/themes/default/views/admin/templates/_selector.html.erb +4 -1
- data/app/themes/default/views/admin/templates/_text_with_ckeditor.html.erb +0 -4
- data/app/themes/default/views/helpers/admin/resources/_filters.html.erb +1 -3
- data/app/themes/default/views/helpers/admin/resources/_sidebar.html.erb +6 -9
- data/app/themes/default/views/helpers/admin/resources/_table.html.erb +11 -13
- data/lib/generators/templates/config/initializers/typus_resources.rb +1 -1
- data/lib/generators/templates/config/typus/README +1 -1
- data/lib/typus.rb +15 -26
- data/lib/typus/authentication/base.rb +4 -0
- data/lib/typus/authentication/http_basic.rb +2 -2
- data/lib/typus/authentication/session.rb +3 -5
- data/lib/typus/configuration.rb +14 -12
- data/lib/typus/controller/filters.rb +22 -0
- data/lib/typus/i18n.rb +17 -0
- data/lib/typus/orm/active_record/user/class_methods.rb +1 -1
- data/lib/typus/orm/base.rb +2 -2
- data/lib/typus/resources.rb +1 -1
- data/lib/typus/version.rb +1 -1
- metadata +21 -26
- data/.yardopts +0 -6
- data/Gemfile +0 -60
- data/doc/yard/handlers/configurable_attr_handler.rb +0 -38
- data/doc/yard/setup.rb +0 -9
- data/doc/yard/templates/default/fulldoc/html/css/common.css +0 -109
- data/doc/yard/templates/default/layout/html/layout.erb +0 -126
- data/doc/yard/templates/default/module/html/configuration_summary.erb +0 -31
- data/doc/yard/templates/default/module/setup.rb +0 -17
@@ -1,126 +0,0 @@
|
|
1
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
-
|
5
|
-
<head>
|
6
|
-
<%= erb(:headers) %>
|
7
|
-
<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Inconsolata">
|
8
|
-
<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=PT+Sans">
|
9
|
-
<script type="text/javascript" charset="utf-8">
|
10
|
-
(function($){
|
11
|
-
// YARD automatically creates a table of contents
|
12
|
-
// Let's place it inside .col1, instead of #content
|
13
|
-
$(document).ready(function(){
|
14
|
-
$('#toc').prependTo($('.col1'));
|
15
|
-
<% if options[:file] == 'extra_docs/Index.md' %>
|
16
|
-
$('#toc').hide();
|
17
|
-
<% end %>
|
18
|
-
});
|
19
|
-
})(jQuery);
|
20
|
-
</script>
|
21
|
-
</head>
|
22
|
-
|
23
|
-
<body>
|
24
|
-
|
25
|
-
<script type="text/javascript" charset="utf-8">
|
26
|
-
if (window.top.frames.main) document.body.className = 'frames';
|
27
|
-
</script>
|
28
|
-
|
29
|
-
<div id="header" class="clearfix">
|
30
|
-
<%#= erb(:breadcrumb) %>
|
31
|
-
<div id="logo">Typus: Ruby on Rails Admin Panel (Engine) to allow trusted users edit structured content</div>
|
32
|
-
<%= erb(:search) %>
|
33
|
-
</div>
|
34
|
-
|
35
|
-
<div>
|
36
|
-
<iframe id="search_frame"></iframe>
|
37
|
-
</div>
|
38
|
-
|
39
|
-
<div id="content" class="clearfix">
|
40
|
-
<div class="col1">
|
41
|
-
<%= yieldall %>
|
42
|
-
</div>
|
43
|
-
<div class="col2">
|
44
|
-
|
45
|
-
<h2>Overview</h2>
|
46
|
-
|
47
|
-
<%
|
48
|
-
links = [['home', 'Home'],
|
49
|
-
['overview-supported-features', 'Supported Features'],
|
50
|
-
['overview-architectural-goals', 'Architectural Goal'],
|
51
|
-
['changelog', 'Changelog']]
|
52
|
-
%>
|
53
|
-
|
54
|
-
<ul class="main_files clearfix">
|
55
|
-
<% links.each do |file, text| %>
|
56
|
-
<li><%= link_file(file, text) %></li>
|
57
|
-
<% end %>
|
58
|
-
</ul>
|
59
|
-
|
60
|
-
<h2>Installation</h2>
|
61
|
-
|
62
|
-
<%
|
63
|
-
links = [['requirements', 'Requirements'],
|
64
|
-
['installation-instructions', 'Instructions'],
|
65
|
-
['installation-generators-and-rake-tasks', 'Generators and Rake Tasks'],
|
66
|
-
['configuration-initializers', 'Initializers'],
|
67
|
-
['configuration-resources', 'Resources'],
|
68
|
-
['configuration-resource', 'Resource'],
|
69
|
-
['configuration-roles', 'Roles'],
|
70
|
-
['customization-user-interface', 'User Interface'],
|
71
|
-
['customization-attribute-templates', 'Attribute Templates'],
|
72
|
-
['customization-selectors', 'Selectors']]
|
73
|
-
%>
|
74
|
-
|
75
|
-
<ul class="main_files clearfix">
|
76
|
-
<% links.each do |file, text| %>
|
77
|
-
<li><%= link_file(file, text) %></li>
|
78
|
-
<% end %>
|
79
|
-
</ul>
|
80
|
-
|
81
|
-
<h2>Recipes</h2>
|
82
|
-
|
83
|
-
<%
|
84
|
-
links = [['recipes-rich-text-editor', 'Adding a Rich Text Editor'],
|
85
|
-
['recipes-custom-actions', 'Custom Actions'],
|
86
|
-
['recipes-single-table-inheritance', 'Single Table Inheritance'],
|
87
|
-
['recipes-configuration-files', 'Configuration Files'],
|
88
|
-
['recipes-testing-the-plugin', 'Testing the Plugin'],
|
89
|
-
['recipes-devise-authentication', 'Devise Authentication']]
|
90
|
-
%>
|
91
|
-
|
92
|
-
<ul class="main_files clearfix">
|
93
|
-
<% links.each do |file, text| %>
|
94
|
-
<li><%= link_file(file, text) %></li>
|
95
|
-
<% end %>
|
96
|
-
</ul>
|
97
|
-
|
98
|
-
<h2>Additional Resources</h2>
|
99
|
-
|
100
|
-
<%
|
101
|
-
links = [['http://core.typuscms.com/templates/desmond.txt', 'Application Template'],
|
102
|
-
['http://demo.typuscms.com/', 'Application Demo'],
|
103
|
-
['http://rubygems.org/gems/typus', 'Gems'],
|
104
|
-
['http://github.com/typus/typus', 'Plugin Source Code'],
|
105
|
-
['http://groups.google.com/group/typus', 'Mailing List'],
|
106
|
-
['https://github.com/typus/typus/issues', 'Bug Reports'],
|
107
|
-
['https://github.com/typus/typus/contributors', 'Contributors List'],
|
108
|
-
['http://pledgie.com/campaigns/11233', 'Donate'],
|
109
|
-
['http://ruby-toolbox.com/categories/rails_admin_interfaces.html', 'Ruby Toolbox'],
|
110
|
-
['http://www.joshcrews.com/2010/03/using-heroku-to-host-your-rails-cms/', 'Using Heroku to host your Rails CMS'],
|
111
|
-
['http://github.com/typus/typus/wiki/ci-server', 'Setting up the CI server']]
|
112
|
-
%>
|
113
|
-
|
114
|
-
<ul class="main_files clearfix">
|
115
|
-
<% links.each do |url, title| %>
|
116
|
-
<li><%= link_url(url, title) %></li>
|
117
|
-
<% end %>
|
118
|
-
</ul>
|
119
|
-
|
120
|
-
</div>
|
121
|
-
</div>
|
122
|
-
|
123
|
-
<%= erb(:footer) %>
|
124
|
-
|
125
|
-
</body>
|
126
|
-
</html>
|
@@ -1,31 +0,0 @@
|
|
1
|
-
<% configurable_attributes = object[:configurable_attributes] || [] %>
|
2
|
-
<% if configurable_attributes.any? %>
|
3
|
-
<h2>Configuration Summary</h2>
|
4
|
-
<h3>Configurable attributes</h3>
|
5
|
-
Configurable attributes for an object in general <code>object</code> can be configured either by using something like
|
6
|
-
<pre class="code">
|
7
|
-
object.configure <%= hl :do %> |c|
|
8
|
-
c.some_configurable_attribute = <%= hl 'some value' %>
|
9
|
-
c.some_other_configurable_attribute = <%= hl 42 %>
|
10
|
-
...
|
11
|
-
<%= hl :end %>
|
12
|
-
</pre>
|
13
|
-
or
|
14
|
-
<pre class="code">
|
15
|
-
object.some_configurable_attribute = <%= hl 'some value' %>
|
16
|
-
</pre>
|
17
|
-
<h4>Configurable attributes for instances of <%= object %></h4>
|
18
|
-
<ul>
|
19
|
-
<% configurable_attributes.each do |attribute| %>
|
20
|
-
<li>
|
21
|
-
<code><%= attribute[:attribute] %></code>
|
22
|
-
<% if attribute[:lazy_default_value] %>
|
23
|
-
- default <code><%= hl attribute[:lazy_default_value] %></code> (evaluated lazily)
|
24
|
-
<% else %>
|
25
|
-
- default <code><%= hl attribute[:default_value] %></code>
|
26
|
-
<% end %>
|
27
|
-
<%= '- ' + attribute[:comments] if attribute[:comments] %>
|
28
|
-
</li>
|
29
|
-
<% end %>
|
30
|
-
</ul>
|
31
|
-
<% end %>
|
@@ -1,17 +0,0 @@
|
|
1
|
-
def init
|
2
|
-
super
|
3
|
-
sections.place(:configuration_summary).before(:method_summary)
|
4
|
-
end
|
5
|
-
|
6
|
-
# Highlight stuff
|
7
|
-
def hl(code)
|
8
|
-
case code
|
9
|
-
when :do, :end then %(<span class="kw">#{code}</span>)
|
10
|
-
when Symbol then %(<span class="symbol">#{code.inspect}</span>)
|
11
|
-
when Integer then %(<span class="integer val">#{code}</span>)
|
12
|
-
when String then %(<span class="string val">#{code.inspect}</span>)
|
13
|
-
when true, false then %(<span class="kw">#{code.inspect}</span>)
|
14
|
-
when nil then %(<span class="nil kw">#{code.inspect}</span>)
|
15
|
-
else code
|
16
|
-
end
|
17
|
-
end
|