padrino-admin 0.9.20 → 0.9.21

Sign up to get free protection for your applications and to get access to all the features.
Files changed (23) hide show
  1. data/lib/padrino-admin/generators/templates/account/datamapper.rb.tt +4 -3
  2. data/lib/padrino-admin/generators/templates/slim/app/base/_sidebar.slim.tt +11 -0
  3. data/lib/padrino-admin/generators/templates/slim/app/base/index.slim.tt +25 -0
  4. data/lib/padrino-admin/generators/templates/slim/app/layouts/application.slim.tt +30 -0
  5. data/lib/padrino-admin/generators/templates/slim/app/sessions/new.slim.tt +31 -0
  6. data/lib/padrino-admin/generators/templates/slim/page/_form.slim.tt +14 -0
  7. data/lib/padrino-admin/generators/templates/slim/page/edit.slim.tt +16 -0
  8. data/lib/padrino-admin/generators/templates/slim/page/index.slim.tt +30 -0
  9. data/lib/padrino-admin/generators/templates/slim/page/new.slim.tt +15 -0
  10. data/lib/padrino-admin/locale/admin/zh_cn.yml +16 -0
  11. data/lib/padrino-admin/locale/admin/zh_tw.yml +16 -0
  12. data/lib/padrino-admin/locale/orm/zh_cn.yml +26 -0
  13. data/lib/padrino-admin/locale/orm/zh_tw.yml +26 -0
  14. data/test/generators/test_admin_app_generator.rb +0 -32
  15. metadata +24 -20
  16. data/lib/padrino-admin/generators/templates/erubis/app/base/_sidebar.erubis.tt +0 -13
  17. data/lib/padrino-admin/generators/templates/erubis/app/base/index.erubis.tt +0 -17
  18. data/lib/padrino-admin/generators/templates/erubis/app/layouts/application.erubis.tt +0 -44
  19. data/lib/padrino-admin/generators/templates/erubis/app/sessions/new.erubis.tt +0 -56
  20. data/lib/padrino-admin/generators/templates/erubis/page/_form.erubis.tt +0 -11
  21. data/lib/padrino-admin/generators/templates/erubis/page/edit.erubis.tt +0 -18
  22. data/lib/padrino-admin/generators/templates/erubis/page/index.erubis.tt +0 -36
  23. data/lib/padrino-admin/generators/templates/erubis/page/new.erubis.tt +0 -17
@@ -7,8 +7,9 @@ class Account
7
7
  property :id, Serial
8
8
  property :name, String
9
9
  property :surname, String
10
- property :email, String
11
- property :crypted_password, String
10
+ property :email, String, :length => 100
11
+ # BCrypt gives you a 60 character string
12
+ property :crypted_password, String, :length => 60
12
13
  property :role, String
13
14
 
14
15
  # Validations
@@ -52,4 +53,4 @@ class Account
52
53
  def encrypt_password
53
54
  self.crypted_password = ::BCrypt::Password.create(password)
54
55
  end
