Tweaks to read-only details on shots and tasks

This commit is contained in:
2016-10-21 15:47:38 +02:00
parent b661de569f
commit caf48d3ef5
4 changed files with 63 additions and 23 deletions

View File

@@ -214,6 +214,9 @@ input, input.form-control
border-bottom: thin solid $color-background-dark border-bottom: thin solid $color-background-dark
vertical-align: middle vertical-align: middle
span.hint
color: $color-text-dark-hint
.table-cell-spacer .table-cell-spacer
background-color: $color-background-light background-color: $color-background-light
width: 6px width: 6px

View File

@@ -1,6 +1,6 @@
.attract-box .attract-box
margin: 10px margin: 10px
padding: 0 10px 10px padding: 10px
+container-box +container-box
&.with-status &.with-status
@@ -11,6 +11,7 @@
font-size: 1.6em font-size: 1.6em
h2.item-name h2.item-name
padding-left: 5px padding-left: 5px
margin-top: 10px
.item-description .item-description
padding: 10px 5px padding: 10px 5px
@@ -55,27 +56,28 @@
.table.item-properties .table.item-properties
.table-body .table-body
text-shadow: 1px 1px 0 white text-shadow: 1px 1px 0 white
// background-color: darken(white, 2%)
.table-row .table-row
.table-cell .table-cell
padding: 7px 10px padding: 7px 10px
vertical-align: top vertical-align: top
border: none border: none
color: $color-text-dark-primary
@include status-color-property(color, '', 'dark') @include status-color-property(color, '', 'dark')
&:first-child &:first-child
width: 100px width: 120px
text-align: right text-align: right
font-weight: bold font-weight: bold
padding-right: 10px padding-right: 10px
border-right: thin solid $color-background-dark border-right: thin solid $color-background-dark
color: $color-text-dark-primary white-space: nowrap
// background-color: darken(white, 3%)
&.properties-assignees &.properties-assignees
.table-cell span .table-cell span
display: block display: block
&.properties-status
cursor: help
#task-add #task-add

View File

