-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtemplates.app
165 lines (149 loc) · 3.61 KB
/
templates.app
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
module templates
imports templates-bootstrap
// imports admin/admin-ui
imports search
define main() {
var p : Project := null
main(p)
}
// define oldmain(project : Project) {
// includeCSS("tags.css")
// <div id="pagewrapper">
// <div id="header">
// mainheader(project)
// </div>
// <div id="content">
// messages()
// body()
// </div>
// </div>
// }
template main(project : Project) {
mainResponsive{
body()
}
}
template bmain(project : Project) {
mainResponsive(project){
elements
}
}
template bmain() {
mainResponsive{
elements
}
}
template analytics() {
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-12964403-1");
pageTracker._trackPageview();
} catch(err) {}
</script>
}
define body(){
"default body"
}
// define mainheader(project : Project) {
// if(securityContext.loggedIn) {
// block [class:="logo"] {
// navigate(root()){
// image("/images/logo.png")
// }
// }
// logout()
// } else {
// block [class:="logo"] {
// navigate(root()){
// image("/images/logo.png")
// }
// }
// login()
// }
//
// var query : String := "";
// block [class := "SearchBox"] {
// form {
// input(query)
// " "
// block [class := "LoginButton"] {
// submit("Search", doSearch())
// }
// }
// }
// block [class := "ProjectList"] {
// if(securityContext.loggedIn) {
// for(p : Project in securityContext.principal.projects) {
// if(p != project) {
// navigate(project(p)) {output(p.name)} rawoutput { " " }
// } else {
// output(p.name) rawoutput { " " }
// }
// }
// }
// }
// action doSearch() {
// if(project == null){
// return searchAllProjects(query);
// }else{
// return search(project,query);
// }
//
// }
// }
override ignore-access-control template errorTemplateInput(messages : List<String>){
elements()
for(ve: String in messages){
block[class:="Error"] {
output(ve)
}
}
}
override ignore-access-control template errorTemplateForm(messages : List<String>){
elements()
for(ve: String in messages){
block[class:="Error"] {
output(ve)
}
}
}
override ignore-access-control template errorTemplateAction(messages : List<String>){
elements()
for(ve: String in messages){
block[class:="Error"] {
output(ve)
}
}
}
// define template sidebarSeparator() {
// image("/images/sidebarSeparator.png")
// }
override page pagenotfound() {
title{ "YellowGrass.org - Page not found (404)" }
bmain{
pageHeader2{ "Page not found" }
par{
"Oops, that page does not exist." <br/>
"If I messed something up, please post an issue on " <a href="http://yellowgrass.org/project/YellowGrass">"my issue tracker"</a>"."
}
par{ "Thanks, YellowGrass" }
}
}
override page accessDenied() {
title{ "YellowGrass.org - Access Denied" }
bmain{
pageHeader2{ "You are not allowed to visit this page" }
par{
"Perhaps you arrived here by accident." <br/>
"Perhaps I made an error." <br/>
"Perhaps you just need to log in to view this page." <br/>
"Perhaps this item was removed." <br/>
"If not, stop harrassing me, or I will call the police!"
}
par{ " - YellowGrass - " }
}
}