Commit Graph

93 Commits

Author SHA1 Message Date
08de073464 Remove whitespace 2019-04-08 16:44:29 +02:00
b6d9039e82 Add navigation and extension links to /browse 2019-04-04 15:31:52 +02:00
4a6e971e71 Show only groups and assets in browse endpoint 2019-04-04 15:31:28 +02:00
b62f500b2e Cast empty string value in form_field to None
For FilmProjectForm, when no value is specified we want to save it
as None in the project document.
2019-04-04 13:09:53 +02:00
6d47946b1b Fix for exception in /open-movies
When extension_props.cloud.poster was set to empty string, we would
try to get file anyway and we would set the has_poster has_poster
convenience attribute to true. This would lead to an exception when
trying to access the poster file object in the template.
2019-04-04 11:49:12 +02:00
3d6b2452d6 Fix in is_cloud_project
Handle missing extension_props attribute.
2019-04-04 00:50:35 +02:00
4afe23e284 Introducing top level browsing
We introduce a new /p/<project_url>/browse endpoint, which allows to
see all top-level nodes of a project.
2019-04-04 00:27:14 +02:00
479153af9b Do not show hidden pages in project landing 2019-04-04 00:27:14 +02:00
4473d56379 Fix for exception
Check that ‘extension_props’ exists in project before looking for
EXTENSION_NAME.
2019-04-03 17:36:27 +02:00
c971f799ef Override /p/<project_url>
By overriding this Pillar endpoint, we allow more control over how
the landing page of a project is rendered, based on the presence
of the ‘cloud’ extension property.
2019-04-03 17:00:37 +02:00
d54d5ec157 Use poster file as preview for film projects 2019-04-03 16:43:48 +02:00
4a180e3784 Introducing setup_for_film functionality
It is now possible, only for user with admin capability, to setup a
project as ‘film’. This action can be performed via CLI using
./manage.py cloud setup_for_film <project_url> or via the web
interface in the Cloud settings area.
Setting up a project for film creates a number of extension props
under the ‘cloud’ key. Such properties are listed in the
cloud_extension_props variable in setup.py.

At this moment the functionality exists for a very specific purpose:
improving the presentation of public Film projects in the Blender
Cloud. It can be further extended to improve the presentation of
Training and Libraries later on.
2019-04-03 15:54:45 +02:00
9bf6c0fcb3 Templates: New template for films. 2019-04-03 13:04:25 +02:00
5f9406edd2 Vue Comments: Comments ported to Vue + DnD fileupload
* Drag and drop files to comment editor to add a file attachment
* Using Vue to render comments

Since comments now has attachments we need to update the schemas
./manage.py maintenance replace_pillar_node_type_schemas
2018-12-12 11:45:46 +01:00
37fe235d47 Lazy Home: Lazy load latest blog posts and assets and group by week and
project.

Javascript tutti.js and timeline.js is needed, and then the following to
init the timeline:

$('.timeline')
    .timeline({
        url: '/api/timeline'
    });

# Javascript Notes:
## ES6 transpile:
* Files in src/scripts/js/es6/common will be transpiled from
modern es6 js to old es5 js, and then added to tutti.js
* Files in src/scripts/js/es6/individual will be transpiled from
modern es6 js to old es5 js to individual module files
## JS Testing
* Added the Jest test framework to write javascript tests.
* `npm test` will run all the javascript tests

Thanks to Sybren for reviewing
2018-11-12 12:57:24 +01:00
f2207bc4d4 Asset list item: Don't show user.full_name in latest and random assets 2018-10-04 12:30:05 +02:00
a9848c3fad Random asset bug fix: If 2 assets from the same project where returned, the second one would get a corrupt url 2018-10-04 10:11:38 +02:00
c81711de53 Video Duration: The duration of a video is now shown on thumbnails and bellow the video player
Asset nodes now have a new field called "properties.duration_seconds". This holds a copy of the duration stored on the referenced video file and stays in sync using eve hooks.

To migrate existing duration times from files to nodes you need to run the following:
./manage.py maintenance reconcile_node_video_duration -ag

There are 2 more maintenance commands to be used to determine if there are any missing durations in either files or nodes:
find_video_files_without_duration
find_video_nodes_without_duration

FFProbe is now used to detect what duration a video file has.

