bootstrap-on 0.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/Gemfile +13 -0
- data/Gemfile.lock +90 -0
- data/LICENSE.txt +20 -0
- data/README.md +98 -0
- data/Rakefile +38 -0
- data/VERSION +1 -0
- data/bootstrap-on.gemspec +127 -0
- data/lib/bootstrap-on.rb +6 -0
- data/lib/bootstrap-on/bs_admin.rb +138 -0
- data/lib/bootstrap-on/bs_admin_page.rb +55 -0
- data/lib/bootstrap-on/templates/.DS_Store +0 -0
- data/lib/bootstrap-on/templates/account/.DS_Store +0 -0
- data/lib/bootstrap-on/templates/account/activerecord.rb.tt +38 -0
- data/lib/bootstrap-on/templates/account/couchrest.rb.tt +66 -0
- data/lib/bootstrap-on/templates/account/datamapper.rb.tt +55 -0
- data/lib/bootstrap-on/templates/account/mini_record.rb.tt +41 -0
- data/lib/bootstrap-on/templates/account/mongoid.rb.tt +53 -0
- data/lib/bootstrap-on/templates/account/mongomapper.rb.tt +46 -0
- data/lib/bootstrap-on/templates/account/seeds.rb.tt +28 -0
- data/lib/bootstrap-on/templates/account/sequel.rb.tt +52 -0
- data/lib/bootstrap-on/templates/app.rb.tt +36 -0
- data/lib/bootstrap-on/templates/app/controllers/base.rb +6 -0
- data/lib/bootstrap-on/templates/app/controllers/sessions.rb.tt +26 -0
- data/lib/bootstrap-on/templates/app/helpers/application_helper.rb +23 -0
- data/lib/bootstrap-on/templates/assets/.DS_Store +0 -0
- data/lib/bootstrap-on/templates/assets/css/bootstrap-responsive.css +815 -0
- data/lib/bootstrap-on/templates/assets/css/bootstrap-responsive.min.css +9 -0
- data/lib/bootstrap-on/templates/assets/css/bootstrap.css +4983 -0
- data/lib/bootstrap-on/templates/assets/css/bootstrap.min.css +9 -0
- data/lib/bootstrap-on/templates/assets/ico/apple-touch-icon-114-precomposed.png +0 -0
- data/lib/bootstrap-on/templates/assets/ico/apple-touch-icon-144-precomposed.png +0 -0
- data/lib/bootstrap-on/templates/assets/ico/apple-touch-icon-57-precomposed.png +0 -0
- data/lib/bootstrap-on/templates/assets/ico/apple-touch-icon-72-precomposed.png +0 -0
- data/lib/bootstrap-on/templates/assets/ico/favicon.ico +0 -0
- data/lib/bootstrap-on/templates/assets/img/glyphicons-halflings-white.png +0 -0
- data/lib/bootstrap-on/templates/assets/img/glyphicons-halflings.png +0 -0
- data/lib/bootstrap-on/templates/assets/js/.DS_Store +0 -0
- data/lib/bootstrap-on/templates/assets/js/bootstrap.js +1825 -0
- data/lib/bootstrap-on/templates/assets/js/bootstrap.min.js +6 -0
- data/lib/bootstrap-on/templates/assets/js/jquery-min.js +4 -0
- data/lib/bootstrap-on/templates/assets/js/jquery-ujs.js +92 -0
- data/lib/bootstrap-on/templates/assets/js/jquery.js +9404 -0
- data/lib/bootstrap-on/templates/erb/app/base/index.erb.tt +16 -0
- data/lib/bootstrap-on/templates/erb/app/layouts/application.erb.tt +79 -0
- data/lib/bootstrap-on/templates/erb/app/sessions/new.erb.tt +98 -0
- data/lib/bootstrap-on/templates/erb/page/_form.erb.tt +16 -0
- data/lib/bootstrap-on/templates/erb/page/edit.erb.tt +26 -0
- data/lib/bootstrap-on/templates/erb/page/index.erb.tt +41 -0
- data/lib/bootstrap-on/templates/erb/page/new.erb.tt +23 -0
- data/lib/bootstrap-on/templates/haml/app/base/index.haml.tt +23 -0
- data/lib/bootstrap-on/templates/haml/app/layouts/application.haml.tt +31 -0
- data/lib/bootstrap-on/templates/haml/app/sessions/new.haml.tt +30 -0
- data/lib/bootstrap-on/templates/haml/page/_form.haml.tt +12 -0
- data/lib/bootstrap-on/templates/haml/page/edit.haml.tt +15 -0
- data/lib/bootstrap-on/templates/haml/page/index.haml.tt +29 -0
- data/lib/bootstrap-on/templates/haml/page/new.haml.tt +14 -0
- data/lib/bootstrap-on/templates/page/controller.rb.tt +47 -0
- data/lib/bootstrap-on/templates/slim/app/base/index.slim.tt +23 -0
- data/lib/bootstrap-on/templates/slim/app/layouts/application.slim.tt +31 -0
- data/lib/bootstrap-on/templates/slim/app/sessions/new.slim.tt +31 -0
- data/lib/bootstrap-on/templates/slim/page/_form.slim.tt +14 -0
- data/lib/bootstrap-on/templates/slim/page/edit.slim.tt +16 -0
- data/lib/bootstrap-on/templates/slim/page/index.slim.tt +30 -0
- data/lib/bootstrap-on/templates/slim/page/new.slim.tt +15 -0
- data/test/bootstrap-on/test_bs_admin_generator.rb +332 -0
- data/test/bootstrap-on/test_bs_admin_page_generator.rb +132 -0
- data/test/helper.rb +98 -0
- data/test/load_paths.rb +6 -0
- data/test/test_bootstrap-on.rb +15 -0
- metadata +240 -0
@@ -0,0 +1,16 @@
|
|
1
|
+
<div class="row">
|
2
|
+
<div class="span12">
|
3
|
+
<div class="page-header">
|
4
|
+
<h2>Dashboard</h2>
|
5
|
+
</div>
|
6
|
+
<p>
|
7
|
+
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
8
|
+
</p>
|
9
|
+
<p>
|
10
|
+
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
11
|
+
</p>
|
12
|
+
<p>
|
13
|
+
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
14
|
+
</p>
|
15
|
+
</div>
|
16
|
+
</div>
|
@@ -0,0 +1,79 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html lang="en">
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<title>Padrino Admin</title>
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
7
|
+
<meta name="description" content="">
|
8
|
+
<meta name="author" content="">
|
9
|
+
|
10
|
+
<!-- Le styles -->
|
11
|
+
<link href="/admin/css/bootstrap.css" rel="stylesheet">
|
12
|
+
<style>
|
13
|
+
body {
|
14
|
+
padding-top: 60px; /* 60px to make the container go all the way to the bottom of the topbar */
|
15
|
+
}
|
16
|
+
</style>
|
17
|
+
<link href="/admin/css/bootstrap-responsive.css" rel="stylesheet">
|
18
|
+
|
19
|
+
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
|
20
|
+
<!--[if lt IE 9]>
|
21
|
+
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
|
22
|
+
<![endif]-->
|
23
|
+
|
24
|
+
<!-- Le fav and touch icons -->
|
25
|
+
<link rel="shortcut icon" href="/admin/ico/favicon.ico">
|
26
|
+
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/admin/ico/apple-touch-icon-144-precomposed.png">
|
27
|
+
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="/admin/ico/apple-touch-icon-114-precomposed.png">
|
28
|
+
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="/admin/ico/apple-touch-icon-72-precomposed.png">
|
29
|
+
<link rel="apple-touch-icon-precomposed" href="/admin/ico/apple-touch-icon-57-precomposed.png">
|
30
|
+
</head>
|
31
|
+
|
32
|
+
<body>
|
33
|
+
|
34
|
+
<div class="navbar navbar-fixed-top">
|
35
|
+
<div class="navbar-inner">
|
36
|
+
<div class="container">
|
37
|
+
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
|
38
|
+
<span class="icon-bar"></span>
|
39
|
+
<span class="icon-bar"></span>
|
40
|
+
<span class="icon-bar"></span>
|
41
|
+
</a>
|
42
|
+
<a class="brand" href="<%%= url_for(:base, :index) %>">Project name</a>
|
43
|
+
<div class="nav-collapse">
|
44
|
+
<ul class="nav">
|
45
|
+
<%% project_modules.each do |project_module| %>
|
46
|
+
<li class="<%%= "active" if request.path_info =~ /^#{project_module.path}/ %>">
|
47
|
+
<%%= link_to project_module.human_name, project_module.path("/admin") %>
|
48
|
+
</li>
|
49
|
+
<%% end %>
|
50
|
+
</ul>
|
51
|
+
<ul class="nav pull-right">
|
52
|
+
<li>
|
53
|
+
<%%= link_to pat(:profile), url(:<%= options[:admin_model].underscore.pluralize %>, :edit, :id => current_account.id) %>
|
54
|
+
</li>
|
55
|
+
<li>
|
56
|
+
<%%= link_to('Sign Out', url(:sessions, :destroy), :method => :delete) %>
|
57
|
+
</li>
|
58
|
+
</ul>
|
59
|
+
</div><!--/.nav-collapse -->
|
60
|
+
</div>
|
61
|
+
</div>
|
62
|
+
</div>
|
63
|
+
|
64
|
+
<div class="container">
|
65
|
+
<%%= [:error, :warning, :notice, :info].map { |type| flash_tag(type, :class => "alert alert-#{bootstrap_alert_for(type)}") }.join %>
|
66
|
+
|
67
|
+
<%%= yield %>
|
68
|
+
|
69
|
+
</div> <!-- /container -->
|
70
|
+
|
71
|
+
<!-- Le javascript
|
72
|
+
================================================== -->
|
73
|
+
<!-- Placed at the end of the document so the pages load faster -->
|
74
|
+
<script src="/admin/js/jquery.js"></script>
|
75
|
+
<script src="/admin/js/jquery-ujs.js"></script>
|
76
|
+
<script src="/admin/js/bootstrap.js"></script>
|
77
|
+
|
78
|
+
</body>
|
79
|
+
</html>
|
@@ -0,0 +1,98 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html lang="en">
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<title>Padrino Admin</title>
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
7
|
+
<meta name="description" content="">
|
8
|
+
<meta name="author" content="">
|
9
|
+
|
10
|
+
<!-- Le styles -->
|
11
|
+
<link href="/admin/css/bootstrap.min.css" rel="stylesheet">
|
12
|
+
<style>
|
13
|
+
body {
|
14
|
+
padding-top: 60px; /* 60px to make the container go all the way to the bottom of the topbar */
|
15
|
+
}
|
16
|
+
</style>
|
17
|
+
<link href="/admin/css/bootstrap-responsive.min.css" rel="stylesheet">
|
18
|
+
|
19
|
+
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
|
20
|
+
<!--[if lt IE 9]>
|
21
|
+
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
|
22
|
+
<![endif]-->
|
23
|
+
|
24
|
+
<!-- Le fav and touch icons -->
|
25
|
+
<link rel="shortcut icon" href="/admin/ico/favicon.ico">
|
26
|
+
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/admin/ico/apple-touch-icon-144-precomposed.png">
|
27
|
+
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="/admin/ico/apple-touch-icon-114-precomposed.png">
|
28
|
+
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="/admin/ico/apple-touch-icon-72-precomposed.png">
|
29
|
+
<link rel="apple-touch-icon-precomposed" href="/admin/ico/apple-touch-icon-57-precomposed.png">
|
30
|
+
</head>
|
31
|
+
|
32
|
+
<body>
|
33
|
+
|
34
|
+
<div class="navbar navbar-fixed-top">
|
35
|
+
<div class="navbar-inner">
|
36
|
+
<div class="container">
|
37
|
+
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
|
38
|
+
<span class="icon-bar"></span>
|
39
|
+
<span class="icon-bar"></span>
|
40
|
+
<span class="icon-bar"></span>
|
41
|
+
</a>
|
42
|
+
<a class="brand" href="<%%= url_for(:base, :index) %>">Project name</a>
|
43
|
+
<div class="nav-collapse">
|
44
|
+
</div><!--/.nav-collapse -->
|
45
|
+
</div>
|
46
|
+
</div>
|
47
|
+
</div>
|
48
|
+
|
49
|
+
<div class="container">
|
50
|
+
<%%= [:error, :warning, :notice, :info].map { |type| flash_tag(type, :class => "alert alert-#{bootstrap_alert_for(type)}") }.join %>
|
51
|
+
|
52
|
+
<div class="row">
|
53
|
+
<div class="span6 offset3">
|
54
|
+
<%% form_tag(url(:sessions, :create), :class => "form-horizontal") do %>
|
55
|
+
<fieldset>
|
56
|
+
<legend>Please enter your login details</legend>
|
57
|
+
<div class="control-group">
|
58
|
+
<label class="control-label">Login</label>
|
59
|
+
<div class="controls">
|
60
|
+
<%%= text_field_tag :email, :value => params[:email] %>
|
61
|
+
</div>
|
62
|
+
</div>
|
63
|
+
|
64
|
+
<div class="control-group">
|
65
|
+
<label class="control-label">Password</label>
|
66
|
+
<div class="controls">
|
67
|
+
<%%= password_field_tag :password, :value => params[:password] %>
|
68
|
+
</div>
|
69
|
+
</div>
|
70
|
+
|
71
|
+
<%% if Padrino.env == :development %>
|
72
|
+
<div class="control-group">
|
73
|
+
<label class="control-label">Bypass login?</label>
|
74
|
+
<div class="controls">
|
75
|
+
<%%= check_box_tag :bypass %>
|
76
|
+
</div>
|
77
|
+
</div>
|
78
|
+
<%% end %>
|
79
|
+
|
80
|
+
<div class="form-actions">
|
81
|
+
<%%= submit_tag "Sign in", :class => "btn btn-primary" %>
|
82
|
+
</div>
|
83
|
+
</fieldset>
|
84
|
+
<%% end %>
|
85
|
+
</div>
|
86
|
+
</div>
|
87
|
+
|
88
|
+
</div> <!-- /container -->
|
89
|
+
|
90
|
+
<!-- Le javascript
|
91
|
+
================================================== -->
|
92
|
+
<!-- Placed at the end of the document so the pages load faster -->
|
93
|
+
<script src="/admin/js/jquery.js"></script>
|
94
|
+
<script src="/admin/js/jquery-ujs.js"></script>
|
95
|
+
<script src="/admin/js/bootstrap.min.js"></script>
|
96
|
+
|
97
|
+
</body>
|
98
|
+
</html>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<fieldset>
|
2
|
+
<% @orm.column_fields.each do |column| %>
|
3
|
+
<div class="control-group">
|
4
|
+
<%%= f.label :<%= column[:name] %>, :class => "control-label" %>
|
5
|
+
<div class="controls">
|
6
|
+
<%%= f.<%= column[:field_type] %> :<%= column[:name] %>, :class => :<%= column[:field_type] %> %>
|
7
|
+
<span class="help-block">Ex: a simple text</span>
|
8
|
+
</div>
|
9
|
+
</div>
|
10
|
+
<% end %>
|
11
|
+
|
12
|
+
<div class="form-actions">
|
13
|
+
<%%= f.submit pat(:save), :class => "btn btn-primary" %>
|
14
|
+
<%%= f.submit pat(:cancel), :onclick => "window.location='#{url(:<%= @orm.name_plural %>, :index)}';return false", :class => "btn" %>
|
15
|
+
</div>
|
16
|
+
</fieldset>
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<div class="subnav">
|
2
|
+
<ul class="nav nav-tabs">
|
3
|
+
<li>
|
4
|
+
<%%= link_to pat(:list), url(:<%= @orm.name_plural %>, :index) %>
|
5
|
+
</li>
|
6
|
+
<li>
|
7
|
+
<%%= link_to pat(:new), url(:<%= @orm.name_plural %>, :new) %>
|
8
|
+
</li>
|
9
|
+
<li class="active">
|
10
|
+
<%%= link_to pat(:edit), url(:<%= @orm.name_plural %>, :edit, :id => @<%= @orm.name_singular %>.id) %>
|
11
|
+
</li>
|
12
|
+
</ul>
|
13
|
+
</div>
|
14
|
+
|
15
|
+
<div class="row">
|
16
|
+
<div class="span12">
|
17
|
+
<div class="page-header">
|
18
|
+
<h2><%%= pat(:edit) %> <%%= mt(:<%= @orm.name_singular %>) %></h2>
|
19
|
+
</div>
|
20
|
+
|
21
|
+
<%% form_for :<%= @orm.name_singular %>, url(:<%= @orm.name_plural %>, :update, :id => @<%= @orm.name_singular %>.id), :method => :put, :class => "form-horizontal" do |f| %>
|
22
|
+
<%%= partial "<%= @orm.name_plural %>/form", :locals => { :f => f } %>
|
23
|
+
<%% end %>
|
24
|
+
|
25
|
+
</div>
|
26
|
+
</div>
|
@@ -0,0 +1,41 @@
|
|
1
|
+
<div class="subnav">
|
2
|
+
<ul class="nav nav-tabs">
|
3
|
+
<li class="active">
|
4
|
+
<%%= link_to pat(:list), url(:<%= @orm.name_plural %>, :index) %>
|
5
|
+
</li>
|
6
|
+
<li>
|
7
|
+
<%%= link_to pat(:new), url(:<%= @orm.name_plural %>, :new) %>
|
8
|
+
</li>
|
9
|
+
</ul>
|
10
|
+
</div>
|
11
|
+
|
12
|
+
<div class="row">
|
13
|
+
<div class="span12">
|
14
|
+
<div class="page-header">
|
15
|
+
<h2><%%= pat(:all) %> <%%= mt(:<%= @orm.name_plural %>) %></h2>
|
16
|
+
</div>
|
17
|
+
|
18
|
+
<table class="table table-striped">
|
19
|
+
<tr>
|
20
|
+
<%- @orm.columns.each_with_index do |column, i| -%>
|
21
|
+
<th<%= " class=\"first\"" if i==0 %>><%%= mat(:<%= @orm.name_singular %>, :<%= column.name %>) %></th>
|
22
|
+
<%- end -%>
|
23
|
+
<th> </th>
|
24
|
+
</tr>
|
25
|
+
<%% @<%= @orm.name_plural %>.each do |<%= @orm.name_singular %>| %>
|
26
|
+
<tr>
|
27
|
+
<%- @orm.columns.each_with_index do |column, i| -%>
|
28
|
+
<td<%= " class=\"first\"" if i==0 %>><%%= <%= @orm.name_singular %>.<%= column.name %> %></td>
|
29
|
+
<%- end -%>
|
30
|
+
<td>
|
31
|
+
<span class="pull-right">
|
32
|
+
<%%= link_to pat(:edit), url(:<%= @orm.name_plural %>, :edit, :id => <%= @orm.name_singular %>.id), :class => "btn btn-primary" %>
|
33
|
+
<%%= link_to pat(:delete), url(:<%= @orm.name_plural %>, :destroy, :id => <%= @orm.name_singular %>.id), :method => :delete, :confirm => "Are you sure?", :class => "btn btn-danger" %>
|
34
|
+
</span>
|
35
|
+
</td>
|
36
|
+
</tr>
|
37
|
+
<%% end %>
|
38
|
+
</table>
|
39
|
+
|
40
|
+
</div>
|
41
|
+
</div>
|
@@ -0,0 +1,23 @@
|
|
1
|
+
<div class="subnav">
|
2
|
+
<ul class="nav nav-tabs">
|
3
|
+
<li>
|
4
|
+
<%%= link_to pat(:list), url(:<%= @orm.name_plural %>, :index) %>
|
5
|
+
</li>
|
6
|
+
<li class="active">
|
7
|
+
<%%= link_to pat(:new), url(:<%= @orm.name_plural %>, :new) %>
|
8
|
+
</li>
|
9
|
+
</ul>
|
10
|
+
</div>
|
11
|
+
|
12
|
+
<div class="row">
|
13
|
+
<div class="span12">
|
14
|
+
<div class="page-header">
|
15
|
+
<h2><%%= pat(:new) %> <%%= mt(:<%= @orm.name_singular %>) %></h2>
|
16
|
+
</div>
|
17
|
+
|
18
|
+
<%% form_for :<%= @orm.name_singular %>, url(:<%= @orm.name_plural %>, :create), :class => "form-horizontal" do |f| %>
|
19
|
+
<%%= partial "<%= @orm.name_plural %>/form", :locals => { :f => f } %>
|
20
|
+
<%% end %>
|
21
|
+
|
22
|
+
</div>
|
23
|
+
</div>
|
@@ -0,0 +1,23 @@
|
|
1
|
+
#block-text.block
|
2
|
+
.content
|
3
|
+
%h2.title Dashboard
|
4
|
+
.inner
|
5
|
+
%p.first
|
6
|
+
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
7
|
+
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
|
8
|
+
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
|
9
|
+
%span.hightlight
|
10
|
+
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
11
|
+
%p
|
12
|
+
%span.small
|
13
|
+
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore
|
14
|
+
%p
|
15
|
+
%span.gray
|
16
|
+
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore
|
17
|
+
%hr
|
18
|
+
%p
|
19
|
+
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
20
|
+
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
|
21
|
+
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
|
22
|
+
%span.hightlight
|
23
|
+
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
@@ -0,0 +1,31 @@
|
|
1
|
+
!!! Strict
|
2
|
+
%html{:lang => "en", :xmlns => "http://www.w3.org/1999/xhtml"}
|
3
|
+
%head
|
4
|
+
%meta{:content => "text/html; charset=utf-8", "http-equiv" => "Content-Type"}
|
5
|
+
%title Padrino Admin
|
6
|
+
=stylesheet_link_tag :base, "themes/<%= options[:theme] %>/style"
|
7
|
+
%body
|
8
|
+
#container
|
9
|
+
#header
|
10
|
+
%h1=link_to "Padrino Admin", url(:base_index)
|
11
|
+
#user-navigation
|
12
|
+
%ul.wat-cf
|
13
|
+
%li=link_to pat(:profile), url(:<%= @model_plural %>, :edit, :id => current_account.id)
|
14
|
+
%li=button_to pat(:logout), url(:sessions, :destroy), :method => :delete, :class => :button_to
|
15
|
+
#main-navigation
|
16
|
+
%ul.wat-cf
|
17
|
+
-project_modules.each do |project_module|
|
18
|
+
%li{:class => ("active" if request.path_info =~ /^#{project_module.path}/)}
|
19
|
+
=link_to project_module.human_name, project_module.path("/admin")
|
20
|
+
#wrapper.wat-cf
|
21
|
+
.flash=[:error, :warning, :notice].map { |type| flash_tag(type, :class => "message #{type}") }.join
|
22
|
+
#main
|
23
|
+
=yield
|
24
|
+
#footer
|
25
|
+
.block
|
26
|
+
%p
|
27
|
+
Copyright ©
|
28
|
+
=Time.now.year
|
29
|
+
Your Site - Powered by
|
30
|
+
=link_to "Padrino v.#{Padrino.version}", "http://www.padrinorb.com", :target => :_blank
|
31
|
+
#sidebar=yield_content :sidebar
|
@@ -0,0 +1,30 @@
|
|
1
|
+
!!! Strict
|
2
|
+
%html{:lang => "en", :xmlns => "http://www.w3.org/1999/xhtml"}
|
3
|
+
%head
|
4
|
+
%meta{:content => "text/html; charset=utf-8", "http-equiv" => "Content-Type"}
|
5
|
+
%title Padrino Admin
|
6
|
+
=stylesheet_link_tag :base, "themes/<%= options[:theme] %>/style"
|
7
|
+
%body
|
8
|
+
#container
|
9
|
+
#box
|
10
|
+
%h1 Padrino Admin
|
11
|
+
#block-login.block
|
12
|
+
%h2 Login Box
|
13
|
+
.content.login
|
14
|
+
.flash=[:error, :warning, :notice].map { |type| flash_tag(type, :class => "message #{type}") }.join
|
15
|
+
-form_tag(url(:sessions, :create), :class => 'form login') do
|
16
|
+
.group.wat-cf
|
17
|
+
.left
|
18
|
+
%label.label.right Login
|
19
|
+
.right=text_field_tag :email, :value => params[:email], :class => :text_field
|
20
|
+
.group.wat-cf
|
21
|
+
.left
|
22
|
+
%label.label.right Password
|
23
|
+
.right=password_field_tag :password, :value => params[:password], :class => :text_field
|
24
|
+
-if Padrino.env == :development
|
25
|
+
.group.wat-cf
|
26
|
+
.left
|
27
|
+
%label.label.right Bypass login?
|
28
|
+
.right=check_box_tag :bypass
|
29
|
+
.group.navform.wat-cf
|
30
|
+
.right=submit_tag('Sign In', :class => :button)
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<%- @orm.column_fields.each do |column| -%>
|
2
|
+
.group
|
3
|
+
=f.label :<%= column[:name] %>
|
4
|
+
=f.error_message_on :<%= column[:name] %>
|
5
|
+
<% if column[:field_type] == :text_area %>~<% else %>=<% end %>f.<%= column[:field_type] %> :<%= column[:name] %>, :class => :<%= column[:field_type] %>
|
6
|
+
%span.description Ex: a simple text
|
7
|
+
|
8
|
+
<%- end -%>
|
9
|
+
|
10
|
+
.group.navform.wat-cf
|
11
|
+
=f.submit pat(:save), :class => :button
|
12
|
+
=f.submit pat(:cancel), :onclick => "window.location='#{url(:<%= @orm.name_plural %>, :index)}';return false", :class => :button
|
@@ -0,0 +1,15 @@
|
|
1
|
+
.block
|
2
|
+
.secondary-navigation
|
3
|
+
%ul.wat-cf
|
4
|
+
%li.first=link_to pat(:list), url(:<%= @orm.name_plural %>, :index)
|
5
|
+
%li=link_to pat(:new), url(:<%= @orm.name_plural %>, :new)
|
6
|
+
%li.active=link_to pat(:edit), url(:<%= @orm.name_plural %>, :edit, :id => @<%= @orm.name_singular %>.id)
|
7
|
+
.content
|
8
|
+
%h2.title
|
9
|
+
=pat(:edit)
|
10
|
+
=mt(:<%= @orm.name_singular %>)
|
11
|
+
.inner
|
12
|
+
-form_for :<%= @orm.name_singular %>, url(:<%= @orm.name_plural %>, :update, :id => @<%= @orm.name_singular %>.id), :method => :put, :class => :form do |f|
|
13
|
+
=partial "<%= @orm.name_plural %>/form", :locals => { :f => f }
|
14
|
+
|
15
|
+
-content_for :sidebar, partial("base/sidebar")
|
@@ -0,0 +1,29 @@
|
|
1
|
+
.block
|
2
|
+
.secondary-navigation
|
3
|
+
%ul.wat-cf
|
4
|
+
%li.first.active=link_to pat(:list), url(:<%= @orm.name_plural %>, :index)
|
5
|
+
%li=link_to pat(:new), url(:<%= @orm.name_plural %>, :new)
|
6
|
+
.content
|
7
|
+
%h2.title
|
8
|
+
=pat(:all)
|
9
|
+
=mt(:<%= @orm.name_plural %>)
|
10
|
+
.inner
|
11
|
+
%table.table
|
12
|
+
%tr
|
13
|
+
<%- @orm.columns.each_with_index do |column, i| -%>
|
14
|
+
%th<%= ".first" if i==0 %>=mat(:<%= @orm.name_singular %>, :<%= column.name %>)
|
15
|
+
<%- end -%>
|
16
|
+
%th.last=" "
|
17
|
+
-@<%= @orm.name_plural %>.each do |<%= @orm.name_singular %>|
|
18
|
+
%tr
|
19
|
+
<%- @orm.columns.each_with_index do |column, i| -%>
|
20
|
+
%td<%= ".first" if i==0 %>=<%= @orm.name_singular %>.<%= column.name %>
|
21
|
+
<%- end -%>
|
22
|
+
%td.last
|
23
|
+
=button_to pat(:edit), url(:<%= @orm.name_plural %>, :edit, :id => <%= @orm.name_singular %>.id), :method => :get, :class => :button_to
|
24
|
+
="|"
|
25
|
+
=button_to pat(:delete), url(:<%= @orm.name_plural %>, :destroy, :id => <%= @orm.name_singular %>.id), :method => :delete, :class => :button_to, :onsubmit => "return confirm('#{pat(:confirm)}')"
|
26
|
+
.actions-bar.wat-cf
|
27
|
+
.actions=" "
|
28
|
+
|
29
|
+
-content_for :sidebar, partial("base/sidebar")
|