File: HeaderFooterParts.rb

package info (click to toggle)
amrita 1.0.2-4
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, lenny
  • size: 1,880 kB
  • ctags: 1,363
  • sloc: ruby: 9,159; xml: 978; makefile: 111
file content (30 lines) | stat: -rw-r--r-- 355 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#
# HeaderFooter.rb
#

class HeaderFooterParts < CKComponent
	include CKPartsMaker

	attr_accessor :title, :source

	def query
		hash = {}
		hash['source'] = source
		hash
	end

	def source
		unless @source
			"#@title\Page"
		else
			@source
		end
	end

	def sourcePage
		sp = page "SourcePage"
		sp.source = application.request['source']
		sp
	end
end