From b24c27d1237ed97fb1cfab961ad5dab9b165ac20 Mon Sep 17 00:00:00 2001 From: tilly-Q Date: Tue, 13 May 2014 11:47:41 -0400 Subject: Added the new plugin I've been working at all summer at this link: https://gitorious.org/npigeons-mediagoblin/archivalook/source/6dbd68dab85650792456b8e24bbbd36a323c2018: --- .../archivalook/templates/archivalook/feature.html | 115 +++++++++++++++++++++ .../archivalook/feature_displays/audio_head.html | 5 + .../feature_displays/audio_primary.html | 54 ++++++++++ .../feature_displays/audio_secondary.html | 40 +++++++ .../feature_displays/default_primary.html | 30 ++++++ .../feature_displays/default_secondary.html | 34 ++++++ .../feature_displays/default_tertiary.html | 40 +++++++ .../feature_displays/image_primary.html | 33 ++++++ .../feature_displays/image_secondary.html | 39 +++++++ .../archivalook/feature_displays/video_head.html | 23 +++++ .../feature_displays/video_primary.html | 53 ++++++++++ .../feature_displays/video_secondary.html | 56 ++++++++++ .../archivalook/feature_media_sidebar.html | 55 ++++++++++ .../templates/archivalook/recent_media.html | 36 +++++++ .../archivalook/templates/archivalook/root.html | 79 ++++++++++++++ .../archivalook/utils/display_featured.html | 28 +++++ 16 files changed, 720 insertions(+) create mode 100644 mediagoblin/plugins/archivalook/templates/archivalook/feature.html create mode 100644 mediagoblin/plugins/archivalook/templates/archivalook/feature_displays/audio_head.html create mode 100644 mediagoblin/plugins/archivalook/templates/archivalook/feature_displays/audio_primary.html create mode 100644 mediagoblin/plugins/archivalook/templates/archivalook/feature_displays/audio_secondary.html create mode 100644 mediagoblin/plugins/archivalook/templates/archivalook/feature_displays/default_primary.html create mode 100644 mediagoblin/plugins/archivalook/templates/archivalook/feature_displays/default_secondary.html create mode 100644 mediagoblin/plugins/archivalook/templates/archivalook/feature_displays/default_tertiary.html create mode 100644 mediagoblin/plugins/archivalook/templates/archivalook/feature_displays/image_primary.html create mode 100644 mediagoblin/plugins/archivalook/templates/archivalook/feature_displays/image_secondary.html create mode 100644 mediagoblin/plugins/archivalook/templates/archivalook/feature_displays/video_head.html create mode 100644 mediagoblin/plugins/archivalook/templates/archivalook/feature_displays/video_primary.html create mode 100644 mediagoblin/plugins/archivalook/templates/archivalook/feature_displays/video_secondary.html create mode 100644 mediagoblin/plugins/archivalook/templates/archivalook/feature_media_sidebar.html create mode 100644 mediagoblin/plugins/archivalook/templates/archivalook/recent_media.html create mode 100644 mediagoblin/plugins/archivalook/templates/archivalook/root.html create mode 100644 mediagoblin/plugins/archivalook/templates/archivalook/utils/display_featured.html (limited to 'mediagoblin/plugins/archivalook/templates') diff --git a/mediagoblin/plugins/archivalook/templates/archivalook/feature.html b/mediagoblin/plugins/archivalook/templates/archivalook/feature.html new file mode 100644 index 00000000..6bcf792e --- /dev/null +++ b/mediagoblin/plugins/archivalook/templates/archivalook/feature.html @@ -0,0 +1,115 @@ +{# +# GNU MediaGoblin -- federated, autonomous media hosting +# Copyright (C) 2011, 2012 MediaGoblin contributors. See AUTHORS. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +#} +{% extends "mediagoblin/base.html" %} +{% import "/mediagoblin/utils/wtforms.html" as wtforms_util %} + +{%- block mediagoblin_head -%} + +{%- endblock mediagoblin_head %} + +{%- block mediagoblin_content %} + + +

{% trans %}How does this work?{% endtrans %}

+ {% trans %}How to feature media?{% endtrans -%} + +

