Here is a patch that makes the Ticket details show up with the "draft"
background if the ticket is being previewed. The patch is against 0.9.3
but only touches the ticket.cs and ticket.css files so should be
applicable to most versions.
I hope this is useful to someone. It may not be the best solution to the
problem but it is a simple one.
Patch also attached to ticket #2888
Regards,
Felix
Index: htdocs/css/ticket.css
===================================================================
--- htdocs/css/ticket.css (revision 3025)
+++ htdocs/css/ticket.css (working copy)
@@ -5,6 +5,12 @@
#newticket #description { width: 100% }
#newticket #properties { width: 100% }
+#preview {
+ background: #f4f4f4 url(../draft.png);
+ margin: 1em 0 2em;
+ overflow: auto;
+}
+
#ticket {
background: #ffd;
border: 1px outset #996;
Index: templates/ticket.cs
===================================================================
--- templates/ticket.cs (revision 3025)
+++ templates/ticket.cs (working copy)
@@ -35,6 +35,7 @@
<div id="searchable">
<div id="ticket">
+<?cs if:args.preview=="Preview" ?><fieldset id="preview"><?cs /if ?>
<div class="date">
<p title="<?cs var:ticket.opened ?>">Opened <?cs var:ticket.opened_delta ?>
ago</p><?cs
if:ticket.lastmod ?>
@@ -74,6 +75,7 @@
<?cs if:ticket.description ?><div class="description">
<?cs var:ticket.description.formatted ?>
</div><?cs /if ?>
+<?cs if:args.preview=="Preview" ?></fieldset><?cs /if ?>
</div>
<?cs if:ticket.attach_href || len(ticket.attachments) ?>
_______________________________________________
Trac-dev mailing list
[email protected]
http://lists.edgewall.com/mailman/listinfo/trac-dev