Mercurial > prosody-modules
comparison mod_http_muc_log/http_muc_log.html @ 3485:181561d0aae5
mod_http_muc_log: Add functionality for hiding joins and parts
For Guus
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 13 Mar 2019 22:47:08 +0100 |
parents | fed0a71a5e68 |
children | b5511c48c958 |
comparison
equal
deleted
inserted
replaced
3484:ce89fabb1f02 | 3485:181561d0aae5 |
---|---|
36 .description{font-size:smaller;} | 36 .description{font-size:smaller;} |
37 .body{white-space:pre-line;} | 37 .body{white-space:pre-line;} |
38 .body::before,.body::after{content:"";} | 38 .body::before,.body::after{content:"";} |
39 .presence .verb{font-style:normal;color:#30c030;} | 39 .presence .verb{font-style:normal;color:#30c030;} |
40 .unavailable .verb{color:#c03030;} | 40 .unavailable .verb{color:#c03030;} |
41 form{text-align:right} | |
41 </style> | 42 </style> |
42 </head> | 43 </head> |
43 <body> | 44 <body> |
44 <header> | 45 <header> |
45 <h1 title="xmpp:{jid?}">{title}</h1> | 46 <h1 title="xmpp:{jid?}">{title}</h1> |
46 <nav> | 47 <nav> |
47 <a href="xmpp:{jid?}?join">Join using a client</a>{links# | 48 <a href="xmpp:{jid?}?join">Join using a client</a>{links# |
48 <a class="{item.rel?}" href="{item.href}" rel="{item.rel?}">{item.text}</a>} | 49 <a class="{item.rel?}" href="{item.href}{hide_presence&?p=h}" rel="{item.rel?}">{item.text}</a>} |
49 </nav> | 50 </nav> |
50 </header> | 51 </header> |
51 <hr> | 52 <hr> |
52 <div class="content"> | 53 <div class="content"> |
53 <nav> | 54 <nav> |
54 <dl class="room-list"> | 55 <dl class="room-list"> |
55 {rooms# | 56 {rooms# |
56 <dt class="name"><a href="{item.href}">{item.name}</a></dt> | 57 <dt class="name"><a href="{item.href}{hide_presence&?p=h}">{item.name}</a></dt> |
57 <dd class="description">{item.description?}</dd>} | 58 <dd class="description">{item.description?}</dd>} |
58 </dl> | 59 </dl> |
59 {years# | 60 {years# |
60 <h2 id="{item.year}">{item.year}</h2> | 61 <h2 id="{item.year}">{item.year}</h2> |
61 {item.months# | 62 {item.months# |
62 <table id="{item.month}-{item.year}"> | 63 <table id="{item.month}-{item.year}"> |
63 <caption>{item.month}</caption> | 64 <caption>{item.month}</caption> |
64 <tr><th>Mon</th><th>Tue</th><th>Wed</th><th>Thu</th><th>Fri</th><th>Sat</th><th>Sun</th></tr>{item.weeks# | 65 <tr><th>Mon</th><th>Tue</th><th>Wed</th><th>Thu</th><th>Fri</th><th>Sat</th><th>Sun</th></tr>{item.weeks# |
65 <tr>{item.days#<td>{item.href&<a href="{item.href}">}{item.day? }{item.href&</a>}</td>}</tr>} | 66 <tr>{item.days#<td>{item.href&<a href="{item.href}{hide_presence&?p=h}">}{item.day? }{item.href&</a>}</td>}</tr>} |
66 </table> | 67 </table> |
67 } | 68 } |
68 } | 69 } |
69 </nav> | 70 </nav> |
71 | |
72 <div> | |
73 <form> | |
74 <label> | |
75 <input name="p" value="h" type="checkbox"{hide_presence& checked}> | |
76 <span>Hide joins and parts</span> | |
77 </label> | |
78 <noscript> | |
79 <button type="submit">Apply</button> | |
80 </noscript> | |
81 </form> | |
82 </div> | |
83 | |
70 <ol class="chat-logs">{lines# | 84 <ol class="chat-logs">{lines# |
71 <li class="{item.st_name} {item.st_type?}" id="{item.key}"> | 85 <li class="{item.st_name} {item.st_type?}" id="{item.key}"> |
72 <a class="time" href="#{item.key}"><time datetime="{item.datetime}">{item.time}</time></a> | 86 <a class="time" href="#{item.key}"><time datetime="{item.datetime}">{item.time}</time></a> |
73 <b class="nick">{item.nick}</b> | 87 <b class="nick">{item.nick}</b> |
74 <em class="verb">{item.verb?}</em> | 88 <em class="verb">{item.verb?}</em> |
77 </ol> | 91 </ol> |
78 </div> | 92 </div> |
79 <hr> | 93 <hr> |
80 <footer> | 94 <footer> |
81 <nav>{links# | 95 <nav>{links# |
82 <a class="{item.rel?}" href="{item.href}" rel="{item.rel?}">{item.text}</a>} | 96 <a class="{item.rel?}" href="{item.href}{hide_presence&?p=h}" rel="{item.rel?}">{item.text}</a>} |
83 </nav> | 97 </nav> |
84 <br> | 98 <br> |
85 <div class="powered-by">Prosody</div> | 99 <div class="powered-by">Prosody</div> |
86 </footer> | 100 </footer> |
87 <script> | 101 <script> |
97 date = new Date(date); | 111 date = new Date(date); |
98 tag.textContent = date.toLocaleTimeString(navigator.language); | 112 tag.textContent = date.toLocaleTimeString(navigator.language); |
99 tag.setAttribute("title", date.toString()); | 113 tag.setAttribute("title", date.toString()); |
100 } | 114 } |
101 } | 115 } |
116 document.forms[0].elements.p.addEventListener("change", function() { | |
117 document.forms[0].submit(); | |
118 }); | |
102 })(); | 119 })(); |
103 </script> | 120 </script> |
104 </body> | 121 </body> |
105 </html> | 122 </html> |