55
- end
56
+ end
@@ -0,0 +1,11 @@
1
+ .block
2
+ h3 Simple Block
3
+ .content
4
+ p
5
+ ' Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
6
+ | Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
7
+ .block
8
+ h3 Links
9
+ ul.navigation
10
+ li==link_to "Link 1"
11
+ li==link_to "Link 2"
@@ -0,0 +1,25 @@
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.
24
+
25
+ -content_for :sidebar, partial("base/sidebar")
@@ -0,0 +1,30 @@
1
+ !doctype html
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 <%= options[:name] %>
6
+ ==stylesheet_link_tag :base, "themes/<%= options[:theme] %>/style"
7
+
8
+ body
9
+ #container
10
+ #header
11
+ h1==link_to "<%= options[:name] %>", url(:base_index)
12
+ #user-navigation
13
+ ul.wat-cf
14
+ li==link_to pat(:profile), url(:accounts, :edit, :id => current_account.id)
15
+ li==link_to pat(:logout), url(:sessions, :destroy), :method => :delete
16
+ #main-navigation
17
+ ul.wat-cf
18
+ -project_modules.each do |project_module|
19
+ li class={"active" if request.path_info =~ /^#{project_module.path}/}
20
+ ==link_to project_module.human_name, project_module.path("/admin")
21
+ #wrapper.wat-cf
22
+ .flash==[:error, :warning, :notice].map { |type| flash_tag(type, :class => "message #{type}") }.join
23
+ #main
24
+ ==yield
25
+ #footer
26
+ .block
27
+ p
28
+ ' Copyright &copy; #{Time.now.year} Your Site - Powered by
29
+ ==link_to "Padrino v.#{Padrino.version}", "http://padrino.github.com", :target => :_blank
30
+ #sidebar==yield_content :sidebar
@@ -0,0 +1,31 @@
1
+ !doctype html
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 <%= options[:name] %>
6
+ ==stylesheet_link_tag :base, "themes/<%= options[:theme] %>/style"
7
+
8
+ body
9
+ #container
10
+ #box
11
+ h1 <%= options[:name] %>
12
+ #block-login.block
13
+ h2 Login Box
14
+ .content.login
15
+ .flash==[:error, :warning, :notice].map { |type| flash_tag(type, :class => "message #{type}") }.join
16
+ ==form_tag(url(:sessions, :create), :class => 'form login') do
17
+ .group.wat-cf
18
+ .left
19
+ label.label.right Login
20
+ .right==text_field_tag :email, :value => params[:email], :class => :text_field
21
+ .group.wat-cf
22
+ .left
23
+ label.label.right Password
24
+ .right==password_field_tag :password, :value => params[:password], :class => :text_field
25
+ -if Padrino.env == :development
26
+ .group.wat-cf
27
+ .left
28
+ label.label.right Bypass login?
29
+ .right==check_box_tag :bypass
30
+ .group.navform.wat-cf
31
+ .right==submit_tag('Sign In', :class => :button)
@@ -0,0 +1,14 @@
1
+ <%- @orm.column_fields.each do |column| -%>
2
+ .group
3
+ ==f.label :<%= column[:name] %>
4
+ ==f.error_message_on :<%= column[:name] %>
5
+ ==f.<%= column[:field_type] %> :<%= column[:name] %>, :class => :<%= column[:field_type] %>
6
+ br
7
+ span.description Ex: a simple text
8
+
9
+ <%- end -%>
10
+
11
+ .group.navform.wat-cf
12
+ ==f.submit pat(:save), :class => :button
13
+ =="&nbsp;"
14
+ ==f.submit pat(:cancel), :onclick => "window.location='#{url(:<%= @orm.name_plural %>, :index)}';return false", :class => :button
@@ -0,0 +1,16 @@
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
+ =="&nbsp;"
11
+ =mt(:<%= @orm.name_singular %>)
12
+ .inner
13
+ ==form_for :<%= @orm.name_singular %>, url(:<%= @orm.name_plural %>, :update, :id => @<%= @orm.name_singular %>.id), :method => :put, :class => :form do |f|
14
+ ==partial "<%= @orm.name_plural %>/form", :locals => { :f => f }
15
+
16
+ -content_for :sidebar, partial("base/sidebar")
@@ -0,0 +1,30 @@
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
+ =="&nbsp;"
10
+ ==mt(:<%= @orm.name_plural %>)
11
+ .inner
12
+ table.table
13
+ tr
14
+ <%- @orm.columns.each_with_index do |column, i| -%>
15
+ th<%= ".first" if i==0 %>=mat(:<%= @orm.name_singular %>, :<%= column.name %>)
16
+ <%- end -%>
17
+ th.last=="&nbsp;"
18
+ -@<%= @orm.name_plural %>.each do |<%= @orm.name_singular %>|
19
+ tr
20
+ <%- @orm.columns.each_with_index do |column, i| -%>
21
+ td<%= ".first" if i==0 %>=<%= @orm.name_singular %>.<%= column.name %>
22
+ <%- end -%>
23
+ td.last
24
+ ==button_to pat(:edit), url(:<%= @orm.name_plural %>, :edit, :id => <%= @orm.name_singular %>.id), :method => :get, :class => :button_to
25
+ ==" | "
26
+ ==button_to pat(:delete), url(:<%= @orm.name_plural %>, :destroy, :id => <%= @orm.name_singular %>.id), :method => :delete, :class => :button_to
27
+ .actions-bar.wat-cf
28
+ .actions=="&nbsp;"
29
+
30
+ -content_for :sidebar, partial("base/sidebar")
@@ -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.active==link_to pat(:new), url(:<%= @orm.name_plural %>, :new)
6
+ .content
7
+ h2.title
8
+ =pat(:new)
9
+ =="&nbsp;"
10
+ =mt(:<%= @orm.name_singular %>)
11
+ .inner
12
+ ==form_for :<%= @orm.name_singular %>, url(:<%= @orm.name_plural %>, :create), :class => :form do |f|
13
+ ==partial "<%= @orm.name_plural %>/form", :locals => { :f => f }
14
+
15
+ -content_for :sidebar, partial("base/sidebar")
@@ -0,0 +1,16 @@
1
+ zh_cn:
2
+ padrino:
3
+ admin:
4
+ save: 储存
5
+ cancel: 取消
6
+ list: 列表
7
+ edit: 编辑
8
+ new: 新增
9
+ show: 显示
10
+ delete: 删除
11
+ confirm: 确定要执行吗?
12
+ created_at: 建立于
13
+ all: 所有
14
+ profile: 个人资料
15
+ settings: 设定
16
+ logout: 登出
@@ -0,0 +1,16 @@
1
+ zh_tw:
2
+ padrino:
3
+ admin:
4
+ save: 儲存
5
+ cancel: 取消
6
+ list: 列表
7
+ edit: 編輯
8
+ new: 新增
9
+ show: 顯示
10
+ delete: 刪除
11
+ confirm: 確定要執行嗎?
12
+ created_at: 建立於
13
+ all: 所有
14
+ profile: 個人資料
15
+ settings: 設定
16
+ logout: 登出
@@ -0,0 +1,26 @@
1
+ zh_cn:
2
+ activemodel: &activemodel
3
+ errors:
4
+ messages:
5
+ inclusion: "没有包含在列表中"
6
+ exclusion: "是被保留的关键字"
7
+ invalid: "是无效的"
8
+ confirmation: "不符合确认值"
9
+ accepted: "必须是可被接受的"
10
+ empty: "不能留空"
11
+ blank: "不能是空白字元"
12
+ too_long: "过长(最长是 %{count} 个字)"
13
+ too_short: "过短(最短是%{count} 个字)"
14
+ wrong_length: "字数错误(必须是%{count} 个字)"
15
+ taken: "已经被使用"
16
+ not_a_number: "不是数字"
17
+ greater_than: "必须大于 %{count}"
18
+ greater_than_or_equal_to: "必须大于或等于%{count}"
19
+ equal_to: "必须等于 %{count}"
20
+ less_than: "必须小于 %{count}"
21
+ less_than_or_equal_to: "必须小于或等于%{count}"
22
+ odd: "必须是奇数"
23
+ even: "必须是偶数"
24
+ record_invalid: "校验失败: %{errors}"
25
+ content_type: "档案格式不支援"
26
+ activerecord: *activemodel
@@ -0,0 +1,26 @@
1
+ zh_tw:
2
+ activemodel: &activemodel
3
+ errors:
4
+ messages:
5
+ inclusion: "沒有包含在列表中"
6
+ exclusion: "是被保留的關鍵字"
7
+ invalid: "是無效的"
8
+ confirmation: "不符合確認值"
9
+ accepted: "必須是可被接受的"
10
+ empty: "不能留空"
11
+ blank: "不能是空白字元"
12
+ too_long: "過長(最長是 %{count} 個字)"
13
+ too_short: "過短(最短是 %{count} 個字)"
14
+ wrong_length: "字數錯誤(必須是 %{count} 個字)"
15
+ taken: "已經被使用"
16
+ not_a_number: "不是數字"
17
+ greater_than: "必須大於 %{count}"
18
+ greater_than_or_equal_to: "必須大於或等於 %{count}"
19
+ equal_to: "必須等於 %{count}"
20
+ less_than: "必須小於 %{count}"
21
+ less_than_or_equal_to: "必須小於或等於 %{count}"
22
+ odd: "必須是奇數"
23
+ even: "必須是偶數"
24
+ record_invalid: "校驗失敗: %{errors}"
25
+ content_type: "檔案格式不支援"
26
+ activerecord: *activemodel
@@ -91,38 +91,6 @@ class TestAdminAppGenerator < Test::Unit::TestCase
91
91
  assert_match_in_file 'role.project_module :accounts, "/accounts"', "#{@apptmp}/sample_project/admin/app.rb"
92
92
  end
93
93
 
94
- should 'correctly generate a new padrino admin application with erubis renderer' do
95
- assert_nothing_raised { silence_logger { generate(:project, 'sample_project', "--root=#{@apptmp}", '-d=activerecord', '-e=erubis') } }
96
- assert_nothing_raised { silence_logger { generate(:admin_app, "--root=#{@apptmp}/sample_project") } }
97
- assert_file_exists("#{@apptmp}/sample_project")
98
- assert_file_exists("#{@apptmp}/sample_project/admin")
99
- assert_file_exists("#{@apptmp}/sample_project/admin/app.rb")
100
- assert_file_exists("#{@apptmp}/sample_project/admin/controllers")
101
- assert_file_exists("#{@apptmp}/sample_project/admin/controllers/accounts.rb")
102
- assert_file_exists("#{@apptmp}/sample_project/admin/controllers/base.rb")
103
- assert_file_exists("#{@apptmp}/sample_project/admin/controllers/sessions.rb")
104
- assert_file_exists("#{@apptmp}/sample_project/admin/views")
105
- assert_file_exists("#{@apptmp}/sample_project/admin/views/accounts/_form.erubis")
106
- assert_file_exists("#{@apptmp}/sample_project/admin/views/accounts/edit.erubis")
107
- assert_file_exists("#{@apptmp}/sample_project/admin/views/accounts/index.erubis")
108
- assert_file_exists("#{@apptmp}/sample_project/admin/views/accounts/new.erubis")
109
- assert_file_exists("#{@apptmp}/sample_project/admin/views/base/index.erubis")
110
- assert_file_exists("#{@apptmp}/sample_project/admin/views/sessions/new.erubis")
111
- assert_file_exists("#{@apptmp}/sample_project/admin/views/base/_sidebar.erubis")
112
- assert_file_exists("#{@apptmp}/sample_project/admin/views/base/index.erubis")
113
- assert_file_exists("#{@apptmp}/sample_project/admin/views/layouts/application.erubis")
114
- assert_file_exists("#{@apptmp}/sample_project/admin/views/sessions/new.erubis")
115
- assert_file_exists("#{@apptmp}/sample_project/public/admin")
116
- assert_file_exists("#{@apptmp}/sample_project/public/admin/stylesheets")
117
- assert_file_exists("#{@apptmp}/sample_project/admin/models/account.rb")
118
- assert_no_file_exists("#{@apptmp}/sample_project/app/models/account.rb")
119
- assert_file_exists("#{@apptmp}/sample_project/db/seeds.rb")
120
- assert_file_exists("#{@apptmp}/sample_project/db/migrate/001_create_accounts.rb")
121
- assert_match_in_file 'Padrino.mount("Admin").to("/admin")', "#{@apptmp}/sample_project/config/apps.rb"
122
- assert_match_in_file 'class Admin < Padrino::Application', "#{@apptmp}/sample_project/admin/app.rb"
123
- assert_match_in_file 'role.project_module :accounts, "/accounts"', "#{@apptmp}/sample_project/admin/app.rb"
124
- end
125
-
126
94
  should 'not conflict with existing seeds file' do
127
95
  assert_nothing_raised { silence_logger { generate(:project, 'sample_project', "--root=#{@apptmp}", '-d=activerecord', '-e=erb') } }
128
96
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: padrino-admin
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
5
- prerelease: false
4
+ hash: 17
5
+ prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 9
9
- - 20
10
- version: 0.9.20
9
+ - 21
10
+ version: 0.9.21
11
11
  platform: ruby
12
12
  authors:
13
13
  - Padrino Team
@@ -18,7 +18,7 @@ autorequire:
18
18
  bindir: bin
19
19
  cert_chain: []
20
20
 
21
- date: 2011-01-19 00:00:00 -08:00
21
+ date: 2011-02-28 00:00:00 -08:00
22
22
  default_executable:
23
23
  dependencies:
24
24
  - !ruby/object:Gem::Dependency
@@ -29,12 +29,12 @@ dependencies:
29
29
  requirements:
30
30
  - - "="
31
31
  - !ruby/object:Gem::Version
32
- hash: 19
32
+ hash: 17
33
33
  segments:
34
34
  - 0
35
35
  - 9
36
- - 20
37
- version: 0.9.20
36
+ - 21
37
+ version: 0.9.21
38
38
  type: :runtime
39
39
  version_requirements: *id001
40
40
  - !ruby/object:Gem::Dependency
@@ -45,12 +45,12 @@ dependencies:
45
45
  requirements:
46
46
  - - "="
47
47
  - !ruby/object:Gem::Version
48
- hash: 19
48
+ hash: 17
49
49
  segments:
50
50
  - 0
51
51
  - 9
52
- - 20
53
- version: 0.9.20
52
+ - 21
53
+ version: 0.9.21
54
54
  type: :runtime
55
55
  version_requirements: *id002
56
56
  description: Admin View for Padrino applications
@@ -104,14 +104,6 @@ files:
104
104
  - lib/padrino-admin/generators/templates/erb/page/edit.erb.tt
105
105
  - lib/padrino-admin/generators/templates/erb/page/index.erb.tt
106
106
  - lib/padrino-admin/generators/templates/erb/page/new.erb.tt
107
- - lib/padrino-admin/generators/templates/erubis/app/base/_sidebar.erubis.tt
108
- - lib/padrino-admin/generators/templates/erubis/app/base/index.erubis.tt
109
- - lib/padrino-admin/generators/templates/erubis/app/layouts/application.erubis.tt
110
- - lib/padrino-admin/generators/templates/erubis/app/sessions/new.erubis.tt
111
- - lib/padrino-admin/generators/templates/erubis/page/_form.erubis.tt
112
- - lib/padrino-admin/generators/templates/erubis/page/edit.erubis.tt
113
- - lib/padrino-admin/generators/templates/erubis/page/index.erubis.tt
114
- - lib/padrino-admin/generators/templates/erubis/page/new.erubis.tt
115
107
  - lib/padrino-admin/generators/templates/haml/app/base/_sidebar.haml.tt
116
108
  - lib/padrino-admin/generators/templates/haml/app/base/index.haml.tt
117
109
  - lib/padrino-admin/generators/templates/haml/app/layouts/application.haml.tt
@@ -121,6 +113,14 @@ files:
121
113
  - lib/padrino-admin/generators/templates/haml/page/index.haml.tt
122
114
  - lib/padrino-admin/generators/templates/haml/page/new.haml.tt
123
115
  - lib/padrino-admin/generators/templates/page/controller.rb.tt
116
+ - lib/padrino-admin/generators/templates/slim/app/base/_sidebar.slim.tt
117
+ - lib/padrino-admin/generators/templates/slim/app/base/index.slim.tt
118
+ - lib/padrino-admin/generators/templates/slim/app/layouts/application.slim.tt
119
+ - lib/padrino-admin/generators/templates/slim/app/sessions/new.slim.tt
120
+ - lib/padrino-admin/generators/templates/slim/page/_form.slim.tt
121
+ - lib/padrino-admin/generators/templates/slim/page/edit.slim.tt
122
+ - lib/padrino-admin/generators/templates/slim/page/index.slim.tt
123
+ - lib/padrino-admin/generators/templates/slim/page/new.slim.tt
124
124
  - lib/padrino-admin/helpers/authentication_helpers.rb
125
125
  - lib/padrino-admin/helpers/view_helpers.rb
126
126
  - lib/padrino-admin/locale/admin/cz.yml
@@ -137,6 +137,8 @@ files:
137
137
  - lib/padrino-admin/locale/admin/ru.yml
138
138
  - lib/padrino-admin/locale/admin/tr.yml
139
139
  - lib/padrino-admin/locale/admin/uk.yml
140
+ - lib/padrino-admin/locale/admin/zh_cn.yml
141
+ - lib/padrino-admin/locale/admin/zh_tw.yml
140
142
  - lib/padrino-admin/locale/orm/cz.yml
141
143
  - lib/padrino-admin/locale/orm/da.yml
142
144
  - lib/padrino-admin/locale/orm/de.yml
@@ -151,6 +153,8 @@ files:
151
153
  - lib/padrino-admin/locale/orm/ru.yml
152
154
  - lib/padrino-admin/locale/orm/tr.yml
153
155
  - lib/padrino-admin/locale/orm/uk.yml
156
+ - lib/padrino-admin/locale/orm/zh_cn.yml
157
+ - lib/padrino-admin/locale/orm/zh_tw.yml
154
158
  - lib/padrino-admin/utils/crypt.rb
155
159
  - lib/padrino-admin.rb
156
160
  - test/fixtures/data_mapper.rb
@@ -190,7 +194,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
190
194
  requirements: []
191
195
 
192
196
  rubyforge_project: padrino-admin
193
- rubygems_version: 1.3.7
197
+ rubygems_version: 1.5.2
194
198
  signing_key:
195
199
  specification_version: 3
196
200
  summary: Admin Dashboard for Padrino
@@ -1,13 +0,0 @@
1
- <div class="block">
2
- <h3>Simple Block</h3>
3
- <div class="content">
4
- <p>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.</p>
5
- </div>
6
- </div>
7
- <div class="block">
8
- <h3>Links</h3>
9
- <ul class="navigation">
10
- <li><%%= link_to "Link 1" %></li>
11
- <li><%%= link_to "Link 1" %></li>
12
- </ul>
13
- </div>
@@ -1,17 +0,0 @@
1
- <div class="block" id="block-text">
2
- <div class="content">
3
- <h2 class="title">Dashboard</h2>
4
- <div class="inner">
5
- <p class="first">
6
- 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. <span class="hightlight">Excepteur sint occaecat cupidatat non proident</span>, sunt in culpa qui officia deserunt mollit anim id est laborum.
7
- </p>
8
- <p> <span class="small">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore</span></p>
9
- <p> <span class="gray">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore</span></p>
10
- <hr />
11
- <p>
12
- 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. <span class="hightlight">Excepteur sint occaecat cupidatat non proident</span>, sunt in culpa qui officia deserunt mollit anim id est laborum.
13
- </p>
14
- </div>
15
- </div>
16
- </div>
17
- <%% content_for :sidebar, partial("base/sidebar") %>
@@ -1,44 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2
- <html xmlns="http://www.w3.org/1999/xhtml" lang="en">
3
- <head>
4
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5
- <title><%= options[:name] %></title>
6
- <%%= stylesheet_link_tag :base, "themes/<%= options[:theme] %>/style" %>
7
- </head>
8
- <body>
9
- <div id="container">
10
- <div id="header">
11
- <h1><%%= link_to "<%= options[:name] %>", url(:base_index) %></h1>
12
- <div id="user-navigation">
13
- <ul class="wat-cf">
14
- <li><%%= link_to pat(:profile), url(:accounts, :edit, :id => current_account.id) %></li>
15
- <li><%%= link_to pat(:logout), url(:sessions, :destroy), :method => :delete %></li>
16
- </ul>
17
- </div>
18
- <div id="main-navigation">
19
- <ul class="wat-cf">
20
- <%% project_modules.each do |project_module| %>
21
- <li class="<%%= "active" if request.path_info =~ /^#{project_module.path}/ %>"><%%= link_to project_module.human_name, project_module.path("/admin") %></li>
22
- <%% end %>
23
- </ul>
24
- </div>
25
- </div>
26
- <div id="wrapper" class="wat-cf">
27
- <div class="flash">
28
- <%%= [:error, :warning, :notice].map { |type| flash_tag(type, :class => "message #{type}") }.join %>
29
- </div>
30
- <div id="main">
31
- <%%= yield %>
32
- <div id="footer">
33
- <div class="block">
34
- <p>Copyright &copy; <%%= Time.now.year %> Your Site - Powered by <a href="http://padrino.github.com" target="_blank">Padrino v.<%%= Padrino.version %>.</a></p>
35
- </div>
36
- </div>
37
- </div>
38
- <div id="sidebar">
39
- <%%= yield_content :sidebar %>
40
- </div>
41
- </div>
42
- </div>
43
- </body>
44
- </html>
@@ -1,56 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2
- <html xmlns="http://www.w3.org/1999/xhtml" lang="en">
3
- <head>
4
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5
- <title><%= options[:name] %></title>
6
- <%%= stylesheet_link_tag :base, "themes/<%= options[:theme] %>/style" %>
7
- </head>
8
- <body>
9
- <div id="container">
10
- <div id="box">
11
- <h1><%= options[:name] %></h1>
12
- <div class="block" id="block-login">
13
- <h2>Login Box</h2>
14
- <div class="content login">
15
- <div class="flash">
16
- <%%= [:error, :warning, :notice].map { |type| flash_tag(type, :class => "message #{type}") }.join %>
17
- </div>
18
- <%% form_tag(url(:sessions, :create), :class => 'form login') do %>
19
- <div class="group wat-cf">
20
- <div class="left">
21
- <label class="label right">Login</label>
22
- </div>
23
- <div class="right">
24
- <%%= text_field_tag :email, :value => params[:email], :class => 'text_field' %>
25
- </div>
26
- </div>
27
- <div class="group wat-cf">
28
- <div class="left">
29
- <label class="label right">Password</label>
30
- </div>
31
- <div class="right">
32
- <%%= password_field_tag :password, :value => params[:password], :class => 'text_field' %>
33
- </div>
34
- </div>
35
- <%% if Padrino.env == :development %>
36
- <div class="group wat-cf">
37
- <div class="left">
38
- <label class="label right">Bypass login?</label>
39
- </div>
40
- <div class="right">
41
- <%%= check_box_tag :bypass %>
42
- </div>
43
- </div>
44
- <%% end %>
45
- <div class="group navform wat-cf">
46
- <div class="right">
47
- <%%= submit_tag "Sign in", :class => :button %>
48
- </div>
49
- </div>
50
- <%% end %>
51
- </div>
52
- </div>
53
- </div>
54
- </div>
55
- </body>
56
- </html>
@@ -1,11 +0,0 @@
1
- <% @orm.column_fields.each do |column| -%>
2
- <div class="group">
3
- <%%= f.label :<%= column[:name] %> %><%%= f.error_message_on :<%= column[:name] %> %>
4
- <%%= f.<%= column[:field_type] %> :<%= column[:name] %>, :class => :<%= column[:field_type] %> %>
5
- <span class="description">Ex: a simple text</span>
6
- </div>
7
- <% end %>
8
- <div class="group navform wat-cf">
9
- <%%= f.submit pat(:save), :class => :button %>
10
- <%%= f.submit pat(:cancel), :onclick => "window.location='#{url(:<%= @orm.name_plural %>, :index)}';return false", :class => :button %>
11
- </div>
@@ -1,18 +0,0 @@
1
- <div class="block">
2
- <div class="secondary-navigation">
3
- <ul class="wat-cf">
4
- <li class="first"><%%= link_to pat(:list), url(:<%= @orm.name_plural %>, :index) %></li>
5
- <li><%%= link_to pat(:new), url(:<%= @orm.name_plural %>, :new) %></li>
6
- <li class="active"><%%= link_to pat(:edit), url(:<%= @orm.name_plural %>, :edit, :id => @<%= @orm.name_singular %>.id) %></li>
7
- </ul>
8
- </div>
9
- <div class="content">
10
- <h2 class="title"><%%= pat(:edit) %> <%% mt(:<%= @orm.name_singular %>) %></h2>
11
- <div class="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
- <%% end %>
15
- </div>
16
- </div>
17
- </div>
18
- <%% content_for :sidebar, partial("base/sidebar") %>
@@ -1,36 +0,0 @@
1
- <div class="block">
2
- <div class="secondary-navigation">
3
- <ul class="wat-cf">
4
- <li class="first active"><%%= link_to pat(:list), url(:<%= @orm.name_plural %>, :index) %></li>
5
- <li><%%= link_to pat(:new), url(:<%= @orm.name_plural %>, :new) %></li>
6
- </ul>
7
- </div>
8
- <div class="content">
9
- <h2 class="title"><%%= pat(:all) %> <%% mt(:<%= @orm.name_plural %>) %></h2>
10
- <div class="inner">
11
- <table class="table">
12
- <tr>
13
- <%- @orm.columns.each_with_index do |column, i| -%>
14
- <th<%= " class=\"first\"" if i==0 %>><%%= mat(:<%= @orm.name_singular %>, :<%= column.name %>) %></th>
15
- <%- end -%>
16
- <th class="last">&nbsp;</th>
17
- </tr>
18
- <%% @<%= @orm.name_plural %>.each do |<%= @orm.name_singular %>| %>
19
- <tr>
20
- <%- @orm.columns.each_with_index do |column, i| -%>
21
- <td<%= " class=\"first\"" if i==0 %>><%%= <%= @orm.name_singular %>.<%= column.name %> %></td>
22
- <%- end -%>
23
- <td class="last">
24
- <%%= button_to pat(:edit), url(:<%= @orm.name_plural %>, :edit, :id => <%= @orm.name_singular %>.id), :method => :get, :class => :button_to %> |
25
- <%%= button_to pat(:delete), url(:<%= @orm.name_plural %>, :destroy, :id => <%= @orm.name_singular %>.id), :method => :delete, :class => :button_to %>
26
- </td>
27
- </tr>
28
- <%% end %>
29
- </table>
30
- <div class="actions-bar wat-cf">
31
- <div class="actions"></div>
32
- </div>
33
- </div>
34
- </div>
35
- </div>
36
- <%% content_for :sidebar, partial("base/sidebar") %>
@@ -1,17 +0,0 @@
1
- <div class="block">
2
- <div class="secondary-navigation">
3
- <ul class="wat-cf">
4
- <li class="first"><%%= link_to pat(:list), url(:<%= @orm.name_plural %>, :index) %></li>
5
- <li class="active"><%%= link_to pat(:new), url(:<%= @orm.name_plural %>, :new) %></li>
6
- </ul>
7
- </div>
8
- <div class="content">
9
- <h2 class="title"><%%= pat(:new) %> <%% mt(:<%= @orm.name_singular %>) %></h2>
10
- <div class="inner">
11
- <%% form_for :<%= @orm.name_singular %>, url(:<%= @orm.name_plural %>, :create), :class => :form do |f| %>
12
- <%%= partial "<%= @orm.name_plural %>/form", :locals => { :f => f } %>
13
- <%% end %>
14
- </div>
15
- </div>
16
- </div>
17
- <%% content_for :sidebar, partial("base/sidebar") %>