| @@ -26,14 +26,27 @@ app.templates.notifInvalidLocation = -> · 25 unmodified lines |
| 26 | 26 | app.templates.notifNews = (news) -> |
| 27 | 27 | notif 'Changelog', """<div class="_notif-content _notif-news">#{app.templates.newsList(news, years: false)}</div>""" |
| 28 | 28 | |
| 29 | | −app.templates.notifUpdates = (docs) -> |
| 30 | | − html = """<ul class="_notif-content _notif-list">""" |
| 31 | | − for doc in docs |
| 32 | | − html += "<li>#{doc.name}" |
| 33 | | − html += " (#{doc.release})" if doc.release |
| 34 | | − html += "</li>" |
| 35 | | − html += "</ul>" |
| 36 | | − notif 'Updates', html |
| 29 | +app.templates.notifUpdates = (docs, disabledDocs) -> |
| 30 | + html = '<div class="_notif-content _notif-news">' |
| 31 | + |
| 32 | + if docs.length > 0 |
| 33 | + html += '<div class="_news-row">' |
| 34 | + html += '<ul class="_notif-list">' |
| 35 | + for doc in docs |
| 36 | + html += "<li>#{doc.name}" |
| 37 | + html += " <code>→</code> #{doc.release}" if doc.release |
| 38 | + html += '</ul></div>' |
| 39 | + |
| 40 | + if disabledDocs.length > 0 |
| 41 | + html += '<div class="_news-row"><p class="_news-title">Disabled:' |
| 42 | + html += '<ul class="_notif-list">' |
| 43 | + for doc in disabledDocs |
| 44 | + html += "<li>#{doc.name}" |
| 45 | + html += " <code>→</code> #{doc.release}" if doc.release |
| 46 | + html += """<span class="_notif-info"><a data-pick-docs>Enable</a></span>""" |
| 47 | + html += '</ul></div>' |
| 48 | + |
| 49 | + notif 'Updates', "#{html}</div>" |
| 37 | 50 | |
| 38 | 51 | app.templates.notifShare = -> |
| 39 | 52 | textNotif """ Hi there! """, |