Use a HTML template instead of HTML embeded within python
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu Accomplishments Viewer |
Fix Committed
|
Medium
|
Marqin |
Bug Description
The point of this but is to clean up the _accomplishment
html = html + '<b><div style="somestyle">'
html = html + message
html = html + '</div>
html = html + caption
html = html + '</i></h2>'
This is not elegant. Editing the HTML code is super difficult, the outcome is not human-readable, and the code of _accomplishment
The ideal solution would be to use a separate .html template, which would look like this:
<b>
<div style="somestyle">
[MESSAGE]
</div>
</b>
<br/>
<h2> The caption is: <i> [CAPTION] </i> </h2>
Then, _accomplishment
This way the HTML would be significantly easier to maintain, and so would be _accomplishment
Related branches
- Rafał Cieślak: Approve
-
Diff: 666 lines (+403/-215)3 files modifiedChangelog (+3/-0)
accomplishments_viewer/AccomplishmentsViewerWindow.py (+236/-215)
data/html/trophy_details_template.html (+164/-0)
Changed in ubuntu-accomplishments-viewer: | |
status: | Triaged → In Progress |
Changed in ubuntu-accomplishments-viewer: | |
status: | In Progress → Fix Committed |
There will be: {MESSAGE_ DIV_STYLE} ">
<div style="
{MESSAGE}
</div>
and when there will be no purpose to show that div:
{MESSAGE_DIV_STYLE} will change into "display:none" ;)