]> git.llucax.com Git - software/sercom.git/blob - sercom/subcontrollers/misentregas/templates/diff.kid
Permitir pasar el el archivo de configuración por línea de comandos al tester.
[software/sercom.git] / sercom / subcontrollers / misentregas / templates / diff.kid
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2 <?python from sercom.model import Grupo, AlumnoInscripto ?>
3 <?python import os ?>
4 <html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#"
5     py:extends="'../../../templates/master.kid'">
6 <head>
7 <meta content="text/html; charset=utf-8" http-equiv="Content-Type" py:replace="''"/>
8 <LINK MEDIA="all" HREF="/tg_widgets/turbogears.widgets/sh/SyntaxHighlighter.css" TYPE="text/css" REL="stylesheet" />
9 <title>list</title>
10 </head>
11 <body>
12
13 <h1>Diferencias</h1>
14
15
16 <div py:for="info in zip.infolist()">
17         <?python
18         n, ext = os.path.splitext(info.filename)
19         if ext != ".diff":
20                 continue
21         ?>
22         <h3>${info.filename}</h3>
23         <textarea name="code" class="${ext[1:]}:collapse">${zip.read(info.filename)}</textarea>
24 </div>
25
26 <br/>
27 <a href="javascript:window.history.go(-1)">Volver</a>
28
29         <!-- Lo hago a mano para poder agregar un nuevo lenguaje. No se como hacerlo sino :S -->
30   <SCRIPT SRC="/tg_widgets/turbogears.widgets/sh/shCore.js" TYPE="text/javascript"></SCRIPT>
31         <SCRIPT SRC="/tg_widgets/turbogears.widgets/sh/shBrushPython.js" TYPE="text/javascript"></SCRIPT>
32         <SCRIPT SRC="/tg_widgets/turbogears.widgets/sh/shBrushXml.js" TYPE="text/javascript"></SCRIPT>
33         <script type="text/javascript">
34                 // <!-- Agrego soporte para DIFF que no tiene el widget -->
35                 dp.sh.Brushes.Diff = function() {
36                         var keywords =  '@@'
37
38                         this.regexList = [
39                                 { regex: new RegExp('^-.*', 'gm'), css: 'rojo' },
40                                 { regex: new RegExp('^@@.*', 'gm'), css: 'chunk' },
41                                 { regex: new RegExp('^\\+.*', 'gm'), css: 'verde' }
42                                 ];
43
44                                 this.CssClass = 'dp-diff';
45                 }
46                 dp.sh.Brushes.Diff.prototype    = new dp.sh.Highlighter();
47                 dp.sh.Brushes.Diff.Aliases = ['diff'];
48         </script>
49         <SCRIPT TYPE="text/javascript">dp.SyntaxHighlighter.HighlightAll('code');</SCRIPT>
50 </body>
51 </html>
52
53 <!-- vim: set et sw=4 sts=4 : -->