Changeset 1250
- Timestamp:
- 09/26/07 07:49:52 (13 months ago)
- Location:
- PyLucidPlugins/DecodeUnicode
- Files:
-
- 1 added
- 2 modified
- 3 moved
-
DecodeUnicode.py (modified) (8 diffs)
-
DecodeUnicode_cfg.py (modified) (3 diffs)
-
internal_pages (added)
-
internal_pages/display.css (moved) (moved from PyLucidPlugins/DecodeUnicode/display.css)
-
internal_pages/display.html (moved) (moved from PyLucidPlugins/DecodeUnicode/display.html) (2 diffs)
-
internal_pages/select.html (moved) (moved from PyLucidPlugins/DecodeUnicode/select.html) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
PyLucidPlugins/DecodeUnicode/DecodeUnicode.py
r821 r1250 13 13 Last commit info: 14 14 ---------------------------------- 15 LastChangedDate: $LastChangedDate :$16 Revision.......: $Rev :$15 LastChangedDate: $LastChangedDate$ 16 Revision.......: $Rev$ 17 17 Author.........: $Author$ 18 18 """ … … 20 20 21 21 22 __version__="$Rev :$"22 __version__="$Rev$" 23 23 24 24 … … 30 30 31 31 32 from PyLucid.system.BaseModule import PyLucidBaseModule 33 34 35 36 37 class DecodeUnicode(PyLucidBaseModule): 32 from PyLucid.system.BasePlugin import PyLucidBasePlugin 33 34 35 class DecodeUnicode(PyLucidBasePlugin): 38 36 39 37 blocks = [ … … 186 184 187 185 def lucidTag(self): 188 #~ self.response.debug()189 190 186 self.block_select() 191 187 … … 201 197 202 198 context = { 203 "url": self.URLs. actionLink("display"),199 "url": self.URLs.methodLink("display"), 204 200 "selected_id": selected_id, 205 201 "blocks": block_data, 206 202 } 207 #~ self.page_msg(context) 208 self.templates.write("select", context) 203 self._render_template("select", context) 209 204 210 205 def display(self, function_info=None): … … 218 213 else: 219 214 try: 220 block_id = self.request. form["block"]215 block_id = self.request.POST["block"] 221 216 block_id = int(block_id) 222 217 except (KeyError, ValueError): … … 245 240 246 241 context = { 247 "back_url" : self.URLs. actionLink("display", back_id),242 "back_url" : self.URLs.methodLink("display", back_id), 248 243 "back_name" : self.blocks[back_id]["name"], 249 "next_url" : self.URLs. actionLink("display", next_id),244 "next_url" : self.URLs.methodLink("display", next_id), 250 245 "next_name" : self.blocks[next_id]["name"], 251 246 252 "url" : self.URLs. actionLink("display", block_id),247 "url" : self.URLs.methodLink("display", block_id), 253 248 "block_name": block["name"], 254 249 "ucHex": "%X" % block_range[0], # Für decodeunicode.org Link … … 259 254 "unidata_version": unicodedata.unidata_version, 260 255 } 261 #~ self.templates.write("display", context, debug=True) 262 self.templates.write("display", context, debug=False) 256 self._render_template("display", context) 263 257 264 258 def get_block_data(self, block): -
PyLucidPlugins/DecodeUnicode/DecodeUnicode_cfg.py
r637 r1250 14 14 # Module-Manager Daten 15 15 16 module_manager_data = {16 plugin_manager_data = { 17 17 "lucidTag" : { 18 18 "must_login" : False, … … 21 21 "name" : "select", 22 22 "description" : "select a unicode block range", 23 "template_engine" : "jinja",24 23 "markup" : None 25 24 }, … … 31 30 "name" : "display", 32 31 "description" : "display a unicode block range", 33 "template_engine" : "jinja",34 32 "markup" : None 35 33 }, -
PyLucidPlugins/DecodeUnicode/internal_pages/display.html
r821 r1250 1 {*2 Jinja Template3 <pre>{% debug %}</pre>4 *}5 6 1 <fieldset><legend>{{ range_hex1 }}-{{ range_hex2 }} - {{ block_name }}:</legend> 7 2 <p> … … 23 18 <th>unicode name</th> 24 19 </tr> 25 {% for row in block_data %} {% cycle rowclass through "odd", "even" %}26 <tr class="{ { rowclass }}">20 {% for row in block_data %} 21 <tr class="{% cycle 'odd' 'even' %}"> 27 22 <td>{{ row.id }}</td> 28 23 <td><strong>{{ row.char }}</strong></td> 29 24 <td title="Use in Python like this: >print u'{{ row.unicode }}'<">{{ row.unicode }}</td> 30 25 <td title="Use in Python like this: >print '{{ row.hex }}'<">{{ row.hex }}</td> 31 <td>{{ row.html|escape xml}}</td>26 <td>{{ row.html|escape }}</td> 32 27 <td> 33 28 <a name="{{ row.id }}"><a href="{{ url }}#{{ row.id }}" title="anchor to this char"> -
PyLucidPlugins/DecodeUnicode/internal_pages/select.html
r638 r1250 1 {*2 Jinja Template3 <pre>{% debug %}</pre>4 *}5 6 1 <fieldset><legend>Select a unicode block:</legend> 7 2 <label for="block">select a unicode block:</label> … … 9 4 <select name="block"> 10 5 {% for block in blocks %} 11 <option value="{{ block.id }}" {% if block.id equals selected_id %}selected="selected"{% endif%}>6 <option value="{{ block.id }}" {% ifequal block.id selected_id %}selected="selected"{% endifequal %}> 12 7 {{ block.id }} - {{ block.name }} 13 8 </option>
