rlayout 0.3.3 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +5 -1
- data/MIT-LICENSE +0 -0
- data/README +1 -1
- data/Rakefile +2 -2
- data/example/templates/simple/common.html.erb +0 -0
- data/example/templates/simple_mce/text_area.html.erb +0 -0
- data/example/templates/xhtml/common.html.erb +0 -0
- data/example/templates/xhtml/controlfooter.html.erb +0 -0
- data/example/templates/xhtml/controlheader.html.erb +0 -0
- data/example/templates/xhtml_mce/text_area.html.erb +0 -0
- data/lib/rlayout/layout.rb +2 -2
- data/lib/rlayout/template.rb +0 -0
- data/lib/rlayout.rb +0 -0
- data/lib/rlayout_controller.rb +0 -0
- data/lib/rlayout_layout.rb +0 -0
- data/lib/rlayout_template.rb +0 -0
- metadata +3 -8
- data/index.html +0 -51
- data/init.rb +0 -4
data/CHANGELOG
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
Changes in version 0.3.4 (2008-07-10)
|
2
|
+
-------------------------------------
|
3
|
+
support rails 2.1
|
4
|
+
|
1
5
|
Changes in version 0.3.3 (2008-06-23)
|
2
6
|
-------------------------------------
|
3
7
|
solve the duplicated render due to nest tag, such as password_tag use text_field_tag
|
@@ -41,4 +45,4 @@ add support of layout: false
|
|
41
45
|
|
42
46
|
Changes in version 0.1.0 (2008-05-6)
|
43
47
|
-------------------------------------
|
44
|
-
initial release
|
48
|
+
initial release
|
data/MIT-LICENSE
CHANGED
File without changes
|
data/README
CHANGED
data/Rakefile
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'rubygems'
|
2
2
|
require 'rake/gempackagetask'
|
3
3
|
PKG_NAME = "rlayout"
|
4
|
-
PKG_VERSION = "0.3.
|
4
|
+
PKG_VERSION = "0.3.4"
|
5
5
|
PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
|
6
6
|
PKG_FILES = FileList[
|
7
7
|
'[A-Z]*',
|
@@ -27,4 +27,4 @@ end
|
|
27
27
|
Rake::GemPackageTask.new(spec) do |pkg|
|
28
28
|
pkg.need_zip = true
|
29
29
|
pkg.need_tar = true
|
30
|
-
end
|
30
|
+
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/lib/rlayout/layout.rb
CHANGED
@@ -37,7 +37,7 @@ module Rlayout
|
|
37
37
|
end
|
38
38
|
|
39
39
|
if apply_layout?(template_with_options, options) && (layout = pick_layout(template_with_options, options))
|
40
|
-
assert_existence_of_template_file(layout)
|
40
|
+
#assert_existence_of_template_file(layout)
|
41
41
|
|
42
42
|
options = options.merge :layout => false if template_with_options
|
43
43
|
logger.info("Rendering template within #{layout}") if logger
|
@@ -54,4 +54,4 @@ module Rlayout
|
|
54
54
|
end
|
55
55
|
end
|
56
56
|
end
|
57
|
-
end
|
57
|
+
end
|
data/lib/rlayout/template.rb
CHANGED
File without changes
|
data/lib/rlayout.rb
CHANGED
File without changes
|
data/lib/rlayout_controller.rb
CHANGED
File without changes
|
data/lib/rlayout_layout.rb
CHANGED
File without changes
|
data/lib/rlayout_template.rb
CHANGED
File without changes
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rlayout
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Leon Li
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-
|
12
|
+
date: 2008-07-11 00:00:00 +08:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|
@@ -23,12 +23,7 @@ extra_rdoc_files: []
|
|
23
23
|
|
24
24
|
files:
|
25
25
|
- CHANGELOG
|
26
|
-
- example
|
27
|
-
- index.html
|
28
|
-
- init.rb
|
29
|
-
- lib
|
30
26
|
- MIT-LICENSE
|
31
|
-
- pkg
|
32
27
|
- Rakefile
|
33
28
|
- README
|
34
29
|
- lib/rlayout
|
@@ -71,7 +66,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
71
66
|
requirements: []
|
72
67
|
|
73
68
|
rubyforge_project: Rails Layout Extension
|
74
|
-
rubygems_version: 1.
|
69
|
+
rubygems_version: 1.1.1
|
75
70
|
signing_key:
|
76
71
|
specification_version: 2
|
77
72
|
summary: improve rails layout such as simplifying content_for usage and let erb file can determine layout
|
data/index.html
DELETED
@@ -1,51 +0,0 @@
|
|
1
|
-
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
2
|
-
<HTML>
|
3
|
-
<HEAD>
|
4
|
-
<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=gb2312">
|
5
|
-
<TITLE></TITLE>
|
6
|
-
<META NAME="GENERATOR" CONTENT="OpenOffice.org 2.2 (Win32)">
|
7
|
-
<META NAME="CREATED" CONTENT="20080617;9501531">
|
8
|
-
<META NAME="CHANGED" CONTENT="20080617;9511733">
|
9
|
-
<STYLE TYPE="text/css">
|
10
|
-
<!--
|
11
|
-
@page { size: 21cm 29.7cm; margin: 2cm }
|
12
|
-
P { margin-bottom: 0.21cm }
|
13
|
-
-->
|
14
|
-
</STYLE>
|
15
|
-
</HEAD>
|
16
|
-
<BODY LANG="zh-CN" DIR="LTR">
|
17
|
-
<P STYLE="margin-bottom: 0cm"><FONT FACE="Thorndale, serif"><SPAN LANG="en-US">Rails
|
18
|
-
Layout Extension, release 0.3.0 (Jun. 2008)<BR><BR>Feature<BR>=======<BR>1.
|
19
|
-
simplifying content_for usage by extracting key/value pair from
|
20
|
-
content_for data like YAML and setting them as content_for variables<BR>
|
21
|
-
</SPAN></FONT>��<FONT FACE="Thorndale, serif"><SPAN LANG="en-US">content_for</SPAN></FONT>��ʹ�ã���������<FONT FACE="Thorndale, serif"><SPAN LANG="en-US">YAML</SPAN></FONT>��<FONT FACE="Thorndale, serif"><SPAN LANG="en-US">key/value</SPAN></FONT>��ʽ����<FONT FACE="Thorndale, serif"><SPAN LANG="en-US">content_for</SPAN></FONT>����<FONT FACE="Thorndale, serif"><SPAN LANG="en-US"><BR>2.
|
22
|
-
let erb file can determine layout by changing the default behavior of
|
23
|
-
layout determining, just like java's sitemesh<BR>
|
24
|
-
</SPAN></FONT>ͨ���ı�Ĭ�ϵ�<FONT FACE="Thorndale, serif"><SPAN LANG="en-US">layout</SPAN></FONT>��ȡ��ʽ��ʹ<FONT FACE="Thorndale, serif"><SPAN LANG="en-US">erb</SPAN></FONT>Ҳ���Զ���<FONT FACE="Thorndale, serif"><SPAN LANG="en-US">layout</SPAN></FONT>������<FONT FACE="Thorndale, serif"><SPAN LANG="en-US">java</SPAN></FONT>��<FONT FACE="Thorndale, serif"><SPAN LANG="en-US">sitemesh<BR>3.
|
25
|
-
use controller method if helper method requested from erb not exists<BR>
|
26
|
-
ERB</SPAN></FONT>����<FONT FACE="Thorndale, serif"><SPAN LANG="en-US">helper</SPAN></FONT>�ķ��������ڣ����Զ�����<FONT FACE="Thorndale, serif"><SPAN LANG="en-US">controller</SPAN></FONT>�ķ���<FONT FACE="Thorndale, serif"><SPAN LANG="en-US"><BR>4.
|
27
|
-
support theme template for field tag<BR> </SPAN></FONT>֧��<FONT FACE="Thorndale, serif"><SPAN LANG="en-US">field
|
28
|
-
tag</SPAN></FONT>������ģ��<FONT FACE="Thorndale, serif"><SPAN LANG="en-US"><BR><BR>Setup<BR>=======<BR>1.
|
29
|
-
rlayout as gem<BR>put the following line into your rails initializer,
|
30
|
-
or bottom of
|
31
|
-
environment.rb<BR></SPAN></FONT>���������д���ӵ�<FONT FACE="Thorndale, serif"><SPAN LANG="en-US">rails</SPAN></FONT>��<FONT FACE="Thorndale, serif"><SPAN LANG="en-US">initializer</SPAN></FONT>�����<FONT FACE="Thorndale, serif"><SPAN LANG="en-US">environment.rb</SPAN></FONT>�����<FONT FACE="Thorndale, serif"><SPAN LANG="en-US"><BR>require
|
32
|
-
'rlayout'<BR><BR>2. rlayout as plugin<BR>nothing need to
|
33
|
-
do<BR></SPAN></FONT>����Ҫ��ʲô��<FONT FACE="Thorndale, serif"><SPAN LANG="en-US"><BR><BR>Usage<BR>=======<BR><BR>1.
|
34
|
-
simplifying content_for<BR><BR><% content_for :config do %><BR>title:
|
35
|
-
This is my title<BR>panel: This is my panel<BR><% end %> <BR><BR>that
|
36
|
-
will do the same thing as the following:<BR><BR><%- content_for
|
37
|
-
:title do -%><BR>This is my title<BR><%- end -%> <BR><%-
|
38
|
-
content_for :panel do -%><BR>This is my panel<BR><%- end -%>
|
39
|
-
<BR><BR>2. determining layout in erb file<BR><% content_for
|
40
|
-
:config do %><BR>#note</SPAN></FONT>��<FONT FACE="Thorndale, serif"><SPAN LANG="en-US">key
|
41
|
-
layout won't be transferred to a content_for variable, it is only
|
42
|
-
used to determine a view layout<BR>layout: happy<BR><% end %>
|
43
|
-
<BR><BR>3. use theme template of field tag<BR><BR>class
|
44
|
-
YourController<BR> form_theme :xhtml<BR>end<BR><BR>and see related
|
45
|
-
code in folder "example/templates", the theme can be
|
46
|
-
defined in tag with :theme, that will override theme definition in
|
47
|
-
controller<BR><BR>Copyright (c) 2008 Leon Li, released under the MIT
|
48
|
-
license<BR></SPAN></FONT><BR>
|
49
|
-
</P>
|
50
|
-
</BODY>
|
51
|
-
</HTML>
|
data/init.rb
DELETED