jessepeterson / margarita

Web frontend for reposado
The Unlicense
244 stars 40 forks source link

How to get Margarita to show Product ID too? #17

Closed MiqViq closed 11 years ago

MiqViq commented 11 years ago

Hi all,

I would like to see Product ID too on update details row.

I did try to modify html-template, margarita.py, margarita.js but all my edits are ignored, even after stopping and restarting Margarita. I assume that the custom webserver for Margarita hides/caches the view?

I would like to customize my view a little more but I do not know what files to mod...

-MiqViq

MiqViq commented 11 years ago

The great mystery is now resolved, I was editing wrong files...

The default view is easily customizable by tweaking these files: margarita/templates/margarita.html margarita/static/js/margarita.js

MiqViq commented 11 years ago

These were my modifications to show Product ID:s too:

margarita.html:

114     <th>Product Title</th>
115     <th>Version</th>
116     <th>Product ID</th>
117     <th>Post Date</th>

margarita.js:

214     product['version'] + '</td><td>' +
215     product['id'] + '</td><td>' +
216     product['PostDate'] + '</td>';
jessepeterson commented 11 years ago

Just so you know, the title attribute has been set on the update name. This means that in most browsers you can simply hover the cursor over the update name and the Product ID will show up.

MiqViq commented 11 years ago

You mean that Product ID should pop up when hovering over update name? I tested this on Safari with OS X 10.6 and 10.8, nothing happens. So I use my mod instead and get the ID without hovering or clickng.

jessepeterson commented 11 years ago

I'm sorry—I was looking at a development version I have. You're right—current Margarita doesn't have this functionality. I thought the td for the title had an HTML title attribute, but it does not.

jessepeterson commented 11 years ago

The newly merged MVC branch does now have the title attribute set on the update title. It shows the update ID. Further work is being done under #17 and #7 for for the description and the update ID, too.

jessepeterson commented 11 years ago

Margarita can now display update product description and ID. Thanks to @neographophobic for his contributions.