From 9f69dcb15802269ad2e5018aa0478016c0401d65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C4=93teris=20Caune?= Date: Thu, 2 May 2019 13:36:34 +0300 Subject: [PATCH] Show the Description section in Check Details screen even if the description is missing. Fixes #246 --- static/css/details.css | 4 ++++ static/js/details.js | 7 +++++++ templates/front/details.html | 14 ++++++++++---- templates/front/update_name_modal.html | 3 +++ 4 files changed, 24 insertions(+), 4 deletions(-) diff --git a/static/css/details.css b/static/css/details.css index 578372e4..030a833c 100644 --- a/static/css/details.css +++ b/static/css/details.css @@ -6,6 +6,10 @@ margin-bottom: 24px; } +#details-head h1 small { + font-size: 12px; +} + .details-block .status { font-size: 32px; width: 40px; diff --git a/static/js/details.js b/static/js/details.js index 6187ed75..b92192f2 100644 --- a/static/js/details.js +++ b/static/js/details.js @@ -6,6 +6,13 @@ $(function () { return false; }); + $("#edit-desc").click(function() { + $('#update-name-modal').modal("show"); + $("#update-desc-input").focus(); + + return false; + }); + $("#pause").click(function(e) { $("#pause-form").submit(); return false; diff --git a/templates/front/details.html b/templates/front/details.html index 74676335..44ef2ef9 100644 --- a/templates/front/details.html +++ b/templates/front/details.html @@ -10,7 +10,7 @@

{{ check.name_then_code }} - + (edit…)

{{ check.project }} {% for tag in check.tags_list %} @@ -27,13 +27,19 @@ {% endif %}
- {% if check.desc %}

Description

+ {% if check.desc %} {{ check.desc|linebreaks|urlize }} +
+ +
+ {% else %} + Add description… + {% endif %}
- {% endif %} -

How To Ping

diff --git a/templates/front/update_name_modal.html b/templates/front/update_name_modal.html index 52dca802..04956aa9 100644 --- a/templates/front/update_name_modal.html +++ b/templates/front/update_name_modal.html @@ -63,6 +63,9 @@ id="update-desc-input" class="form-control" rows="5" + placeholder="What's being monitored? +What to do when this check goes down? +Where to find more information?" name="desc">{{ check.desc }}