Opened 16 years ago
Closed 15 years ago
#7803 closed enhancement (fixed)
Put attachment HTML code in own `div` tag
Reported by: | Owned by: | Christian Boos | |
---|---|---|---|
Priority: | low | Milestone: | 0.12 |
Component: | attachment | Version: | none |
Severity: | minor | Keywords: | attachment div |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
I wanted to change the look of the attachment sections on the wiki pages using CSS today. To my surprise I saw that the attachments are not put into an own div
tag, but just placed after the wikipage searchable
div using h3
and a ul
list:
<h3>Attachments</h3> <ul> ... </ul>
instead it should look like this:
<div id="attachments"> <h3>Attachments</h3> <ul> ... </ul> </div>
While this is a minor thing it also shouldn't take much to change it in the source code.
Attachments (0)
Change History (7)
comment:1 by , 16 years ago
Component: | web frontend → attachment |
---|---|
Milestone: | → 0.12 |
Owner: | set to |
comment:2 by , 16 years ago
While you're at it, you could move the attachment snippets outside of macros.html and make it includable (related to #6374).
comment:3 by , 15 years ago
Simon, will you be able to do that for 0.12? If not, please move to a later milestone.
comment:4 by , 15 years ago
Milestone: | 0.12 → next-major-0.1X |
---|
comment:5 by , 15 years ago
With the recent changes that made attachments collapsible, the list of attachments now actually is in a <div>
, but the id="attachments"
is still in the inner <div>
. We could move the id
to the outer <div>
for 0.12?
comment:6 by , 15 years ago
Milestone: | next-major-0.1X → 0.12 |
---|---|
Owner: | changed from | to
Status: | new → assigned |
Like in:
-
trac/htdocs/css/trac.css
413 413 .attachment #preview { margin-top: 1em } 414 414 415 415 /* Styles for the list of attachments. */ 416 #attachments { border: 1px outset #996; padding: 1em }416 #attachments > div { border: 1px outset #996; padding: 1em } 417 417 #attachments .attachments { margin-left: 2em; padding: 0 } 418 418 #attachments dt { display: list-item; list-style: square; } 419 419 #attachments dd { font-style: italic; margin-left: 0; padding-left: 0; } -
trac/templates/macros.html
158 158 </i18n:msg> 159 159 </py:def> 160 160 <py:if test="alist.attachments or alist.can_create"> 161 <div py:choose="">161 <div id="attachments" py:choose=""> 162 162 <py:when test="compact and alist.attachments"> 163 163 <h3 class="${foldable and 'foldable' or None}">Attachments</h3> 164 164 <ul> … … 172 172 </py:when> 173 173 <py:when test="not compact"> 174 174 <h2 class="${foldable and 'foldable' or None}">Attachments</h2> 175 <div py:if="alist.attachments or alist.can_create" id="attachments">175 <div py:if="alist.attachments or alist.can_create"> 176 176 <dl py:if="alist.attachments" class="attachments"> 177 177 <py:for each="attachment in alist.attachments"> 178 178 <dt>${show_one_attachment(attachment)}</dt>
Seems to work.
comment:7 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Change above applied in [8794].
Makes sense, and same
id
as used for tickets. However, when looking at ticket page I see that the<H2>
there is actually outside the div. Would be best if they both used same strategy.I'll put it on my todo.