Add platform column to review queue (bug 669477)

This commit is contained in:
Gregory Koberger 2011-07-05 16:27:23 -07:00
Родитель 6b8d6cae59
Коммит 5cc27a63e7
3 изменённых файлов: 24 добавлений и 7 удалений

Просмотреть файл

@ -106,8 +106,10 @@ class EditorQueueTable(SQLTable):
flags = tables.Column(verbose_name=_lazy(u'Flags'), sortable=False)
applications = tables.Column(verbose_name=_lazy(u'Applications'),
sortable=False)
platforms = tables.Column(verbose_name=_lazy(u'Platforms'),
sortable=False)
additional_info = tables.Column(
verbose_name=_lazy(u'Additional Information'), sortable=False)
verbose_name=_lazy(u'Additional'), sortable=False)
def render_addon_name(self, row):
url = '%s?num=%s' % (reverse('editors.review',
@ -125,11 +127,6 @@ class EditorQueueTable(SQLTable):
info = []
if row.is_site_specific:
info.append(_lazy(u'Site Specific'))
if (len(row.file_platform_ids) == 1
and row.file_platform_ids != [amo.PLATFORM_ALL.id]):
k = row.file_platform_ids[0]
# L10n: first argument is the platform such as Linux, Mac OS X
info.append(_lazy(u'{0} only').format(amo.PLATFORMS[k].name))
if row.external_software:
info.append(_lazy(u'Requires External Software'))
if row.binary:
@ -142,6 +139,11 @@ class EditorQueueTable(SQLTable):
return u''.join([icon % (amo.APPS_ALL[i].short, amo.APPS_ALL[i].pretty)
for i in row.application_ids])
def render_platforms(self, row):
icon = u'<div class="platform-icon plat-sprite-%s" title="%s"></div>'
return u''.join([icon % (amo.PLATFORMS[i].shortname, amo.PLATFORMS[i].name)
for i in row.file_platform_ids])
def render_flags(self, row):
o = []

Просмотреть файл

@ -10,7 +10,7 @@
}
/* sprites for data grid icons */
.app-icon {
.app-icon, .platform-icon {
float: left;
margin-right: 4px;
background: url(../../img/developers/editor-sprite.png) no-repeat top left;
@ -26,6 +26,21 @@
.ed-sprite-thunderbird { background-position: 0 -563px; }
.ed-sprite-jetpack { background-position: 0 -629px; }
.ed-sprite-restartless { background-position: 0 -695px; }
.platform-icon {
background: url(../../img/developers/platforms.png) no-repeat top left;
}
.plat-sprite-all { background-position: 0 0; }
.plat-sprite-any { background-position: 0 0; }
.plat-sprite-allmobile { background-position: 0 -16px; }
.plat-sprite-linux { background-position: 0 -32px; }
.plat-sprite-mac { background-position: 0 -48px; }
.plat-sprite-bsd { background-position: 0 -64px; }
.plat-sprite-windows { background-position: 0 -80px; }
.plat-sprite-solaris { background-position: 0 -96px; }
.plat-sprite-android { background-position: 0 -112px; }
.plat-sprite-maemo { background-position: 0 -128px; }
.sort-icon {
background: url(../../img/developers/editor-sprite.png) no-repeat top left;
}

Двоичные данные
media/img/developers/platforms.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 7.4 KiB