@@ -2,7 +2,7 @@
form#shot_form(onsubmit="return shot_save('{{shot._id}}', '{{ url_for('attract.shots.perproject.save', project_url=project['url'], shot_id=shot._id) }}')") form#shot_form(onsubmit="return shot_save('{{shot._id}}', '{{ url_for('attract.shots.perproject.save', project_url=project['url'], shot_id=shot._id) }}')")
input(type='hidden',name='_etag',value='{{ shot._etag }}') input(type='hidden',name='_etag',value='{{ shot._etag }}')
.input-transparent-group .input-transparent-group
h2(title="Shot names can only be updated from Blender.") {{ shot.name | hide_none }} h2.item-name(title="Shot names can only be updated from Blender.") {{ shot.name | hide_none }}
button.copy-to-clipboard.btn.item-id( button.copy-to-clipboard.btn.item-id(
style="margin-left: auto", style="margin-left: auto",
name="Copy to Clipboard", name="Copy to Clipboard",
@@ -11,6 +11,7 @@
title="Copy ID to clipboard") title="Copy ID to clipboard")
| ID | ID
| {% if 'PUT' in shot.allowed_methods %}
.input-transparent-group .input-transparent-group
textarea.input-transparent( textarea.input-transparent(
name="description", name="description",
@@ -34,31 +35,61 @@
.input-group-separator .input-group-separator
.input-transparent-group .input-transparent-group
| {% if 'PUT' in shot.allowed_methods %}
button#item-save.btn.btn-default.btn-block(type=submit) button#item-save.btn.btn-default.btn-block(type=submit)
i.pi-check i.pi-check
| Save Shot | Save Shot
| {% endif %} | {% else %}
//- NOTE: read-only versions of the fields above.
| {% if shot.description %}
p.item-description {{ shot.description | hide_none }}
| {% endif %}
.table.item-properties
.table-body
.table-row.properties-status.js-help(
data-url="{{ url_for('attract.help', project_url=project.url) }}")
.table-cell Status
.table-cell(class="status-{{ shot.properties.status }}")
| {{ shot.properties.status | undertitle }}
| {% if shot.properties.notes %}
.table-row
.table-cell Notes
.table-cell
| {{ shot.properties.notes | hide_none }}
| {% endif %}
| {% endif %}
.attract-box .attract-box
dl.dl-horizontal.item-properties .table.item-properties
dt Last update .table-body
dd {{ shot._updated | pretty_date }} .table-row
dt Cut-in .table-cell Last update
dd(title="Frame number of the first visible frame of this shot.") .table-cell(title="{{ shot._updated }}") {{ shot._updated | pretty_date }}
| at frame {{ shot.properties.cut_in_timeline_in_frames }} .table-row
dt Duration in edit .table-cell Cut-in
dd(title="Duration of the visible part of this shot.") .table-cell(title="Frame number of the first visible frame of this shot.")
| {{ shot.properties.duration_in_edit_in_frames }} frames | at frame {{ shot.properties.cut_in_timeline_in_frames }}
dt Trim start .table-row
dd(title="How many frames were trimmed off the start of the shot in the edit.") .table-cell Trim start
| {{ shot.properties.trim_start_in_frames }} frames .table-cell(title="How many frames were trimmed off the start of the shot in the edit.")
| {{ shot.properties.trim_start_in_frames }} frames
.table-row
.table-cell Duration in edit
.table-cell(title="Duration of the visible part of this shot.")
| {{ shot.properties.duration_in_edit_in_frames }} frames
#item-view-feed #item-view-feed
#activities #activities
| {% if config.DEBUG %}
pre.
{{ shot.to_dict() | pprint }}
| {% endif %}
script. script.
new Clipboard('.copy-to-clipboard'); new Clipboard('.copy-to-clipboard');
var url = "{{ url_for('.activities', project_url=project.url, shot_id=shot['_id']) }}"; var url = "{{ url_for('.activities', project_url=project.url, shot_id=shot['_id']) }}";
load_activities(url); // from 10_tasks.js load_activities(url); // from 10_tasks.js
$('.js-help').openModalUrl('Help', "{{ url_for('attract.help', project_url=project.url) }}");

View File

@@ -90,16 +90,18 @@
| {% if task.description %} | {% if task.description %}
p.item-description {{ task.description | hide_none }} p.item-description {{ task.description | hide_none }}
| {% endif %} | {% endif %}
.table.item-properties .table.item-properties
.table-body .table-body
.table-row .table-row
.table-cell Task Type .table-cell Task Type
.table-cell {{ task.properties.task_type | undertitle }} .table-cell {{ task.properties.task_type | undertitle }}
.table-row .table-row.properties-status.js-help(
data-url="{{ url_for('attract.help', project_url=project.url) }}")
.table-cell Status .table-cell Status
.table-cell(class="status-{{ task.properties.status }}") .table-cell(class="status-{{ task.properties.status }}")
| {{ task.properties.status | undertitle }} | {{ task.properties.status | undertitle }}
| {% if attract_context != 'shot' and task.parent %} | {% if attract_context != 'shot' and task._parent_info %}
.table-row .table-row
.table-cell Shot .table-cell Shot
.table-cell .table-cell
@@ -111,7 +113,7 @@
| {% for u in task.properties.assigned_to['users'] %} | {% for u in task.properties.assigned_to['users'] %}
span(title="{{ u.username }}") {{ u.full_name }} span(title="{{ u.username }}") {{ u.full_name }}
| {% else %} | {% else %}
span Not assigned yet span.hint Not assigned yet
| {% endfor %} | {% endfor %}
| {% endif %} | {% endif %}
@@ -144,3 +146,5 @@ script.
$('#task-description').attr('rows',breaks + 4); $('#task-description').attr('rows',breaks + 4);
{% endif %} {% endif %}
$('.js-help').openModalUrl('Help', "{{ url_for('attract.help', project_url=project.url) }}");