Browse Source

Adding update notification history icons and column in detail view

Alan Hardman 4 years ago
parent
commit
e3e72de8f7
3 changed files with 28 additions and 0 deletions
  1. 2 0
      app/dict/en.ini
  2. 6 0
      app/view/issues/single/history.html
  3. 20 0
      db/15.06.02.sql

+ 2 - 0
app/dict/en.ini

@@ -171,6 +171,8 @@ watchers=Watchers
 child_tasks=Child Tasks
 related_tasks=Related Tasks
 
+notifications_sent=Notifications sent
+notifications_not_sent=Notifications not sent
 a_changed={0} changed:
 a_changed_from_b_to_c={0} changed from {1} to {2}
 a_set_to_b={0} set to {1}

+ 6 - 0
app/view/issues/single/history.html

@@ -14,6 +14,12 @@
 					</false>
 				</check>
 				on {{ date("D, M j, Y \\a\\t g:ia", $this->utc2local(strtotime(@update.created_date))) }}
+				<check if="{{ @update.notify }}">
+					&ensp;<span class="glyphicon glyphicon-envelope text-success" title="{{ @dict.notifications_sent }}"></span>
+				</check>
+				<check if="{{ @update.notify === 0 }}">
+					&ensp;<span class="glyphicon glyphicon-envelope text-danger" title="{{ @dict.notifications_not_sent }}"></span>
+				</check>
 			</p>
 			<ul>
 				<repeat group="{{ @update.changes }}" value="{{ @change }}">

+ 20 - 0
db/15.06.02.sql

@@ -0,0 +1,20 @@
+# Update issue update detail view
+ALTER VIEW `issue_update_detail` AS (
+	select
+		`i`.`id` AS `id`,
+		`i`.`issue_id` AS `issue_id`,
+		`i`.`user_id` AS `user_id`,
+		`i`.`created_date` AS `created_date`,
+		`u`.`username` AS `user_username`,
+		`u`.`name` AS `user_name`,
+		`u`.`email` AS `user_email`,
+		`i`.`comment_id` AS `comment_id`,
+		`c`.`text` AS `comment_text`,
+		`i`.`notify` AS `notify`
+	from `issue_update` `i`
+		inner join `user` `u` on `i`.`user_id` = `u`.`id`
+		left join `issue_comment` `c` on `i`.`comment_id` = `c`.`id`
+);
+
+# Update Version
+UPDATE `config` SET `value` = '15.06.12' WHERE `attribute` = 'version';