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