Closed
Bug 658981
Opened 15 years ago
Closed 15 years ago
Admin Tool: Ensure Ability to Designate Featured Collages
Categories
(Websites :: webifyme.org, defect)
Websites
webifyme.org
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: tdickson, Assigned: smckinney)
References
Details
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0.1) Gecko/20100101 Firefox/4.0.1
Build Identifier:
Within the admin tool (documented in issue 654857) the ability to flag individual collages as featured needs to be created. This will allow site admins to do two things:
- push 3 most recent featured collages to the homepage area
- flag featured collages so they will be shown in the filtered Gallery for Featured collages
Reproducible: Always
Updated•15 years ago
|
Assignee: nobody → jbresnik
Updated•15 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Updated•15 years ago
|
Assignee: jbresnik → smckinney
Status: NEW → ASSIGNED
| Assignee | ||
Comment 1•15 years ago
|
||
Added in commits:
9b05c79377e996ffa10cfcb976fa05eff2f7638e
810bda64088e1b6d630a2c46f9b0cc9590c10d71
.. one commit space ..
d4428587b91983e1d6bd033efc326eae849bb0ad
DIFF, 9b05c79377e996ffa10cfcb976fa05eff2f7638e/810bda64088e1b6d630a2c46f9b0cc9590c10d71
diff --git a/ff4/templates_orig/admin/base_site.html b/ff4/templates_orig/admin/base_site.html
index 10c2dd3..8f087bf 100644
--- a/ff4/templates_orig/admin/base_site.html
+++ b/ff4/templates_orig/admin/base_site.html
@@ -1,10 +1,14 @@
{% extends "admin/base.html" %}
{% load i18n %}
-
+{% block extrastyle %}
+ <link href="/static/css/admin.css" type="text/css" rel="stylesheet"/>
+{% endblock %}
{% block title %}{% trans 'Webify :: Collage Browser' %}{% endblock %}
{% block branding %}
-<h1 id="site-name">{% trans 'Webify :: Collage Browser' %}</h1>
+<h1 id="site-name">{% trans 'Webify :: Collage Browser' %}</h1>
{% endblock %}
{% block nav-global %}{% endblock %}
+
+
diff --git a/ff4/things/admin.py b/ff4/things/admin.py
index 1b3eb76..57b131d 100644
--- a/ff4/things/admin.py
+++ b/ff4/things/admin.py
@@ -14,10 +14,12 @@ unfeature.short_description = "Make selected collages unfeatured"
class CollageAdmin(admin.ModelAdmin):
fields = ['filename','username','featured','in_gallery','background_img']
- list_display = ('filename','username','featured','in_gallery','background_img')
+ list_display = ('thumbnail_image','username','featured','in_gallery','background_img')
actions = [make_featured,unfeature]
admin.site.register(Collage,CollageAdmin)
+
+
diff --git a/ff4/things/models.py b/ff4/things/models.py
index b011056..76a6cd9 100644
--- a/ff4/things/models.py
+++ b/ff4/things/models.py
@@ -77,3 +77,12 @@ class Collage(models.Model):
return settings.SNAPSHOT_BASE_URL + self.filename[:2] + '/' + self.filename
return None
+ def thumbnail_image_path(self):
+ return self.snapshot_url()
+
+ #dunno if I should have a template for this. Might be overkill?
+ def thumbnail_image(self):
+ return '<img src="%s" class="thumb">' % self.thumbnail_image_path()
+
+ thumbnail_image.allow_tags = True
+
diff --git a/static/css/base.css b/static/css/base.css
index 471117b..ee4b7f8 100644
--- a/static/css/base.css
+++ b/static/css/base.css
@@ -1718,4 +1718,9 @@ line-height: 2.0em;
/* Fix clearfix: blueprintcss.lighthouseapp.com/projects/15318/tickets/5-extra-margin-padding-bottom-of-page */
.clearfix {
zoom: 1;
-}
\ No newline at end of file
+}
+
+.thumb{
+ width: 216px;
+ height: 162px;
+}
DIFF d4428587b91983e1d6bd033efc326eae849bb0ad
diff --git a/static/css/admin.css b/static/css/admin.css
new file mode 100644
index 0000000..d47a742
--- /dev/null
+++ b/static/css/admin.css
@@ -0,0 +1,4 @@
+.thumb{
+ width: 216px;
+ height: 162px;
+}
Comment 2•15 years ago
|
||
Stewart, if you would, please link to your commits in GitHub, rather than pasting the diff inline, here. Thanks!
| Assignee | ||
Comment 3•15 years ago
|
||
OK! No problem. Wasn't sure what the protocol was here; although in hindsight, pasting the diff inline does seem pretty silly.
Any feedback on this?
Setting to FIXED for stew
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•