+ {% trans %} + Go to the page of the media entry you want to feature. Copy it's URL and + then paste it into a new line in the text box above. There should be only + one url per line. The url that you paste into the text box should be under + the header describing how prominent a feature it will be (whether Primary, + Secondary, or Tertiary). Once all of the media that you want to feature are + inside the text box, click the Submit Query button, and your media should be + displayed on the front page. + {% endtrans %}

+ + + {%- trans %}Is there another way to manage featured media?{% endtrans %} + +

+ {% trans %} + Yes. If you would prefer, you may go to the media homepage of the piece + of media you would like to feature or unfeature and look at the bar to + the side of the media entry. If the piece of media has not been featured + yet you should see a button that says 'Feature'. Press that button and + the media will be featured as a Primary Feature at the top of the page. + All other featured media entries will remain as features, but will be + pushed further down the page.

+ + If you go to the media homepage of a piece of media that is currently + featured, you will see the options "Unfeature", "Promote" and "Demote" + where previously there was the button which said "Feature". Click + Unfeature and that media entry will no longer be displayed on the + front page, although you can feature it again at any point. Promote + moves the featured media higher up on the page and makes it more + prominent and Demote moves the featured media lower down and makes it + less prominent. + {% endtrans %}

+ + {% trans -%} + What is a Primary Feature? What is a Secondary Feature?{% endtrans -%} + +

+ {% trans %} + These categories just describe how prominent a feature will be on your + front page. Primary Features are placed at the top of the front page and are + much larger. Next are Secondary Features, which are slightly smaller. + Tertiary Features make up a grid at the bottom of the page.

+ + Primary Features also can display longer descriptions than Secondary + Features, and Secondary Features can display longer descriptions than + Tertiary Features.{% endtrans %}

+ + + {% trans %}How to decide what information is displayed when a media entry is + featured?{% endtrans %} +

+ {% trans %} + When a media entry is featured, the entry's title, it's thumbnail and a + portion of its description will be displayed on your website's front page. + The number of characters displayed varies on the prominence of the feature. + Primary Features display the first 512 characters of their description, + Secondary Features display the first 256 characters of their description, + and Tertiary Features display the first 128 characters of their description. + {% endtrans %} +

+ + {% trans -%} + How to unfeature a piece of media?{% endtrans -%} + +

+ {% trans %} + Unfeature a media by removing its line from the above textarea and then + pressing the Submit Query button. + {% endtrans %} +

+ + {% trans %}CAUTION:{% endtrans %} +

+ {% trans %} + When copying and pasting urls into the above text box, be aware that if + you make a typo, once you press Submit Query, your media entry will NOT be + featured. Make sure that all your intended Media Entries are featured. + {% endtrans %}

