27 """ |
27 """ |
28 super(FormSelectionDialog, self).__init__(parent) |
28 super(FormSelectionDialog, self).__init__(parent) |
29 self.setupUi(self) |
29 self.setupUi(self) |
30 |
30 |
31 self.__templates = { |
31 self.__templates = { |
32 "html5": [self.trUtf8("Standard HTML 5 template"), |
32 "html5": [ |
|
33 self.trUtf8("Standard HTML 5 template"), |
33 '''<!DOCTYPE html>\n''' |
34 '''<!DOCTYPE html>\n''' |
34 ''' <head>\n''' |
35 ''' <head>\n''' |
35 ''' <title></title>\n''' |
36 ''' <title></title>\n''' |
36 ''' <style>\n''' |
37 ''' <style>\n''' |
37 ''' </style>\n''' |
38 ''' </style>\n''' |
38 ''' </head>\n''' |
39 ''' </head>\n''' |
39 '''\n''' |
40 '''\n''' |
40 ''' <body>\n''' |
41 ''' <body>\n''' |
41 ''' </body>\n''' |
42 ''' </body>\n''' |
42 '''</html>\n''' |
43 '''</html>\n''' |
43 ], |
44 ], |
44 "simple": [self.trUtf8("Standard HTML template"), |
45 "simple": [ |
|
46 self.trUtf8("Standard HTML template"), |
45 '''<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"\n''' |
47 '''<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"\n''' |
46 ''' "http://www.w3.org/TR/html4/strict.dtd">\n''' |
48 ''' "http://www.w3.org/TR/html4/strict.dtd">\n''' |
47 ''' <head>\n''' |
49 ''' <head>\n''' |
48 ''' <title></title>\n''' |
50 ''' <title></title>\n''' |
49 ''' <style>\n''' |
51 ''' <style>\n''' |
51 ''' </head>\n''' |
53 ''' </head>\n''' |
52 '''\n''' |
54 '''\n''' |
53 ''' <body>\n''' |
55 ''' <body>\n''' |
54 ''' </body>\n''' |
56 ''' </body>\n''' |
55 '''</html>\n''' |
57 '''</html>\n''' |
56 ], |
58 ], |
57 "complex": [self.trUtf8("Chameleon template"), |
59 "complex": [ |
58 '''<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"\n''' |
60 self.trUtf8("Chameleon template"), |
|
61 '''<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0''' |
|
62 ''' Strict//EN"\n''' |
59 ''' "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\n''' |
63 ''' "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\n''' |
60 '''<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"\n''' |
64 '''<html xmlns="http://www.w3.org/1999/xhtml"''' |
|
65 ''' xml:lang="en"\n''' |
61 ''' xmlns:tal="http://xml.zope.org/namespaces/tal">\n''' |
66 ''' xmlns:tal="http://xml.zope.org/namespaces/tal">\n''' |
62 ''' xmlns:metal="http://xml.zope.org/namespaces/metal">\n''' |
67 ''' xmlns:metal="http://xml.zope.org/namespaces/''' |
|
68 '''metal">\n''' |
63 '''<head>\n''' |
69 '''<head>\n''' |
64 ''' <title>The Pyramid Web Application Development Framework</title>\n''' |
70 ''' <title>The Pyramid Web Application Development''' |
|
71 ''' Framework</title>\n''' |
65 ''' <meta http-equiv="Content-Type"\n''' |
72 ''' <meta http-equiv="Content-Type"\n''' |
66 ''' content="text/html;charset=UTF-8"/>\n''' |
73 ''' content="text/html;charset=UTF-8"/>\n''' |
67 ''' <meta name="keywords" content="python web application" />\n''' |
74 ''' <meta name="keywords" content="python web application"''' |
68 ''' <meta name="description" content="pyramid web application" />\n''' |
75 ''' />\n''' |
|
76 ''' <meta name="description" content="pyramid web''' |
|
77 ''' application" />\n''' |
69 ''' <link rel="shortcut icon"\n''' |
78 ''' <link rel="shortcut icon"\n''' |
70 ''' href="${request.static_url('site:static/favicon.ico')}" />\n''' |
79 ''' href="${request.static_url('site:static/''' |
|
80 '''favicon.ico')}" />\n''' |
71 ''' <link rel="stylesheet"\n''' |
81 ''' <link rel="stylesheet"\n''' |
72 ''' href="${request.static_url('site:static/pylons.css')}"\n''' |
82 ''' href="${request.static_url('site:static/''' |
|
83 '''pylons.css')}"\n''' |
73 ''' type="text/css" media="screen" charset="utf-8" />\n''' |
84 ''' type="text/css" media="screen" charset="utf-8" />\n''' |
74 ''' <link rel="stylesheet"\n''' |
85 ''' <link rel="stylesheet"\n''' |
75 ''' href="http://static.pylonsproject.org/fonts/nobile/stylesheet.css"\n''' |
86 ''' href="http://static.pylonsproject.org/fonts/nobile/''' |
|
87 '''stylesheet.css"\n''' |
76 ''' media="screen" />\n''' |
88 ''' media="screen" />\n''' |
77 ''' <link rel="stylesheet"\n''' |
89 ''' <link rel="stylesheet"\n''' |
78 ''' href="http://static.pylonsproject.org/fonts/neuton/stylesheet.css"\n''' |
90 ''' href="http://static.pylonsproject.org/fonts/neuton/''' |
|
91 '''stylesheet.css"\n''' |
79 ''' media="screen" />\n''' |
92 ''' media="screen" />\n''' |
80 ''' <!--[if lte IE 6]>\n''' |
93 ''' <!--[if lte IE 6]>\n''' |
81 ''' <link rel="stylesheet"\n''' |
94 ''' <link rel="stylesheet"\n''' |
82 ''' href="${request.static_url('site:static/ie6.css')}"\n''' |
95 ''' href="${request.static_url('site:static/ie6.css')}"\n''' |
83 ''' type="text/css" media="screen" charset="utf-8" />\n''' |
96 ''' type="text/css" media="screen" charset="utf-8" />\n''' |
91 ''' </div>\n''' |
104 ''' </div>\n''' |
92 ''' <div id="bottom">\n''' |
105 ''' <div id="bottom">\n''' |
93 ''' </div>\n''' |
106 ''' </div>\n''' |
94 ''' </div>\n''' |
107 ''' </div>\n''' |
95 ''' <div id="footer">\n''' |
108 ''' <div id="footer">\n''' |
96 ''' <div class="footer">© Copyright 2012, Somebody.</div>\n''' |
109 ''' <div class="footer">© Copyright 2012, Somebody.''' |
|
110 '''</div>\n''' |
97 ''' </div>\n''' |
111 ''' </div>\n''' |
98 '''</body>\n''' |
112 '''</body>\n''' |
99 '''</html>\n''' |
113 '''</html>\n''' |
100 ], |
114 ], |
101 "sections": [self.trUtf8("Mako template with sections"), |
115 "sections": [ |
|
116 self.trUtf8("Mako template with sections"), |
102 '''## -*- coding: utf-8 -*-\n''' |
117 '''## -*- coding: utf-8 -*-\n''' |
103 '''\n''' |
118 '''\n''' |
104 '''<!DOCTYPE html>\n''' |
119 '''<!DOCTYPE html>\n''' |
105 '''<html>\n''' |
120 '''<html>\n''' |
106 '''<head>\n''' |
121 '''<head>\n''' |
121 '''<%def name="title()">SimpleSite</%def>\n''' |
136 '''<%def name="title()">SimpleSite</%def>\n''' |
122 '''<%def name="head()"></%def>\n''' |
137 '''<%def name="head()"></%def>\n''' |
123 '''<%def name="header()"><a name="top"></a></%def>\n''' |
138 '''<%def name="header()"><a name="top"></a></%def>\n''' |
124 '''<%def name="tabs()"></%def>\n''' |
139 '''<%def name="tabs()"></%def>\n''' |
125 '''<%def name="menu()"></%def>\n''' |
140 '''<%def name="menu()"></%def>\n''' |
126 '''<%def name="heading()"><h1>${c.heading or 'No Title'}</h1></%def>\n''' |
141 '''<%def name="heading()"><h1>${c.heading or 'No Title'}''' |
|
142 '''</h1></%def>\n''' |
127 '''<%def name="breadcrumbs()"></%def>\n''' |
143 '''<%def name="breadcrumbs()"></%def>\n''' |
128 '''<%def name="footer()"><p><a href="#top">Top ^</a></p></%def>\n''' |
144 '''<%def name="footer()"><p><a href="#top">Top ^</a></p>''' |
129 ], |
145 '''</%def>\n''' |
|
146 ], |
130 } |
147 } |
131 |
148 |
132 self.__okButton = self.buttonBox.button(QDialogButtonBox.Ok) |
149 self.__okButton = self.buttonBox.button(QDialogButtonBox.Ok) |
133 self.__okButton.setEnabled(False) |
150 self.__okButton.setEnabled(False) |
134 |
151 |