Sd fixes and responsive stuff (#151)
Diego Andrés

Diego Andrés commited on 2021-12-24 14:36:54
Showing 10 changed files, with 271 additions and 141 deletions.


* add consistency

Signed-off-by: Diego Andrés <diegoandres_cortes@outlook.com>

* Fix copyright date

Signed-off-by: Diego Andrés <diegoandres_cortes@outlook.com>

* update sd version for plugins

Signed-off-by: Diego Andrés <diegoandres_cortes@outlook.com>

* use vertical-align instead

Signed-off-by: Diego Andrés <diegoandres_cortes@outlook.com>

* missing div

Signed-off-by: Diego Andrés <diegoandres_cortes@outlook.com>

* posting and ticket area enhancements

Signed-off-by: Diego Andrés <diegoandres_cortes@outlook.com>

* fix last modified

Signed-off-by: Diego Andrés <diegoandres_cortes@outlook.com>

* use amt for menu items

Signed-off-by: Diego Andrés <diegoandres_cortes@outlook.com>

* responsive stuff and fixes

Signed-off-by: Diego Andrés <diegoandres_cortes@outlook.com>

* responsive stuff and fixes

Signed-off-by: Diego Andrés <diegoandres_cortes@outlook.com>

* weird spaces

Signed-off-by: Diego Andrés <diegoandres_cortes@outlook.com>

* include responsive file

Signed-off-by: Diego Andrés <diegoandres_cortes@outlook.com>

* update files

Signed-off-by: Diego Andrés <diegoandres_cortes@outlook.com>
... ...
@@ -83,6 +83,7 @@ span.shd_new_tickets {
83 83
 
84 84
 .shd_smallicon {
85 85
 	max-width: initial;
86
+	vertical-align: middle;
86 87
 }
87 88
 
88 89
 /* The page index color looks ugly with our theme. */
... ...
@@ -105,19 +106,22 @@ h3.ticketheader img {
105 106
 	margin-right: 2px;
106 107
 }
107 108
 
109
+#ticket img {
110
+	vertical-align: middle;
111
+}
112
+
108 113
 /* Ticket details (Left-floated box) */
109 114
 .shd_ticket_side_column {
110
-	float: left;
111 115
 	width: 23%;
112
-	padding: 0 5px 5px 5px;
116
+	padding: 0;
113 117
 }
114 118
 .shd_ticketdetails {
115 119
 	overflow: auto;
116 120
 	float: left;
117 121
 	width: 100%;
118 122
 }
119
-.shd_ticketdetails .shd_smallicon {
120
-	padding-top: 7px;
123
+.shd_ticketdetails img.shd_smallicon {
124
+	vertical-align: middle;
121 125
 }
122 126
 .shd_customfields {
123 127
 	width: 66%;
... ...
@@ -139,15 +143,23 @@ form#postmodify .shd_ticket_roundframe {
139 143
 }
140 144
 .shd_ticket {
141 145
 	min-height: 250px;
146
+	display: flex;
147
+	gap: 20px;
142 148
 }
143 149
 .shd_ticket_description {
144
-	margin-left: 23%;
150
+	flex-grow: 2;
145 151
 }
146 152
 
147 153
 #shd_ticket_text {
148 154
 	min-height: 100px;
149 155
 }
150 156
 
157
+.sd_lower_columns {
158
+	display: flex;
159
+	margin: 15px 0 5px;
160
+	gap: 15px;
161
+}
162
+
151 163
 /* The left column in the ticket display */
152 164
 .shd_ticket_leftcolumn {
153 165
 	width: 25%;
... ...
@@ -159,6 +171,13 @@ form#postmodify .shd_ticket_roundframe {
159 171
 .shd_ticket_rightcolumn {
160 172
 	width: 75%;
161 173
 }
174
+/* Notif preferences */
175
+.sd_notif_element:not(:last-child, :first-child),
176
+.sd_notif_element:first-child:not(:last-child) {
177
+	border-bottom: 1px solid #ccc;
178
+	padding-bottom: 10px;
179
+	margin-bottom: 5px;
180
+}
162 181
 
163 182
 /* The Respond, Edit, Delete etc links */
164 183
 .shd_ticketlinks a {
... ...
@@ -296,10 +315,23 @@ form#postmodify .shd_ticket_roundframe {
296 315
 /**********************************
297 316
 * Ticket replies				 *
298 317
 ***********************************/
318
+.ticket_replies_container {
319
+	display: flex;
320
+	gap: 15px;
321
+	flex-wrap: wrap;
322
+}
323
+/* Something to keep it look good */
324
+#replies .ticket_replies_container:last-of-type {
325
+	border-bottom-left-radius: 0;
326
+	border-bottom-right-radius: 0;
327
+}
328
+.ticket_replies_container .postarea {
329
+	margin: 0;
330
+	flex-grow: 2;
331
+}
299 332
 .shd_posterinfo {
300 333
 	width: 14em;
301 334
 	text-align: center;
302
-	margin-left: 3px;
303 335
 	overflow: hidden;
304 336
 }
305 337
 .shd_postername {
... ...
@@ -313,8 +345,7 @@ form#postmodify .shd_ticket_roundframe {
313 345
 	max-width: 10.5em;
314 346
 }
315 347
 .shd_replyarea {
316
-	padding-left: 14em;
317
-	margin-left: 10px;
348
+	flex-grow: 2;
318 349
 }
319 350
 
320 351
 .shd_reply .avatar {
... ...
@@ -370,9 +401,6 @@ dl.settings dt.shd_cust_fields_largetext, .shd_cust_fields_largetext textarea {
370 401
 	margin-left: -8px;
371 402
 	margin-right: 3px;
372 403
 }
373
-.shd_attachmentcolumn {
374
-	margin-right: 20px;
375
-}
376 404
 .shd_thumb {
377 405
 	border: 0;
378 406
 	display: block;
... ...
@@ -501,12 +529,6 @@ dl.stats dd span, dl.stats dt span {
501 529
 	position: relative;
502 530
 }
503 531
 
504
-/* Something to keep it look good */
505
-#replies .windowbg:last-of-type {
506
-	border-bottom-left-radius: 0;
507
-	border-bottom-right-radius: 0;
508
-}
509
-
510 532
 /* Helpdesk table-width*/
511 533
 .shd_5 {
512 534
 	width: 5%;
... ...
@@ -530,22 +552,28 @@ dl.stats dd span, dl.stats dt span {
530 552
 	width: 75%;
531 553
 }
532 554
 
533
-/* Start of responsiveness */
534
-/* This will be moved to its file once it gets more work on it */
535
-@media (max-width: 480px) {
536
-	.shd_ticket_rightcolumn, .shd_ticket_leftcolumn {
537
-		width: 100%;
538
-		padding: 0;
555
+/* Unread */
556
+.sd_unread_title,
557
+.sd_unread_content {
558
+	display: flex;
559
+	min-height: 35px;
560
+	flex-wrap: wrap;
561
+	align-items: center;
562
+	padding: 0 4px;
539 563
 }
540
-	.shd_ticket_rightcolumn {
541
-		margin-top: 10px;
564
+.sd_unread_title span {
565
+	flex-basis: auto;
566
+	flex-grow: 1;
542 567
 }
543
-	.shd_profile_navigation {
544
-		margin-right: 0;
568
+.sd_unread_content span {
569
+	flex-basis: auto;
570
+	flex-shrink: 0;
571
+	flex-grow: 1;
545 572
 }
546
-	input[type="checkbox"]
547
-	{
548
-		height: 15px;
549
-		width: 15px;
573
+
574
+@media screen and (max-width: 991px) {
575
+	.sd_unread_title span:not(:nth-child(1), :nth-child(2), :nth-child(5)),
576
+	.sd_unread_content span:not(:nth-child(1), :nth-child(2), :nth-child(5)) {
577
+		display: none;
550 578
 	}
551 579
 }
552 580
\ No newline at end of file
... ...
@@ -0,0 +1,77 @@
1
+/* Start of responsiveness */
2
+/* This will be moved to its file once it gets more work on it */
3
+@media screen and (max-width: 991px) {
4
+	.shd_ticket {
5
+		flex-direction: column;
6
+	}
7
+	.shd_ticket_side_column,
8
+	.shd_ticket_description {
9
+		width: 100%;
10
+	}
11
+	.shd_ticketdetails dl,
12
+	.shd_ticketdetails ul {
13
+		display: flex;
14
+		flex-wrap: wrap;
15
+	}
16
+	.shd_ticketdetails dl dd,
17
+	.shd_ticketdetails dl dt {
18
+		flex-basis: 25%;
19
+		margin: 5px 0;
20
+	}
21
+	.shd_ticketdetails ul li {
22
+		flex-basis: 50%;
23
+		margin: 3px 0;
24
+	}
25
+
26
+	.ticket_replies_container {
27
+		flex-direction: column;
28
+	}
29
+	.ticket_replies_container > * {
30
+		width: 100%;
31
+	}
32
+	.shd_posterinfo {
33
+		text-align: revert;
34
+	}
35
+
36
+	.sd_lower_columns {
37
+		flex-direction: column;
38
+	}
39
+	.shd_ticket_rightcolumn, .shd_ticket_leftcolumn {
40
+		width: 100%;
41
+		padding: 0;
42
+	}
43
+	.shd_profile_navigation {
44
+		margin-right: 0;
45
+	}
46
+	.sd_lower_columns .shd_ticket_leftcolumn {
47
+		display: flex;
48
+		gap: 10px;
49
+	}
50
+	.sd_lower_columns .shd_ticket_leftcolumn .shd_attachmentcolumn {
51
+		flex-basis: 50%;
52
+	}
53
+		.shd_ticket_leftcolumn.floatleft {
54
+		display: none;
55
+		width: 100%;
56
+		float: none !important;
57
+	}
58
+}
59
+
60
+@media screen and (max-width: 480px) {
61
+	.shd_ticketdetails dl dd,
62
+	.shd_ticketdetails dl dt {
63
+		flex-basis: 50%;
64
+	}
65
+	.shd_ticketdetails ul li {
66
+		flex-basis: 100%;
67
+	}
68
+	.sd_lower_columns .shd_ticket_leftcolumn {
69
+		flex-direction: column;
70
+	}
71
+	.sd_lower_columns .shd_ticket_leftcolumn .shd_attachmentcolumn {
72
+		flex-basis: 100%;
73
+	}
74
+	.shd_ticket_leftcolumn {
75
+		width: 100%;
76
+	}
77
+}
... ...
@@ -32,6 +32,7 @@
32 32
 		<!-- css -->
33 33
 		<require-file name="css/helpdesk.css" destination="$themedir/css" />
34 34
 		<require-file name="css/helpdesk_admin.css" destination="$themedir/css" />
35
+		<require-file name="css/helpdesk_responsive.css" destination="$themedir/css" />
35 36
 		<require-file name="css/helpdesk_icons.css" destination="$themedir/css" />
36 37
 
37 38
 		<!-- scripts -->
... ...
@@ -99,7 +100,7 @@
99 100
 
100 101
 		<redirect url="?action=admin;area=helpdesk_info" />
101 102
 
102
-		<credits url="https://www.simpledesk.net" license="BSD 3-Clause" licenseurl="https://github.com/SimpleMachines/SimpleDesk/blob/master/license.txt" copyright="2010-2020">Simple Desk</credits>
103
+		<credits url="https://www.simpledesk.net" license="BSD 3-Clause" licenseurl="https://github.com/SimpleMachines/SimpleDesk/blob/master/license.txt" copyright="2010-2021">Simple Desk</credits>
103 104
 	</install>
104 105
 
105 106
 	<uninstall for="2.1 RC4, 2.1.0-2.1.99">
... ...
@@ -175,6 +176,7 @@
175 176
 		<!-- css, removed -->
176 177
 		<remove-file name="$themedir/css/helpdesk.css" />
177 178
 		<remove-file name="$themedir/css/helpdesk_admin.css" />
179
+		<remove-file name="$themedir/css/helpdesk_responsive.css" />
178 180
 		<remove-file name="$themedir/css/helpdesk_icons.css" />
179 181
 
180 182
 		<!-- bundled plugins removed (NOTE: done one by one to avoid eating existing plugins on upgrade) -->
... ...
@@ -55,7 +55,7 @@ function shdplugin_front_page()
55 55
 			'website' => 'https://www.simpledesk.net/',
56 56
 			'version' => '1.0.1',
57 57
 			'compatibility' => array(
58
-				'SimpleDesk 2.1 Beta 1', // should tie up with the SHD_VERSION constants
58
+				'SimpleDesk 2.1 RC1', // should tie up with the SHD_VERSION constants
59 59
 			),
60 60
 			'acp_url' => 'action=admin;area=helpdesk_options;sa=frontpage',
61 61
 		),
... ...
@@ -55,7 +55,7 @@ function shdplugin_stats()
55 55
 			'website' => 'https://www.simpledesk.net/',
56 56
 			'version' => '1.0',
57 57
 			'compatibility' => array(
58
-				'SimpleDesk 2.1 Beta 1', // should tie up with the SHD_VERSION constants
58
+				'SimpleDesk 2.1 RC1', // should tie up with the SHD_VERSION constants
59 59
 			),
60 60
 			'acp_url' => 'action=admin;area=helpdesk_options;sa=stats',
61 61
 		),
... ...
@@ -291,6 +291,7 @@ function shd_main()
291 291
 	$context['start'] = isset($_REQUEST['start']) ? $_REQUEST['start'] : 0;
292 292
 
293 293
 	loadCSSFile('helpdesk.css', array('minimize' => false, 'seed' => $context['shd_css_version']), 'helpdesk');
294
+	loadCSSFile('helpdesk_responsive.css', array('minimize' => false, 'seed' => $context['shd_css_version']), 'helpdesk_responsive');
294 295
 	loadJavascriptFile('helpdesk.js', array('defer' => false, 'minimize' => false), 'helpdesk');
295 296
 
296 297
 	// Custom settings?
... ...
@@ -112,7 +112,7 @@ function shd_init()
112 112
 	define('ROLEPERM_DENY', 2);
113 113
 
114 114
 	$context['shd_scripts_version'] = 'beta1';
115
-	$context['shd_css_version'] = 'beta1';
115
+	$context['shd_css_version'] = 'rc1';
116 116
 
117 117
 	// Load up developer stuff if we need to.
118 118
 	$context['shd_developer_mode'] = isset($modSettings['shd_developer_mode']);
... ...
@@ -302,6 +302,9 @@ function shd_get_active_tickets()
302 302
 {
303 303
 	global $modSettings, $user_info, $smcFunc, $context, $txt;
304 304
 
305
+	if (!$modSettings['helpdesk_active'] && SMF === 'SSI')
306
+		return 0;
307
+
305 308
 	if (empty($txt['shd_helpdesk'])) // provide a last-ditch fallback in the event we can't even find the file; SimpleDesk.{language}.php should be loaded by now (falling back to english if lang-specific doesn't exist)
306 309
 		$txt['shd_helpdesk'] = 'Helpdesk';
307 310
 
... ...
@@ -309,8 +312,8 @@ function shd_get_active_tickets()
309 312
 		return $txt['shd_helpdesk'];
310 313
 
311 314
 	// Have we already run on this page? If so we already have the answer.
312
-	if (!empty($context['active_tickets']))
313
-		return $txt['shd_helpdesk'] . $context['active_tickets'];
315
+	if (!empty($context['active_tickets_raw']))
316
+		return $context['active_tickets_raw'];
314 317
 
315 318
 	// Can we get it from the cache?
316 319
 	$temp = cache_get_data('shd_active_tickets_' . $user_info['id'], 180);
... ...
@@ -318,7 +321,7 @@ function shd_get_active_tickets()
318 321
 	{
319 322
 		list($context['active_tickets'], $context['active_tickets_raw']) = $temp;
320 323
 		$context['menu_buttons']['helpdesk']['alttitle'] = $txt['shd_helpdesk'] . !empty($context['active_tickets_raw']) ? (' [' . $context['active_tickets_raw'] . ']') : '';
321
-		return $txt['shd_helpdesk'] . $context['active_tickets'];
324
+		return $context['active_tickets_raw'];
322 325
 	}
323 326
 
324 327
 	shd_init();
... ...
@@ -351,7 +354,7 @@ function shd_get_active_tickets()
351 354
 
352 355
 	cache_put_data('shd_active_tickets_' . $user_info['id'], array($context['active_tickets'], $context['active_tickets_raw']), 120);
353 356
 
354
-	return $txt['shd_helpdesk'] . $context['active_tickets'];
357
+	return $context['active_tickets_raw'];
355 358
 }
356 359
 
357 360
 /**
... ...
@@ -1760,7 +1763,8 @@ function shd_main_menu(&$menu_buttons)
1760 1763
 		}
1761 1764
 
1762 1765
 		$menu_buttons['helpdesk'] += array(
1763
-			'title' => $modSettings['helpdesk_active'] && SMF != 'SSI' ? shd_get_active_tickets() : $txt['shd_helpdesk'],
1766
+			'title' => $txt['shd_helpdesk'],
1767
+			'amt' => shd_get_active_tickets(),
1764 1768
 			'href' => $scripturl . '?action=helpdesk;sa=main',
1765 1769
 			'show' => true,
1766 1770
 			'active_button' => false,
... ...
@@ -1914,7 +1918,8 @@ function shd_main_menu(&$menu_buttons)
1914 1918
 	if (!empty($modSettings['shd_helpdesk_only']))
1915 1919
 	{
1916 1920
 		$menu_buttons['home'] = array(
1917
-			'title' => $modSettings['helpdesk_active'] && SMF != 'SSI' ? shd_get_active_tickets() : $txt['shd_helpdesk'],
1921
+			'title' => $txt['shd_helpdesk'],
1922
+			'amt' => shd_get_active_tickets(),
1918 1923
 			'href' => $scripturl . '?action=helpdesk;sa=main',
1919 1924
 			'show' => $modSettings['helpdesk_active'],
1920 1925
 			'sub_buttons' => array(
... ...
@@ -50,22 +50,23 @@ function template_viewticket()
50 50
 				<img src="', $settings['default_images_url'], '/simpledesk/ticket.png" alt="x"> ', $txt['shd_ticket'], ' [', $context['ticket']['display_id'], ']
51 51
 			</h3>
52 52
 		</div>
53
-		<div class="windowbg noup">
53
+		<div class="windowbg noup shd_ticket">
54 54
 			<div class="shd_ticket_side_column">';
55 55
 
56 56
 			// General ticket details
57 57
 			echo '
58 58
 				<div class="shd_ticketdetails">
59
-					<strong><img src="', $settings['default_images_url'], '/simpledesk/details.png" alt="" class="shd_smallicon shd_icon_minihead"> ', $txt['shd_ticket_details'], '</strong>
59
+					<img src="', $settings['default_images_url'], '/simpledesk/details.png" alt="" class="shd_smallicon shd_icon_minihead"> 
60
+					<strong>', $txt['shd_ticket_details'], '</strong>
60 61
 					<hr>
61 62
 					<dl class="stats nobb">
62
-						<dt><span class="generic_icons inbox" title="', $txt['shd_ticket_id'], '"></span> ', $txt['shd_ticket_id'], ':</dt>
63
+						<dt><span class="main_icons inbox" title="', $txt['shd_ticket_id'], '"></span> ', $txt['shd_ticket_id'], ':</dt>
63 64
 						<dd>', $context['ticket']['display_id'], '</dd>
64 65
 
65
-						<dt><span class="generic_icons members" title="', $txt['shd_ticket_user'], '"></span> ', $txt['shd_ticket_user'], ':</dt>
66
+						<dt><span class="main_icons members" title="', $txt['shd_ticket_user'], '"></span> ', $txt['shd_ticket_user'], ':</dt>
66 67
 						<dd>', $context['ticket']['member']['link'], '</dd>
67 68
 
68
-						<dt><span class="generic_icons calendar" title="', $txt['shd_ticket_date'], '"></span> ', $txt['shd_ticket_date'], ':</dt>
69
+						<dt><span class="main_icons calendar" title="', $txt['shd_ticket_date'], '"></span> ', $txt['shd_ticket_date'], ':</dt>
69 70
 						<dd>', $context['ticket']['poster_time'], '</dd>
70 71
 
71 72
 						<dt><img src="', $settings['default_images_url'], '/simpledesk/urgency.png" alt="" class="shd_smallicon"> ', $txt['shd_ticket_urgency'], ':</dt>
... ...
@@ -73,16 +74,20 @@ function template_viewticket()
73 74
 							<span id="urgency_increase">', (!empty($context['ticket']['urgency']['increase']) ? '<a id="urglink_increase" href="' . $scripturl . '?action=helpdesk;sa=urgencychange;ticket=' . $context['ticket']['id'] . ';change=increase;' . $context['session_var'] . '=' . $context['session_id'] . '" title="' . $txt['shd_urgency_increase'] . '"><span class="generic_icons urgency_increase" title="' . $txt['shd_urgency_increase'] . '"></span></a>' : ''), '</span>
74 75
 							<span id="urgency_decrease">', (!empty($context['ticket']['urgency']['decrease']) ? '<a id="urglink_decrease" href="' . $scripturl . '?action=helpdesk;sa=urgencychange;ticket=' . $context['ticket']['id'] . ';change=decrease;' . $context['session_var'] . '=' . $context['session_id'] . '" title="' . $txt['shd_urgency_decrease'] . '"><span class="generic_icons urgency_decrease" title="' . $txt['shd_urgency_decrease'] . '"></span></a>' : ''), '</span>
75 76
 							<span id="urgency_button"></span>
76
-						</dd>
77
-						<dd class="shd_urgency_list">
77
+
78
+							<span class="shd_urgency_list">
78 79
 								<select id="urgency_list" class="hidden"></select>
80
+							</span>
79 81
 						</dd>
80 82
 
81 83
 						<dt><img src="', $settings['default_images_url'], '/simpledesk/staff.png" alt="" class="shd_smallicon"> ', $txt['shd_ticket_assignedto'], ':</dt>
82
-						<dd><span id="assigned_to">', $context['ticket']['assigned']['link'], '</span><span id="assigned_button"></span></dd>
83
-						<dt class="shd_assignees_list">
84
-							<ul id="assigned_list" class="hidden"></ul>
85
-						</dt>
84
+						<dd>
85
+							<span id="assigned_to">', $context['ticket']['assigned']['link'], '</span><span id="assigned_button"></span>
86
+							<div class="shd_assignees_list">
87
+								<ul id="assigned_list" class="hidden">
88
+								</ul>
89
+							</div>
90
+						</dd>
86 91
 
87 92
 						<dt><img src="', $settings['default_images_url'], '/simpledesk/status.png" alt="" class="shd_smallicon"> ', $txt['shd_ticket_status'], ':</dt>
88 93
 						<dd>', $context['ticket']['status']['label'], '</dd>
... ...
@@ -298,13 +303,14 @@ function template_viewticket()
298 303
 
299 304
 			echo '
300 305
 				</div>
301
-			</div>';
306
+			</div>
307
+			<div class="sd_lower_columns">';
302 308
 
303 309
 				// Left column (ticket relationships, attachments)
304 310
 				template_ticket_leftcolumn();
305 311
 
306 312
 		echo '
307
-		<div class="shd_ticket_rightcolumn floatleft"', empty($context['leftcolumndone']) ? ' style="width: 100%;"' : '', '>';
313
+				<div class="shd_ticket_rightcolumn"', empty($context['leftcolumndone']) ? ' style="width: 100%;"' : '', '>';
308 314
 
309 315
 			// Additional information (custom fields)
310 316
 			template_additional_fields();
... ...
@@ -316,6 +322,7 @@ function template_viewticket()
316 322
 			template_quickreply();
317 323
 
318 324
 			echo '
325
+				</div>
319 326
 			</div>';
320 327
 
321 328
 	// The ticket action log, lastly.
... ...
@@ -352,15 +359,17 @@ function template_ticket_leftcolumn()
352 359
 	$context['leftcolumndone'] = true; // for the rest of the template later
353 360
 
354 361
 	echo '
355
-		<br class="clear">
356
-		<div class="shd_ticket_leftcolumn floatleft">
357
-			<div class="shd_attachmentcolumn">';
362
+		<div class="shd_ticket_leftcolumn">';
358 363
 
359 364
 	foreach ($context['leftcolumn_templates'] as $template)
360
-		call_user_func('template_' . $template);
365
+	{
366
+		echo '
367
+		<div class="shd_attachmentcolumn">
368
+			', call_user_func('template_' . $template), '
369
+		</div>';
370
+	}
361 371
 
362 372
 	echo '
363
-			</div>
364 373
 		</div>';
365 374
 }
366 375
 
... ...
@@ -439,15 +448,14 @@ function template_viewnotifications()
439 448
 				<img src="', $settings['default_images_url'], '/simpledesk/log_notify.png" alt="">', $txt['shd_ticket_notify'], '
440 449
 			</h3>
441 450
 		</div>
442
-		<div class="information">';
443
-
444
-	$displayed_something = false;
451
+		<div class="information sd_notif_content">';
445 452
 
446 453
 	if (!$context['display_notifications']['is_ignoring'])
447 454
 	{
448 455
 		if (!$context['display_notifications']['is_monitoring'])
449 456
 		{
450
-			$displayed_something = true;
457
+			echo '
458
+				<div class="sd_notif_element">';
451 459
 			if (!empty($context['display_notifications']['preferences']))
452 460
 			{
453 461
 				echo '
... ...
@@ -462,23 +470,22 @@ function template_viewnotifications()
462 470
 					</ul>';
463 471
 			}
464 472
 			else
465
-				echo '
466
-					', $txt['shd_ticket_notify_noneprefs'];
473
+				echo $txt['shd_ticket_notify_noneprefs'];
467 474
 
468 475
 			if (!empty($context['display_notifications']['can_change']))
469 476
 				echo '
470 477
 					<form action="', $scripturl, '?action=profile;area=hd_prefs;u=', $context['user']['id'], '" method="post">
471 478
 						<input type="submit" value="', $txt['shd_ticket_notify_changeprefs'], '" class="button">
472 479
 					</form>';
480
+
481
+			echo '
482
+				</div>';
473 483
 		}
474 484
 
475 485
 		if (!empty($context['display_notifications']['can_monitor']))
476 486
 		{
477
-			if ($displayed_something)
478
-				echo '
479
-					<hr>';
480
-
481 487
 			echo '
488
+				<div class="sd_notif_element">
482 489
 					<form action="', $scripturl, '?action=helpdesk;sa=notify;ticket=', $context['ticket_id'], '" method="post">';
483 490
 
484 491
 			if (!$context['display_notifications']['is_monitoring'])
... ...
@@ -494,18 +501,16 @@ function template_viewnotifications()
494 501
 
495 502
 			echo '
496 503
 						<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '">
497
-					</form>';
498
-			$displayed_something = true;
504
+					</form>
505
+				</div>';
499 506
 		}
500 507
 	}
501 508
 
502 509
 	if (!empty($context['display_notifications']['can_ignore']) && !$context['display_notifications']['is_monitoring'])
503 510
 	{
504
-		if ($displayed_something)
505
-			echo '
506
-					<hr>';
507 511
 
508 512
 		echo '
513
+				<div class="sd_notif_element">
509 514
 					<form action="', $scripturl, '?action=helpdesk;sa=notify;ticket=', $context['ticket_id'], '" method="post">';
510 515
 
511 516
 		if (!$context['display_notifications']['is_ignoring'])
... ...
@@ -521,7 +526,8 @@ function template_viewnotifications()
521 526
 
522 527
 		echo '
523 528
 						<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '">
524
-					</form>';
529
+					</form>
530
+				</div>';
525 531
 	}
526 532
 
527 533
 	echo '
... ...
@@ -665,7 +671,7 @@ function template_inline_attachments($msg)
665 671
 	if (!empty($context['ticket_attach']['reply'][$msg]))
666 672
 	{
667 673
 		echo '
668
-							<table width="90%">';
674
+							<table width="100%">';
669 675
 
670 676
 		$count = 0;
671 677
 		$firstrow = true;
... ...
@@ -752,13 +758,14 @@ function template_viewreplies()
752 758
 					<a id="new"></a>';
753 759
 
754 760
 			echo '
755
-					<div class="', (!empty($context['ticket']['display_recycle']) && $reply['message_status'] == MSG_STATUS_DELETED ? ' errorbox ' : ''), 'windowbg" id="msg', $reply['id'], '">
756
-						<span class="floatleft shd_posterinfo">
761
+					<div class="ticket_replies_container', (!empty($context['ticket']['display_recycle']) && $reply['message_status'] == MSG_STATUS_DELETED ? ' errorbox' : ''), ' windowbg" id="msg', $reply['id'], '">
762
+						<span class="shd_posterinfo">
757 763
 							<strong class="shd_postername">
758 764
 								', $reply['member']['link'], '
759 765
 							</strong>
760 766
 							<br>
761
-							', $reply['member']['group'], '<br class="shd_groupmargin">';
767
+							', $reply['member']['group'], '
768
+							<br class="shd_groupmargin">';
762 769
 
763 770
 			if (!empty($modSettings['shd_display_avatar']) && empty($options['show_no_avatars']) && !empty($reply['member']['avatar']['image']))
764 771
 					echo '
... ...
@@ -767,10 +774,10 @@ function template_viewreplies()
767 774
 							</span>';
768 775
 
769 776
 			if ($modSettings['shd_staff_badge'] == (!empty($reply['is_staff']) ? 'staffbadge' : 'userbadge') || $modSettings['shd_staff_badge'] == 'bothbadge')
770
-				echo '<br>
777
+				echo '
771 778
 							', $reply['member']['group_icons'];
772 779
 			elseif (!empty($reply['is_staff']) && $modSettings['shd_staff_badge'] == 'nobadge')
773
-				echo '<br>
780
+				echo '
774 781
 							<img src="', $settings['default_images_url'] . '/simpledesk/staff.png" class="shd_smallicon" title="', $txt['shd_ticket_staff'], '" alt="', $txt['shd_ticket_staff'], '">';
775 782
 
776 783
 			echo '
... ...
@@ -840,31 +847,36 @@ function template_viewreplies()
840 847
 			}
841 848
 		}
842 849
 
843
-			if (!empty($settings['show_modify']) && !empty($reply['modified']))
850
+			if (!empty($modSettings['show_modify']) && !empty($reply['modified']))
844 851
 				echo '
845 852
 							<div class="smalltext shd_modified" style="margin-top:20px;">
846
-								&#171; <em>', $txt['last_edit'], ': ', $reply['modified']['time'], ' ', $txt['by'], ' ', $reply['modified']['link'], '</em> &#187;
853
+								&#171; <em>', sprintf($txt['last_edit_by'], $reply['modified']['time'], $reply['modified']['link']), '</em> &#187;
847 854
 							</div>';
848 855
 
849 856
 			template_inline_attachments($reply['id']);
850 857
 
851
-			echo '
852
-						</div>';
853
-
854 858
 			if (!empty($reply['ip_address']))
855 859
 				echo '
856
-						<span class="floatright"><img src="', $settings['default_images_url'], '/simpledesk/ip.png" alt="" class="shd_smallicon"> ', $txt['shd_ticket_ip'], ': ', $reply['ip_address'], '</span>';
860
+							<span class="floatright">
861
+								<img src="', $settings['default_images_url'], '/simpledesk/ip.png" alt="" class="shd_smallicon"> 
862
+								', $txt['shd_ticket_ip'], ': ', $reply['ip_address'], '
863
+							</span>';
857 864
 
858 865
 			echo '
859
-						<br>
866
+						</div>
860 867
 					</div>';
861 868
 		}
862 869
 	}
863 870
 
864 871
 	echo '
865 872
 			<div class="information">
866
-			<span class="floatleft"><a href="#replies" title="', $txt['shd_go_to_replies_start'], '"><img src="', $settings['default_images_url'], '/simpledesk/move_up.png" alt=""><img src="', $settings['default_images_url'], '/simpledesk/replies.png" alt=""></a></span>
873
+				<span class="floatleft">
874
+					<a href="#replies" title="', $txt['shd_go_to_replies_start'], '">
875
+						<img src="', $settings['default_images_url'], '/simpledesk/move_up.png" alt=""><img src="', $settings['default_images_url'], '/simpledesk/replies.png" alt="">
876
+					</a>
877
+				</span>
867 878
 				<span class="floatright smalltext">', $context['page_index'], '</span>
879
+			</div>
868 880
 		</div>';
869 881
 }
870 882
 
... ...
@@ -96,7 +96,8 @@ function template_ticket_info()
96 96
 	// General ticket details
97 97
 	echo '
98 98
 					<div class="shd_ticketdetails">
99
-						<strong><img src="', $settings['default_images_url'], '/simpledesk/details.png" alt="" class="shd_smallicon"> ', $txt['shd_ticket_details'], '</strong>
99
+						<img src="', $settings['default_images_url'], '/simpledesk/details.png" alt="" class="shd_smallicon">
100
+						<strong> ', $txt['shd_ticket_details'], '</strong>
100 101
 						<hr>
101 102
 						<ul class="reset">';
102 103
 
... ...
@@ -421,10 +422,10 @@ function template_ticket_content()
421 422
 						<hr><br>
422 423
 							', $context['ticket_form']['message'];
423 424
 
424
-	if (!empty($settings['show_modify']) && !empty($context['ticket']['modified']))
425
+	if (!empty($modSettings['show_modify']) && !empty($context['ticket']['modified']))
425 426
 		echo '
426 427
 						<div class="smalltext shd_modified" style="margin-top:20px;">
427
-							&#171; <em>', $txt['last_edit'], ': ', $context['ticket']['modified']['time'], ' ', $txt['by'], ' ', $context['ticket']['modified']['link'], '</em> &#187;
428
+							&#171; <em>', sprintf($txt['last_edit_by'], $context['ticket']['modified']['time'], $context['ticket']['modified']['link']), '</em> &#187;
428 429
 						</div>';
429 430
 }
430 431
 
... ...
@@ -487,19 +488,20 @@ function template_ticket_postbox()
487 488
 						<div id="shd_bbcbox"', ((empty($modSettings['shd_allow_ticket_bbc']) || !empty($context['shd_display'])) ? ' class="hidden"' : ''), '></div>
488 489
 						<div id="shd_smileybox"', ((empty($modSettings['shd_allow_ticket_smileys']) || !empty($context['shd_display'])) ? ' class="hidden"' : ''), '></div>';
489 490
 
490
-	if ($editor_context['width'] == ((int) $editor_context['width']) . '%')
491
-	{
492
-		$width = round(((int) $editor_context['width']) / 0.988, 1);
493
-		echo '
494
-						<div style="width: ', $width, '%;">';
491
+	// The editor doesn't go out of bounce, I don't get it
492
+	// if ($editor_context['width'] == ((int) $editor_context['width']) . '%')
493
+	// {
494
+	// 	$width = round(((int) $editor_context['width']) / 0.988, 1);
495
+	// 	echo '
496
+	// 					<div style="width: ', $width, '%;">';
495 497
 
496
-		template_control_richedit($context['post_box_name'], true, true);
498
+	// 	template_control_richedit($context['post_box_name'], true, true);
497 499
 
498
-		echo '
499
-						</div>';
500
-	}
501
-	// Editor width isn't proportional, presumably we don't care.
502
-	else
500
+	// 	echo '
501
+	// 					</div>';
502
+	// }
503
+	// // Editor width isn't proportional, presumably we don't care.
504
+	// else
503 505
 		template_control_richedit($context['post_box_name'], true, true);
504 506
 
505 507
 	// Custom fields
... ...
@@ -555,12 +557,12 @@ function template_ticket_cannedreplies()
555 557
 
556 558
 function template_ticket_footer()
557 559
 {
558
-	global $settings, $context, $txt;
560
+	global $settings, $context, $txt, $modSettings;
559 561
 
560
-	if (!empty($settings['show_modify']) && !empty($context['ticket_form']['modified']))
562
+	if (!empty($modSettings['show_modify']) && !empty($context['ticket_form']['modified']))
561 563
 		echo '
562 564
 						<div class="smalltext shd_modified">
563
-							&#171; <em>', $txt['last_edit'], ': ', $context['ticket_form']['modified']['time'], ' ', $txt['by'], ' ', $context['ticket_form']['modified']['link'], '</em> &#187;
565
+							&#171; <em>', sprintf($txt['last_edit_by'], $context['ticket']['modified']['time'], $context['ticket']['modified']['link']), '</em> &#187;
564 566
 						</div>';
565 567
 
566 568
 	echo '
... ...
@@ -796,20 +798,24 @@ function template_ticket_do_single_reply($reply)
796 798
 	global $context, $modSettings, $settings, $options, $scripturl, $txt;
797 799
 
798 800
 	echo '
799
-					<div class="windowbg" id="reply', $reply['id'], '">
800
-						<div class="poster">
801
-							<h4>', $reply['member']['link'], '</h4>
802
-									', $reply['member']['group'], '<br class="shd_groupmargin">';
801
+					<div class="windowbg ticket_replies_container" id="reply', $reply['id'], '">
802
+						<div class="shd_posterinfo">
803
+							<strong class="shd_postername">
804
+								', $reply['member']['link'], '
805
+							</strong>
806
+							<br>
807
+							', $reply['member']['group'], '
808
+							<br class="shd_groupmargin">';
803 809
 
804 810
 	if (!empty($modSettings['shd_display_avatar']) && empty($options['show_no_avatars']) && !empty($reply['member']['avatar']['image']))
805 811
 			echo '
806 812
 							', shd_profile_link($reply['member']['avatar']['image'], $reply['member']['id']);
807 813
 
808 814
 	if ($modSettings['shd_staff_badge'] == (!empty($reply['is_staff']) ? 'staffbadge' : 'userbadge') || $modSettings['shd_staff_badge'] == 'bothbadge')
809
-		echo '<br>
815
+		echo '
810 816
 							', $reply['member']['group_icons'];
811 817
 	elseif (!empty($reply['is_staff']) && $modSettings['shd_staff_badge'] == 'nobadge')
812
-		echo '<br>
818
+		echo '
813 819
 							<img src="', $settings['default_images_url'] . '/simpledesk/staff.png" class="shd_smallicon" title="', $txt['shd_ticket_staff'], '" alt="', $txt['shd_ticket_staff'], '">';
814 820
 
815 821
 	echo '
... ...
@@ -830,10 +836,10 @@ function template_ticket_do_single_reply($reply)
830 836
 							', $reply['body'], '
831 837
 							<br><br>';
832 838
 
833
-	if (!empty($settings['show_modify']) && !empty($reply['modified']))
839
+	if (!empty($modSettings['show_modify']) && !empty($reply['modified']))
834 840
 		echo '
835 841
 							<div class="smalltext shd_modified">
836
-								&#171; <em>', $txt['last_edit'], ': ', $reply['modified']['time'], ' ', $txt['by'], ' ', $reply['modified']['link'], '</em> &#187;
842
+								&#171; <em>', sprintf($txt['last_edit_by'], $reply['modified']['time'], $reply['modified']['link']), '</em> &#187;
837 843
 							</div>';
838 844
 
839 845
 	if (!empty($context['ticket_attach']['reply'][$reply['id']]))
... ...
@@ -852,14 +858,15 @@ function template_ticket_do_single_reply($reply)
852 858
 							</div>';
853 859
 	}
854 860
 
855
-	echo '
856
-						</div>';
857
-
858 861
 	if (!empty($context['can_see_ip']) && !empty($reply['ip_address']))
859 862
 		echo '
860
-						<span class="floatright"><img src="', $settings['default_images_url'], '/simpledesk/ip.png" alt="" class="shd_smallicon"> ', $txt['shd_ticket_ip'], ': ', $reply['ip_address'], '</span>';
863
+							<span class="floatright">
864
+								<img src="', $settings['default_images_url'], '/simpledesk/ip.png" alt="" class="shd_smallicon"> 
865
+								', $txt['shd_ticket_ip'], ': ', $reply['ip_address'], '
866
+							</span>';
861 867
 
862 868
 	echo '
869
+						</div>
863 870
 						<br>
864 871
 					</div>';
865 872
 }
... ...
@@ -39,35 +39,33 @@ function template_shd_unread_below()
39 39
 				<span class="smalltext">(', count($context['shd_unread_info']) == 1 ? '1 ' . $txt['shd_count_ticket_1'] : count($context['shd_unread_info']) . ' ' . $txt['shd_count_tickets'], ')</span>
40 40
 			</h3>
41 41
 		</div>
42
-				<table class="table_grid">
43
-					<tr class="title_bar">
44
-						<td width="8%"><img src="', $settings['default_images_url'], '/simpledesk/ticket.png" class="shd_smallicon" alt=""> ', $txt['shd_ticket'], '</td>
45
-						<td width="15%">', $txt['shd_ticket_name'], '</td>
46
-						<td width="12%"><img src="', $settings['default_images_url'], '/simpledesk/user.png" class="shd_smallicon" alt=""> ', $txt['shd_ticket_started_by'], '</td>
47
-						<td width="7%">', $txt['shd_ticket_replies'], '</td>
48
-						<td width="17%"><img src="', $settings['default_images_url'], '/simpledesk/status.png" class="shd_smallicon" alt=""> ', $txt['shd_ticket_status'], '</td>
49
-						<td width="8%"><img src="', $settings['default_images_url'], '/simpledesk/urgency.png" class="shd_smallicon" alt=""> ', $txt['shd_ticket_urgency'], '</td>
50
-						<td width="22%"><img src="', $settings['default_images_url'], '/simpledesk/time.png" class="shd_smallicon" alt=""> ', $txt['shd_ticket_updated'], '</td>
51
-						</tr>';
42
+		<div class="title_bar sd_unread_title">
43
+			<span style="width: 8%;"><img src="', $settings['default_images_url'], '/simpledesk/ticket.png" class="shd_smallicon" alt=""> ', $txt['shd_ticket'], '</span>
44
+			<span style="width: 15%;">', $txt['shd_ticket_name'], '</span>
45
+			<span style="width: 12%;"><img src="', $settings['default_images_url'], '/simpledesk/user.png" class="shd_smallicon" alt=""> ', $txt['shd_ticket_started_by'], '</span>
46
+			<span style="width: 7%;">', $txt['shd_ticket_replies'], '</span>
47
+			<span style="width: 17%;"><img src="', $settings['default_images_url'], '/simpledesk/status.png" class="shd_smallicon" alt=""> ', $txt['shd_ticket_status'], '</span>
48
+			<span style="width: 8%;"><img src="', $settings['default_images_url'], '/simpledesk/urgency.png" class="shd_smallicon" alt=""> ', $txt['shd_ticket_urgency'], '</span>
49
+			<span style="width: 22%;"><img src="', $settings['default_images_url'], '/simpledesk/time.png" class="shd_smallicon" alt=""> ', $txt['shd_ticket_updated'], '</span>
50
+		</div>
51
+		<div class="sd_unread_content">';
52 52
 
53 53
 	if (empty($context['shd_unread_info']))
54 54
 		echo '
55
-					<tr class="windowbg">
56
-							<td colspan="7">', $txt['shd_error_no_tickets'], '</td>
57
-						</tr>';
55
+			<div class="windowbg">
56
+				<span>', $txt['shd_error_no_tickets'], '</span>
57
+			</div>';
58 58
 	else
59 59
 		foreach ($context['shd_unread_info'] as $ticket)
60 60
 			echo '
61
-					<tr class="windowbg">
62
-							<td width="4%" class="smalltext">', $ticket['id_ticket_display'], '</td>
63
-							<td class="smalltext"><a href="', $scripturl, '?action=helpdesk;sa=ticket;ticket=', $ticket['id_ticket'], '">', $ticket['subject'], '</a></td>
64
-							<td class="smalltext">', $ticket['ticket_starter'], '</td>
65
-							<td class="smalltext">', $ticket['num_replies'], '</td>
66
-							<td class="smalltext">', $txt['shd_status_' . $ticket['status']], '</td>
67
-							<td class="smalltext">', $txt['shd_urgency_' . $ticket['urgency']], '</td>
68
-							<td class="smalltext">', $ticket['updated'], '</td>
69
-						</tr>';
61
+			<span style="width: 8%;">', $ticket['id_ticket_display'], '</span>
62
+			<span class="smalltext" style="width: 15%;"><a href="', $scripturl, '?action=helpdesk;sa=ticket;ticket=', $ticket['id_ticket'], '">', $ticket['subject'], '</a></span>
63
+			<span class="smalltext" style="width: 12%;">', $ticket['ticket_starter'], '</span>
64
+			<span class="smalltext" style="width: 7%;">', $ticket['num_replies'], '</span>
65
+			<span class="smalltext" style="width: 17%;">', $txt['shd_status_' . $ticket['status']], '</span>
66
+			<span class="smalltext" style="width: 8%;">', $txt['shd_urgency_' . $ticket['urgency']], '</span>
67
+			<span class="smalltext" style="width: 22%;">', $ticket['updated'], '</span>';
70 68
 
71 69
 	echo '
72
-				</table>';
70
+		</div>';
73 71
 }
74 72
\ No newline at end of file
75 73