+{% endblock %} diff --git a/mediagoblin/plugins/archivalook/templates/archivalook/feature_displays/audio_head.html b/mediagoblin/plugins/archivalook/templates/archivalook/feature_displays/audio_head.html new file mode 100644 index 00000000..a53694b3 --- /dev/null +++ b/mediagoblin/plugins/archivalook/templates/archivalook/feature_displays/audio_head.html @@ -0,0 +1,5 @@ + + + diff --git a/mediagoblin/plugins/archivalook/templates/archivalook/feature_displays/audio_primary.html b/mediagoblin/plugins/archivalook/templates/archivalook/feature_displays/audio_primary.html new file mode 100644 index 00000000..aae3790d --- /dev/null +++ b/mediagoblin/plugins/archivalook/templates/archivalook/feature_displays/audio_primary.html @@ -0,0 +1,54 @@ +{# +# GNU MediaGoblin -- federated, autonomous media hosting +# Copyright (C) 2011, 2012 MediaGoblin contributors. See AUTHORS. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +#} + +{% from "archivalook/utils/display_featured.html" import + possibly_shortened_description %} + +{%- set media = feature.media_entry %} +{%- set entry_url = media.url_for_self(request.urlgen) %} + +
+ +

{{ media.title }}

+
+

+

+ {%- if 'spectrogram' in media.media_files %} +
+ Spectrogram +
+ {%- endif %} + +
+

+ {{ possibly_shortened_description(request, feature.media_entry) }} +
diff --git a/mediagoblin/plugins/archivalook/templates/archivalook/feature_displays/audio_secondary.html b/mediagoblin/plugins/archivalook/templates/archivalook/feature_displays/audio_secondary.html new file mode 100644 index 00000000..b863f5b0 --- /dev/null +++ b/mediagoblin/plugins/archivalook/templates/archivalook/feature_displays/audio_secondary.html @@ -0,0 +1,40 @@ +{# +# GNU MediaGoblin -- federated, autonomous media hosting +# Copyright (C) 2011, 2012 MediaGoblin contributors. See AUTHORS. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +#} + +{% from "archivalook/utils/display_featured.html" import + possibly_shortened_description %} + +{%- set media = feature.media_entry %} +{%- set entry_url = media.url_for_self(request.urlgen) %} +{%- if feature_loop.index % 2 == 1 -%} +
+{%- else -%} +
+{%- endif %} +

+ +

+ {{ possibly_shortened_description(request, feature.media_entry) }} + +

{{ media.title }}

+
+
diff --git a/mediagoblin/plugins/archivalook/templates/archivalook/feature_displays/default_primary.html b/mediagoblin/plugins/archivalook/templates/archivalook/feature_displays/default_primary.html new file mode 100644 index 00000000..57986622 --- /dev/null +++ b/mediagoblin/plugins/archivalook/templates/archivalook/feature_displays/default_primary.html @@ -0,0 +1,30 @@ +{# +# GNU MediaGoblin -- federated, autonomous media hosting +# Copyright (C) 2011, 2012 MediaGoblin contributors. See AUTHORS. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +#} + +{% from "archivalook/utils/display_featured.html" import + possibly_shortened_description %} + +{%- set featured_media_entry = feature.media_entry %} +{%- set entry_url = featured_media_entry.url_for_self(request.urlgen) %} + +
+ +

{{ featured_media_entry.title }}

+ + {{ possibly_shortened_description(request, feature.media_entry) }} +

diff --git a/mediagoblin/plugins/archivalook/templates/archivalook/feature_displays/default_secondary.html b/mediagoblin/plugins/archivalook/templates/archivalook/feature_displays/default_secondary.html new file mode 100644 index 00000000..4d2bdab9 --- /dev/null +++ b/mediagoblin/plugins/archivalook/templates/archivalook/feature_displays/default_secondary.html @@ -0,0 +1,34 @@ +{# +# GNU MediaGoblin -- federated, autonomous media hosting +# Copyright (C) 2011, 2012 MediaGoblin contributors. See AUTHORS. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +#} + + +{% from "archivalook/utils/display_featured.html" import + possibly_shortened_description %} + +{%- set featured_media_entry = feature.media_entry %} +{%- set entry_url = featured_media_entry.url_for_self(request.urlgen) %} +{%- if feature_loop.index % 2 == 1 -%} +
+{%- else -%} +
+{%- endif -%} + {{ possibly_shortened_description(request, feature.media_entry) }} + +

{{ featured_media_entry.title }}

+
+
diff --git a/mediagoblin/plugins/archivalook/templates/archivalook/feature_displays/default_tertiary.html b/mediagoblin/plugins/archivalook/templates/archivalook/feature_displays/default_tertiary.html new file mode 100644 index 00000000..90083a91 --- /dev/null +++ b/mediagoblin/plugins/archivalook/templates/archivalook/feature_displays/default_tertiary.html @@ -0,0 +1,40 @@ +{# +# GNU MediaGoblin -- federated, autonomous media hosting +# Copyright (C) 2011, 2012 MediaGoblin contributors. See AUTHORS. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +#} + +{%- from "archivalook/utils/display_featured.html" import + possibly_shortened_description -%} + +{%- set entry = feature.media_entry -%} +{%- set entry_url = entry.url_for_self(request.urlgen) -%} + +{%- if feature_loop.first %} + {%- set row_position = "row_first" %} +{%- elif feature_loop.last %} + {%- set row_position = "row_last" %} +{%- else -%} + {%- set row_position = "row_center" %} +{%- endif -%} + + + + + + {{ entry.title }} + + {{ possibly_shortened_description(request, feature.media_entry, 128) }} + diff --git a/mediagoblin/plugins/archivalook/templates/archivalook/feature_displays/image_primary.html b/mediagoblin/plugins/archivalook/templates/archivalook/feature_displays/image_primary.html new file mode 100644 index 00000000..66687be9 --- /dev/null +++ b/mediagoblin/plugins/archivalook/templates/archivalook/feature_displays/image_primary.html @@ -0,0 +1,33 @@ +{# +# GNU MediaGoblin -- federated, autonomous media hosting +# Copyright (C) 2011, 2012 MediaGoblin contributors. See AUTHORS. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +#} + +{% from "archivalook/utils/display_featured.html" import + possibly_shortened_description %} + +{%- set featured_media_entry = feature.media_entry %} +{%- set display_media = request.app.public_store.file_url( + featured_media_entry.get_display_media()[1]) %} +{%- set entry_url = featured_media_entry.url_for_self(request.urlgen) %} + +
+ +

{{ featured_media_entry.title }}

+

+
+ {{ possibly_shortened_description(request, feature.media_entry) }} +
diff --git a/mediagoblin/plugins/archivalook/templates/archivalook/feature_displays/image_secondary.html b/mediagoblin/plugins/archivalook/templates/archivalook/feature_displays/image_secondary.html new file mode 100644 index 00000000..0f64448a --- /dev/null +++ b/mediagoblin/plugins/archivalook/templates/archivalook/feature_displays/image_secondary.html @@ -0,0 +1,39 @@ +{# +# GNU MediaGoblin -- federated, autonomous media hosting +# Copyright (C) 2011, 2012 MediaGoblin contributors. See AUTHORS. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +#} + + +{% from "archivalook/utils/display_featured.html" import + possibly_shortened_description %} + +{%- set featured_media_entry = feature.media_entry %} +{%- set display_media = request.app.public_store.file_url( + featured_media_entry.get_display_media()[1]) %} +{%- set entry_url = featured_media_entry.url_for_self(request.urlgen) %} +{%- if feature_loop.index % 2 == 1 -%} +
+{%- else -%} +
+{%- endif -%} + +

+
+ {{ possibly_shortened_description(request, feature.media_entry) }} + +

{{ featured_media_entry.title }}

+
+
diff --git a/mediagoblin/plugins/archivalook/templates/archivalook/feature_displays/video_head.html b/mediagoblin/plugins/archivalook/templates/archivalook/feature_displays/video_head.html new file mode 100644 index 00000000..495382f5 --- /dev/null +++ b/mediagoblin/plugins/archivalook/templates/archivalook/feature_displays/video_head.html @@ -0,0 +1,23 @@ + +{# Sadly commented out till we can get the mediagoblin skin ported over + # to the newest video.js release ;\ #} +{# + +#} + + + diff --git a/mediagoblin/plugins/archivalook/templates/archivalook/feature_displays/video_primary.html b/mediagoblin/plugins/archivalook/templates/archivalook/feature_displays/video_primary.html new file mode 100644 index 00000000..64976257 --- /dev/null +++ b/mediagoblin/plugins/archivalook/templates/archivalook/feature_displays/video_primary.html @@ -0,0 +1,53 @@ +{# +# GNU MediaGoblin -- federated, autonomous media hosting +# Copyright (C) 2011, 2012 MediaGoblin contributors. See AUTHORS. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +#} + +{% from "archivalook/utils/display_featured.html" import + possibly_shortened_description %} + +{%- set media = feature.media_entry %} +{%- set display_media = request.app.public_store.file_url( + media.get_display_media()[1]) %} +{%- set entry_url = media.url_for_self(request.urlgen) %} + +
+ +

{{ media.title }}

+
+
+ {%- set display_type, display_path = media.get_display_media() %} + +
+ {{ possibly_shortened_description(request, feature.media_entry) }} +
diff --git a/mediagoblin/plugins/archivalook/templates/archivalook/feature_displays/video_secondary.html b/mediagoblin/plugins/archivalook/templates/archivalook/feature_displays/video_secondary.html new file mode 100644 index 00000000..92a44d49 --- /dev/null +++ b/mediagoblin/plugins/archivalook/templates/archivalook/feature_displays/video_secondary.html @@ -0,0 +1,56 @@ +{# +# GNU MediaGoblin -- federated, autonomous media hosting +# Copyright (C) 2011, 2012 MediaGoblin contributors. See AUTHORS. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +#} + +{% from "archivalook/utils/display_featured.html" import + possibly_shortened_description %} + +{%- set media = feature.media_entry %} +{%- set display_media = request.app.public_store.file_url( + media.get_display_media()[1]) %} +{%- set entry_url = media.url_for_self(request.urlgen) %} +{%- if feature_loop.index % 2 == 1 -%} +
+{%- else -%} +
+{%- endif %} +
+ {%- set display_type, display_path = media.get_display_media() %} + +
+ {{ possibly_shortened_description(request, feature.media_entry) }} + +

{{ media.title }}

+
+
diff --git a/mediagoblin/plugins/archivalook/templates/archivalook/feature_media_sidebar.html b/mediagoblin/plugins/archivalook/templates/archivalook/feature_media_sidebar.html new file mode 100644 index 00000000..c5b8a7d6 --- /dev/null +++ b/mediagoblin/plugins/archivalook/templates/archivalook/feature_media_sidebar.html @@ -0,0 +1,55 @@ +{# +# GNU MediaGoblin -- federated, autonomous media hosting +# Copyright (C) 2011, 2012 MediaGoblin contributors. See AUTHORS. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +#} + {% if request.user and request.user.has_privilege('featurer') %} + {% set media_feature=featured_media.filter_by( + media_entry_id = media.id).first() %} + {% if not media_feature %} + + {% trans %}Feature{% endtrans %} + {% else %} + + {% trans %}Unfeature{% endtrans %} + {% if not media_feature.display_type == 'primary' %} + + {% trans %}Promote{% endtrans %} + {% endif %}{% if not media_feature.display_type == 'tertiary' %} + + {% trans %}Demote{% endtrans %} + {% endif %} + {% endif %} + {% endif %} diff --git a/mediagoblin/plugins/archivalook/templates/archivalook/recent_media.html b/mediagoblin/plugins/archivalook/templates/archivalook/recent_media.html new file mode 100644 index 00000000..09690c8f --- /dev/null +++ b/mediagoblin/plugins/archivalook/templates/archivalook/recent_media.html @@ -0,0 +1,36 @@ +{# +# GNU MediaGoblin -- federated, autonomous media hosting +# Copyright (C) 2011, 2012 MediaGoblin contributors. See AUTHORS. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +#} +{% extends "mediagoblin/base.html" %} + +{% from "mediagoblin/utils/object_gallery.html" import object_gallery %} + +{% set feed_url = request.urlgen('mediagoblin.listings.atom_feed') %} + +{% block mediagoblin_head -%} + {% set feed_url = request.urlgen('mediagoblin.listings.atom_feed') -%} + +{%- endblock mediagoblin_head %} + +{% block mediagoblin_content %} +

{% trans %}Most recent media{% endtrans %}

+ {{ object_gallery(request, media_entries, pagination) }} + + {#- Need to set feed_url within this block so template can use it. -#} + {%- set feed_url = feed_url -%} + {%- include "mediagoblin/utils/feed_link.html" -%} +{% endblock %} diff --git a/mediagoblin/plugins/archivalook/templates/archivalook/root.html b/mediagoblin/plugins/archivalook/templates/archivalook/root.html new file mode 100644 index 00000000..72fe8656 --- /dev/null +++ b/mediagoblin/plugins/archivalook/templates/archivalook/root.html @@ -0,0 +1,79 @@ +{# +# GNU MediaGoblin -- federated, autonomous media hosting +# Copyright (C) 2011, 2012 MediaGoblin contributors. See AUTHORS. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +#} +{% extends "mediagoblin/base.html" %} + +{% set feed_url = request.urlgen('mediagoblin.listings.atom_feed') %} + +{%- block mediagoblin_head -%} + {%- set feed_url = request.urlgen('mediagoblin.listings.atom_feed') %} + + + + {% template_hook("archivalook_feature_head") %} +{%- endblock mediagoblin_head %} + +{%- block mediagoblin_content %} +
+ {%- if featured_media.primary|length > 0 or + featured_media.secondary|length > 0 or + featured_media.tertiary|length > 0 -%} + {%- for feature in featured_media.primary %} + {% set feature_loop = loop %} + {% include feature_template(feature.media_entry, "primary") %} + {%- endfor %} + + {%- for feature in featured_media.secondary %} + {% set feature_loop = loop %} + {% include feature_template(feature.media_entry, "secondary") %} + {%- endfor %} + + + {% set col_number = 3 %} + {%- for row in featured_media.tertiary|batch(col_number) %} + {% set row_loop = loop %} + + {%- for feature in row %} + {% set feature_loop = loop %} + {% include feature_template(feature.media_entry, "tertiary") %} + {%- endfor %} + + {%- endfor %} +
+
+ {%- elif request.user and request.user.has_privilege('featurer') %} +
+

{% trans %}Nothing is currently featured.{% endtrans %}

+ {% trans %}If you would like to feature a + piece of media, go to that media entry's homepage and click the button + that says{% endtrans %} Feature. + {% trans %}You're seeing this page because you are a user capable of + featuring media, a regular user would see a blank page, so be sure to + have media featured as long as your instance has the 'archivalook' + plugin enabled. A more advanced tool to manage features can be found + in the{% endtrans %} + + {% trans %}feature management panel.{% endtrans %} +
+
+ {%- endif %} + + {% trans %}View most recent media{% endtrans %} + +{% endblock %} diff --git a/mediagoblin/plugins/archivalook/templates/archivalook/utils/display_featured.html b/mediagoblin/plugins/archivalook/templates/archivalook/utils/display_featured.html new file mode 100644 index 00000000..b3c23c0c --- /dev/null +++ b/mediagoblin/plugins/archivalook/templates/archivalook/utils/display_featured.html @@ -0,0 +1,28 @@ +{# +# GNU MediaGoblin -- federated, autonomous media hosting +# Copyright (C) 2011, 2012 MediaGoblin contributors. See AUTHORS. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +#} + +{% macro possibly_shortened_description(request, entry, max_length=512) -%} +

+ {%- if entry.description|length < max_length %} + {{- entry.description -}} + {%- else -%} + {{- entry.description[:max_length] }}... + [More] + {%- endif -%} +

+{%- endmacro %} -- cgit v1.2.3 From f3ced5db21922ae836bcac77837393f3cdf822f4 Mon Sep 17 00:00:00 2001 From: tilly-Q Date: Tue, 13 May 2014 14:58:04 -0400 Subject: Added a link to the manage feature screen in the dropdown menu for those that have the appropriate privilege. Added a readme. --- .../archivalook/bits/feature_dropdown.html | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 mediagoblin/plugins/archivalook/templates/archivalook/bits/feature_dropdown.html (limited to 'mediagoblin/plugins/archivalook/templates') diff --git a/mediagoblin/plugins/archivalook/templates/archivalook/bits/feature_dropdown.html b/mediagoblin/plugins/archivalook/templates/archivalook/bits/feature_dropdown.html new file mode 100644 index 00000000..65cb1907 --- /dev/null +++ b/mediagoblin/plugins/archivalook/templates/archivalook/bits/feature_dropdown.html @@ -0,0 +1,21 @@ +{# +# GNU MediaGoblin -- federated, autonomous media hosting +# Copyright (C) 2011, 2012 MediaGoblin contributors. See AUTHORS. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +#} + · + + {%- trans %}Feature management panel{% endtrans -%} + -- cgit v1.2.3 From 03766fd87069cb4f1394790f81ac7b853085bf71 Mon Sep 17 00:00:00 2001 From: tilly-Q Date: Tue, 13 May 2014 16:26:00 -0400 Subject: Made it so that admins or moderators only would see the feature_management_panel link if they have the featurer privilege --- .../archivalook/templates/archivalook/bits/feature_dropdown.html | 3 +++ 1 file changed, 3 insertions(+) (limited to 'mediagoblin/plugins/archivalook/templates') diff --git a/mediagoblin/plugins/archivalook/templates/archivalook/bits/feature_dropdown.html b/mediagoblin/plugins/archivalook/templates/archivalook/bits/feature_dropdown.html index 65cb1907..289bbfac 100644 --- a/mediagoblin/plugins/archivalook/templates/archivalook/bits/feature_dropdown.html +++ b/mediagoblin/plugins/archivalook/templates/archivalook/bits/feature_dropdown.html @@ -15,7 +15,10 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . #} + {% if request.user and + request.user.has_privilege('featurer') %} · {%- trans %}Feature management panel{% endtrans -%} + {% endif %} -- cgit v1.2.3 From b6789657272f8126663ceaf59141ed288cc9c139 Mon Sep 17 00:00:00 2001 From: Laura Arjona Reina Date: Fri, 25 Jul 2014 21:16:14 +0200 Subject: Make consistent quotation marks when referring to button labels --- mediagoblin/plugins/archivalook/templates/archivalook/feature.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mediagoblin/plugins/archivalook/templates') diff --git a/mediagoblin/plugins/archivalook/templates/archivalook/feature.html b/mediagoblin/plugins/archivalook/templates/archivalook/feature.html index 6bcf792e..ad55f43b 100644 --- a/mediagoblin/plugins/archivalook/templates/archivalook/feature.html +++ b/mediagoblin/plugins/archivalook/templates/archivalook/feature.html @@ -52,7 +52,7 @@ Yes. If you would prefer, you may go to the media homepage of the piece of media you would like to feature or unfeature and look at the bar to the side of the media entry. If the piece of media has not been featured - yet you should see a button that says 'Feature'. Press that button and + yet you should see a button that says "Feature". Press that button and the media will be featured as a Primary Feature at the top of the page. All other featured media entries will remain as features, but will be pushed further down the page.

-- cgit v1.2.3 From b75208533997373c3c7d88c2a375cedf19a11fbf Mon Sep 17 00:00:00 2001 From: Laura Arjona Reina Date: Fri, 25 Jul 2014 23:30:23 +0200 Subject: Make translatable 'Feature' button in the explanation about how to feature media. --- mediagoblin/plugins/archivalook/templates/archivalook/root.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mediagoblin/plugins/archivalook/templates') diff --git a/mediagoblin/plugins/archivalook/templates/archivalook/root.html b/mediagoblin/plugins/archivalook/templates/archivalook/root.html index 72fe8656..78876f83 100644 --- a/mediagoblin/plugins/archivalook/templates/archivalook/root.html +++ b/mediagoblin/plugins/archivalook/templates/archivalook/root.html @@ -61,7 +61,7 @@

{% trans %}Nothing is currently featured.{% endtrans %}

{% trans %}If you would like to feature a piece of media, go to that media entry's homepage and click the button - that says{% endtrans %} Feature. + that says{% endtrans %} {% trans %}Feature{% endtrans %}. {% trans %}You're seeing this page because you are a user capable of featuring media, a regular user would see a blank page, so be sure to have media featured as long as your instance has the 'archivalook' -- cgit v1.2.3 From 97650abd784ba4c2ce902e7d00f7e007479c870f Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Tue, 29 Jul 2014 13:38:59 -0500 Subject: Avoid "lego translations" on the nothing currently featured strings This commit sponsored by Vinzenz Vietzke. Thank you! --- .../plugins/archivalook/templates/archivalook/root.html | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'mediagoblin/plugins/archivalook/templates') diff --git a/mediagoblin/plugins/archivalook/templates/archivalook/root.html b/mediagoblin/plugins/archivalook/templates/archivalook/root.html index 78876f83..4dbd0f9e 100644 --- a/mediagoblin/plugins/archivalook/templates/archivalook/root.html +++ b/mediagoblin/plugins/archivalook/templates/archivalook/root.html @@ -59,17 +59,19 @@ {%- elif request.user and request.user.has_privilege('featurer') %}

{% trans %}Nothing is currently featured.{% endtrans %}

- {% trans %}If you would like to feature a + {% trans -%} + If you would like to feature a piece of media, go to that media entry's homepage and click the button - that says{% endtrans %} {% trans %}Feature{% endtrans %}. - {% trans %}You're seeing this page because you are a user capable of + that says Feature. + {%- endtrans %} + {% trans featured_media_url=request.urlgen('manage-featured-media') -%} + You're seeing this page because you are a user capable of featuring media, a regular user would see a blank page, so be sure to have media featured as long as your instance has the 'archivalook' plugin enabled. A more advanced tool to manage features can be found - in the{% endtrans %} - - {% trans %}feature management panel.{% endtrans %} + in the feature management panel. + {%- endtrans %} +
{%- endif %} -- cgit v1.2.3