rename
This commit is contained in:
parent
1411440b97
commit
fd74784672
7 changed files with 63 additions and 44 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
*.pyc
|
41
config.jsonc
41
config.jsonc
|
@ -202,14 +202,6 @@
|
|||
"sort": true,
|
||||
"sortType": "title"
|
||||
},
|
||||
{
|
||||
"id": "archiveid",
|
||||
"title": "Archive ID",
|
||||
"type": "string",
|
||||
"columnWidth": 120,
|
||||
"find": true,
|
||||
"sort": true
|
||||
},
|
||||
{
|
||||
"id": "location",
|
||||
"title": "Location",
|
||||
|
@ -369,6 +361,13 @@
|
|||
"type": "text",
|
||||
"find": true
|
||||
},
|
||||
{
|
||||
"id": "links",
|
||||
"title": "Links",
|
||||
"type": ["string"],
|
||||
"columnWidth": 180,
|
||||
"find": true
|
||||
},
|
||||
{
|
||||
"id": "comments",
|
||||
"title": "Comments",
|
||||
|
@ -637,7 +636,7 @@
|
|||
displayed at the top of the screen. This title can be customized by adding
|
||||
"/static/js/getItemTitle.SITENAME.js".
|
||||
*/
|
||||
"itemTitleKeys": ["title", "director", "date"],
|
||||
"itemTitleKeys": ["title", "director", "year"],
|
||||
/*
|
||||
"itemViews" is an ordered list of available item views. Implemented views
|
||||
are "info", "documents", "player", "editor", "timeline", "clips", "map",
|
||||
|
@ -807,20 +806,20 @@
|
|||
the system (from).
|
||||
*/
|
||||
"site": {
|
||||
"description": "undercover research group video archive",
|
||||
"description": "Activist Media Proxy",
|
||||
"email": {
|
||||
// E-mail address in contact form (to)
|
||||
"contact": "contact@undercoverresearch.net",
|
||||
"footer": "-- \nundercover research group - http://undercoverresearch.net",
|
||||
"prefix": "undercover research group -",
|
||||
"contact": "amp@spc.org",
|
||||
"footer": "-- \nActivist Media Proxy - http://amp.0x2620.org",
|
||||
"prefix": "Activist Media Proxy -",
|
||||
// E-mail address uses by the system (from)
|
||||
"system": "system@undercoverresearch.net"
|
||||
"system": "system@amp.0x2620.org"
|
||||
},
|
||||
"https": false,
|
||||
"id": "urg",
|
||||
"name": "undercover research group",
|
||||
"id": "amp",
|
||||
"name": "Activist Media Proxy",
|
||||
"sendReferrer": true,
|
||||
"url": "urg.0x2620.org"
|
||||
"url": "amp.0x2620.org"
|
||||
},
|
||||
/*
|
||||
"sitePages" defines the sections of the main site dialog. If "news" is
|
||||
|
@ -913,7 +912,7 @@
|
|||
"clipColumns": 2,
|
||||
"columns": {
|
||||
"Colors": {
|
||||
"columns": ["title", "depositor", "collection", "language", "hue", "saturation", "brightness"],
|
||||
"columns": ["title", "depositor", "themes", "language", "hue", "saturation", "brightness"],
|
||||
"columnWidth": {}
|
||||
}
|
||||
},
|
||||
|
@ -947,13 +946,13 @@
|
|||
"find": {"conditions": [], "operator": "&"},
|
||||
"followPlayer": true,
|
||||
"help": "",
|
||||
"icons": "posters",
|
||||
"icons": "frames",
|
||||
"infoIconSize": 256,
|
||||
"item": "",
|
||||
"itemFind": "",
|
||||
"itemSort": [{"key": "position", "operator": "+"}],
|
||||
"itemView": "info",
|
||||
"listColumns": ["title", "depositor", "collection", "topic", "language", "duration"],
|
||||
"listColumns": ["title", "depositor", "themes", "topic", "language", "duration"],
|
||||
"listColumnWidth": {},
|
||||
"listSelection": [],
|
||||
"listSort": [{"key": "title", "operator": "+"}],
|
||||
|
@ -1021,7 +1020,7 @@
|
|||
"sidebarSize": 256,
|
||||
"text": "",
|
||||
"texts": {},
|
||||
"theme": "oxmedium",
|
||||
"theme": "oxlight",
|
||||
"updateAdvancedFindResults": false,
|
||||
"videoLoop": false,
|
||||
"videoMuted": false,
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
import os
|
||||
from os.path import join, abspath, basename, dirname
|
||||
|
||||
name = 'indymediauk'
|
||||
name = 'amp'
|
||||
base = abspath(dirname(__file__))
|
||||
os.chdir(base)
|
||||
|
||||
|
@ -12,7 +12,7 @@ for root, folders, files in os.walk(join(base, 'static')):
|
|||
src = join(root, f)
|
||||
target = src.replace(base, '/srv/pandora')
|
||||
rel_src = os.path.relpath(src, dirname(target))
|
||||
if os.path.exists(target):
|
||||
if os.path.exists(target) or os.path.islink(target):
|
||||
os.unlink(target)
|
||||
os.symlink(rel_src, target)
|
||||
|
||||
|
@ -48,7 +48,7 @@ for root, folders, files in os.walk(join(base, 'scripts')):
|
|||
src = join(root, f)
|
||||
target = src.replace(base, '/srv/pandora')
|
||||
rel_src = os.path.relpath(src, dirname(target))
|
||||
if os.path.exists(target):
|
||||
if os.path.exists(target) or os.path.islink(target):
|
||||
os.unlink(target)
|
||||
os.symlink(rel_src, target)
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ pandora.ui.home = function() {
|
|||
left: 0,
|
||||
top: 0,
|
||||
right: 0,
|
||||
bottom: '80px',
|
||||
bottom: '160px',
|
||||
width: window.innerWidth + 'px',
|
||||
margin: 'auto',
|
||||
cursor: 'pointer'
|
||||
|
@ -180,7 +180,7 @@ pandora.ui.home = function() {
|
|||
}
|
||||
}),
|
||||
$aboutButton = Ox.Button({
|
||||
title: Ox._('About {0}', [pandora.site.site.name]),
|
||||
title: Ox._('{0}', [pandora.site.site.name]),
|
||||
width: 156
|
||||
})
|
||||
.css({
|
|
@ -18,11 +18,16 @@ pandora.ui.infoView = function(data) {
|
|||
iconLeft = iconSize == 256 ? Math.floor((iconSize - iconWidth) / 2) : 0,
|
||||
borderRadius = ui.icons == 'posters' ? 0 : iconSize / 8,
|
||||
margin = 16,
|
||||
nameKeys = [
|
||||
'director', 'cinematographer', 'editor',
|
||||
'writer', 'producer', 'featuring'
|
||||
],
|
||||
listKeys = nameKeys.concat(['language', 'themes', 'groups']),
|
||||
nameKeys = pandora.site.itemKeys.filter(function(key) {
|
||||
return key.sortType == 'person';
|
||||
}).map(function(key) {
|
||||
return key.id;
|
||||
}),
|
||||
listKeys = pandora.site.itemKeys.filter(function(key) {
|
||||
return Ox.isArray(key.type);
|
||||
}).map(function(key){
|
||||
return key.id;
|
||||
}),
|
||||
posterKeys = nameKeys.concat(['title', 'date', 'collection']),
|
||||
statisticsWidth = 128,
|
||||
|
||||
|
@ -231,7 +236,7 @@ pandora.ui.infoView = function(data) {
|
|||
|
||||
// Groups ------------------------------------------------------------------
|
||||
|
||||
renderGroup(['location', 'date', 'language', 'format', 'archiveid']);
|
||||
renderGroup(['location', 'date', 'language', 'format']);
|
||||
|
||||
renderGroup([
|
||||
'director', 'cinematographer', 'editor',
|
||||
|
@ -240,6 +245,8 @@ pandora.ui.infoView = function(data) {
|
|||
|
||||
renderGroup(['themes']);
|
||||
|
||||
renderGroup(['links']);
|
||||
|
||||
// Summary -------------------------------------------------------------
|
||||
|
||||
if (canEdit || data.summary) {
|
||||
|
@ -253,12 +260,7 @@ pandora.ui.infoView = function(data) {
|
|||
clickLink: pandora.clickLink,
|
||||
collapseToEnd: false,
|
||||
editable: canEdit,
|
||||
format: function(value) {
|
||||
return value.replace(
|
||||
/<img src=/g,
|
||||
'<img style="float: left; max-width: 256px; max-height: 256px; margin: 0 16px 16px 0" src='
|
||||
);
|
||||
},
|
||||
format: imageCSS,
|
||||
maxHeight: Infinity,
|
||||
placeholder: formatLight(Ox._('No Summary')),
|
||||
tooltip: canEdit ? pandora.getEditTooltip() : '',
|
||||
|
@ -319,12 +321,7 @@ pandora.ui.infoView = function(data) {
|
|||
descriptions[key] = Ox.EditableContent({
|
||||
clickLink: pandora.clickLink,
|
||||
editable: canEdit,
|
||||
format: function(value) {
|
||||
return value.replace(
|
||||
/<img src=/g,
|
||||
'<img style="float: left; max-width: 256px; max-height: 256px; margin: 0 16px 16px 0" src='
|
||||
);
|
||||
},
|
||||
format: imageCSS,
|
||||
placeholder: formatLight(Ox._('No {0} Description', [Ox._(Ox.toTitleCase(key))])),
|
||||
tooltip: canEdit ? pandora.getEditTooltip() : '',
|
||||
type: 'textarea',
|
||||
|
@ -577,6 +574,11 @@ pandora.ui.infoView = function(data) {
|
|||
ret = value ? Ox.formatDate(value,
|
||||
['', '%Y', '%B %Y', '%B %e, %Y'][value.split('-').length]
|
||||
) : '';
|
||||
} else if (key == 'links') {
|
||||
ret = value.split(', ').map(function(link) {
|
||||
return '<a href="' + link + '">' + Ox.parseURL(link).host + '</a>';
|
||||
}).join(', ');
|
||||
return ret;
|
||||
} else if (listKeys.indexOf(key) > -1) {
|
||||
ret = value.split(', ');
|
||||
} else {
|
||||
|
@ -682,6 +684,23 @@ pandora.ui.infoView = function(data) {
|
|||
});
|
||||
}
|
||||
|
||||
function imageCSS(value) {
|
||||
var $html = $('<div>').html(value);
|
||||
$html.find('img').each(function(i, img) {
|
||||
var $img = $(img),
|
||||
css = {
|
||||
'max-width': '256px',
|
||||
'max-height': '256px',
|
||||
'margin': '0 16px 16px 0'
|
||||
};
|
||||
if (!$img.parents('figure').length) {
|
||||
css['float'] = 'left';
|
||||
}
|
||||
$img.css(css);
|
||||
});
|
||||
return $html.html();
|
||||
}
|
||||
|
||||
function renderGroup(keys) {
|
||||
var $element;
|
||||
if (canEdit || keys.filter(function(key) {
|
Binary file not shown.
Before Width: | Height: | Size: 67 KiB After Width: | Height: | Size: 5.9 KiB |
Binary file not shown.
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 7 KiB |
Loading…
Reference in a new issue