Reviewed by Sybren.
2018-10-03 18:30:40 +02:00
4ff52a8af0 Add post status to posts query for homepage 2018-09-20 19:03:57 +02:00
7ba8ff7580 New templates for /learn and /libraries 2018-09-20 15:00:10 +02:00
690b35bab1 Add more tags to NODE_TAGS 2018-09-19 16:15:31 +02:00
356e4705b3 Add digital-painting to NODE_TAGS 2018-09-19 15:53:56 +02:00
678a03dbf1 Update NODE_TAGS 2018-09-19 11:34:22 +02:00
265794d4b7 Pass title to /production 2018-09-19 11:20:32 +02:00
94c2c6e550 Start of "production videos", a.k.a. tagged assets overview
Tagged assets are shown in a list per tag. The list is dynamically
loaded with JavaScript.
2018-09-06 16:08:23 +02:00
0b8ebecfea Don't import flask_login.request
`flask_login.request` is the exact same thing as `flask.request`, so
importing it from `flask_login` makes no sense. Also, it's been removed
from the new Flask-Login.
2018-08-29 12:19:40 +02:00
4769e2e904 New landing page for Hero project 2018-04-16 14:38:08 +02:00
8c48a61114 Switched attachment rendering to shortcode system
Requires Pillar 3b452d14ce32e1a744fc526a922e1bb60b83ef25 or newer.
2018-04-03 11:02:33 +02:00
7ba1c55609 Biling page: moved user classification logic from template → view code
This is the kind of stuff that's much easier expressed in Python than in
the template code.

API calls removed:
  - fetching the user isn't necessary, since we have
    pillar.auth.current_user anyway.
  - a call for each group the user is member of, since we only used it to
    check whether the user has demo access anyway.
2018-01-25 14:06:13 +01:00
0908a13519 Avoid error when Store cannot be reached. 2018-01-25 14:06:13 +01:00
06414ab0ed Override for comments_for_node
Make use of the render_comments_for_node function, and define custom logic to determine the value of can_post_comments.
2018-01-20 00:45:57 +01:00
4c2632669b PEP8 formatting 2017-12-21 15:26:32 +01:00
c2518e9ae1 Send welcome email to new Cloud subscribers 2017-12-21 15:26:23 +01:00
0b34c5c1c6 Also create user when member of organisation 2017-12-20 14:22:26 +01:00
fd68f3fc8b Allow user creation from Blender ID webhook "user modified"
When the webhook indicates that the user has a Cloud subscription (demo,
active, or renewable), the user is immediately created.
2017-12-20 12:56:48 +01:00
a2c24375e5 Webhooks: smarter way to find the user the webhook applies to.
We now also match on Blender ID (through the 'auth' section of the user
document), so that even when we have missed an email change we can still
apply the changes from the webhook.
2017-12-20 12:22:51 +01:00
be4b36a661 Also accept user-modified webhook when old email address is unknown.
When the old email address is unknown, and the new one does map to a user,
use the webhook to update the new user.
2017-12-20 11:40:56 +01:00
ae700b5eef Added payload description of Blender ID webhook 2017-12-20 11:19:15 +01:00
9c2e6f9081 Fixed forced login for user switching 2017-12-12 11:25:48 +01:00
abb0ded3f2 Lowered log level for webhook call for unknown user 2017-12-08 14:08:04 +01:00
f948969b20 Fixed webhook so that users' full_name isn't reset to the empty string. 2017-12-08 14:04:11 +01:00
c031c1e8ae Removed flamenco-user and attract-user role linking to subscriber/demo/admin
It was a hack due to the lack of a capabilities system.
2017-12-07 17:09:06 +01:00
bff51e1e83 Added /renew endpoint to redirect to Blender Store renewal URL. 2017-12-06 14:36:02 +01:00
561db0428d Using new blender_id.get_user_blenderid() function 2017-12-05 11:56:33 +01:00
f7ce8d74a7 Implemented Blender ID webhook for user change notifications
Handles changes in:

 - roles
 - full name
 - email address
2017-12-01 19:06:16 +01:00
532bf60041 Obtain subscription info from Store.
This was in Pillar, and is now moved to Blender Cloud. It's used to obtain
the subscription expiration date from Blender Store.
2017-11-30 15:45:40 +01:00
d5d189de8c Reworked subscription reconciliation to use Blender ID instead of Store 2017-11-30 15:30:41 +01:00
5d281dc6ce Introduce 'has_subscription' role with 'can-renew-subscription' capability
This is in preparation of presenting different messages to users, when their
subscription should be renewed, or when they should buy a (new)
subscription.
2017-11-30 15:30:08 +01:00
f4e277f1d1 Homepage: Render attachments on posts 2017-11-23 16:16:10 +01:00
4207d051a9 Added subscriber-pro role.
This is used in svnman to bind to the svn-use capability.
2017-11-14 16:09:29 +01:00