Merge branch 'master' of git.blender.org:pillar into elastic
This commit is contained in:
commit
b0d6f724ef
@ -59,6 +59,7 @@ def posts_view(project_id=None, project_url=None, url=None, *, archive=False, pa
|
|||||||
|
|
||||||
for post in posts._items:
|
for post in posts._items:
|
||||||
post.picture = get_file(post.picture, api=api)
|
post.picture = get_file(post.picture, api=api)
|
||||||
|
post.url = url_for_node(node=post)
|
||||||
|
|
||||||
# Use the *_main_project.html template for the main blog
|
# Use the *_main_project.html template for the main blog
|
||||||
is_main_project = project_id == current_app.config['MAIN_PROJECT_ID']
|
is_main_project = project_id == current_app.config['MAIN_PROJECT_ID']
|
||||||
|
@ -1,81 +1,3 @@
|
|||||||
function projectNavCollapse() {
|
|
||||||
$("#project-side-container").addClass('collapsed');
|
|
||||||
};
|
|
||||||
|
|
||||||
function projectNavExpand() {
|
|
||||||
$("#project-side-container").removeClass('collapsed');
|
|
||||||
};
|
|
||||||
|
|
||||||
function projectNavCheck(){
|
|
||||||
|
|
||||||
/* Only run if there is a tree */
|
|
||||||
if(document.getElementById("project_tree") !== null) {
|
|
||||||
|
|
||||||
var nav_status = Cookies.getJSON('bcloud_ui');
|
|
||||||
|
|
||||||
if (nav_status && nav_status.nav_collapsed) {
|
|
||||||
if (nav_status.nav_collapsed == 'expanded') {
|
|
||||||
projectNavExpand();
|
|
||||||
|
|
||||||
} else if ( nav_status.nav_collapsed == 'collapsed' ) {
|
|
||||||
projectNavCollapse();
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
projectNavExpand();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function projectNavToggle(){
|
|
||||||
|
|
||||||
var nav_status = Cookies.getJSON('bcloud_ui');
|
|
||||||
|
|
||||||
if (nav_status && nav_status.nav_collapsed) {
|
|
||||||
if (nav_status.nav_collapsed == 'expanded') {
|
|
||||||
|
|
||||||
projectNavCollapse();
|
|
||||||
setJSONCookie('bcloud_ui', 'nav_collapsed', 'collapsed');
|
|
||||||
|
|
||||||
} else if ( nav_status.nav_collapsed == 'collapsed' ) {
|
|
||||||
|
|
||||||
projectNavExpand();
|
|
||||||
setJSONCookie('bcloud_ui', 'nav_collapsed', 'expanded');
|
|
||||||
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
projectNavCollapse();
|
|
||||||
setJSONCookie('bcloud_ui', 'nav_collapsed', 'collapsed');
|
|
||||||
}
|
|
||||||
|
|
||||||
$('#project_context-header').width($('#project_context-container').width());
|
|
||||||
}
|
|
||||||
|
|
||||||
$(function () {
|
|
||||||
|
|
||||||
/* Check on first load */
|
|
||||||
projectNavCheck();
|
|
||||||
|
|
||||||
$('.project_split, .project_nav-toggle-btn').on('click', function (e) {
|
|
||||||
projectNavToggle();
|
|
||||||
});
|
|
||||||
|
|
||||||
/* Only run if there is a tree */
|
|
||||||
if(document.getElementById("project_tree") !== null) {
|
|
||||||
|
|
||||||
$(document).keypress(function(e) {
|
|
||||||
var tag = e.target.tagName.toLowerCase();
|
|
||||||
|
|
||||||
/* Toggle when pressing [T] key */
|
|
||||||
if(e.which == 116 && tag != 'input' && tag != 'textarea' && !e.ctrlKey && !e.metaKey && !e.altKey) {
|
|
||||||
projectNavToggle();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
/* Small utility to enable specific node_types under the Add New dropdown */
|
/* Small utility to enable specific node_types under the Add New dropdown */
|
||||||
/* It takes:
|
/* It takes:
|
||||||
* empty: Enable every item
|
* empty: Enable every item
|
||||||
|
@ -9,11 +9,11 @@ body.organizations
|
|||||||
margin-left: auto
|
margin-left: auto
|
||||||
|
|
||||||
|
|
||||||
#side
|
.dashboard-secondary
|
||||||
.box
|
.box
|
||||||
+container-box
|
+container-box
|
||||||
padding: 10px 20px
|
padding: 10px 20px
|
||||||
margin: 20px 10px
|
margin: 0
|
||||||
|
|
||||||
#item-details
|
#item-details
|
||||||
.organization
|
.organization
|
||||||
@ -29,7 +29,6 @@ body.organizations
|
|||||||
input
|
input
|
||||||
font-size: 1.1em
|
font-size: 1.1em
|
||||||
|
|
||||||
|
|
||||||
.org-admin
|
.org-admin
|
||||||
#admin-name
|
#admin-name
|
||||||
padding: 10px 0
|
padding: 10px 0
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
border-bottom-left-radius: 3px
|
border-bottom-left-radius: 3px
|
||||||
border-bottom-right-radius: 3px
|
border-bottom-right-radius: 3px
|
||||||
|
|
||||||
section#sub-nav-tabs.home,
|
nav#sub-nav-tabs.home,
|
||||||
section#sub-nav-tabs.projects
|
nav#sub-nav-tabs.projects
|
||||||
background-color: white
|
background-color: white
|
||||||
border-bottom: thin solid $color-background-dark
|
border-bottom: thin solid $color-background-dark
|
||||||
|
|
||||||
@ -17,7 +17,7 @@
|
|||||||
section#home
|
section#home
|
||||||
background-color: $color-background-dark
|
background-color: $color-background-dark
|
||||||
|
|
||||||
section.nav-tabs__tab
|
nav.nav-tabs__tab
|
||||||
display: none
|
display: none
|
||||||
background-color: $color-background-light
|
background-color: $color-background-light
|
||||||
|
|
||||||
|
@ -41,10 +41,6 @@ body.blog
|
|||||||
width: 100%
|
width: 100%
|
||||||
left: 0
|
left: 0
|
||||||
|
|
||||||
#project-side-container.collapsed+#project_context-header
|
|
||||||
span#status-bar
|
|
||||||
left: $project-sidebar-width
|
|
||||||
|
|
||||||
#project_context-header
|
#project_context-header
|
||||||
span#status-bar
|
span#status-bar
|
||||||
text-align: left
|
text-align: left
|
||||||
@ -316,10 +312,6 @@ span#project-edit-title
|
|||||||
weight: 400
|
weight: 400
|
||||||
white-space: nowrap
|
white-space: nowrap
|
||||||
|
|
||||||
.project_split.collapsed+#project_context-header
|
|
||||||
span#project-edit-title
|
|
||||||
left: 0
|
|
||||||
|
|
||||||
|
|
||||||
/* Edit Asset buttons */
|
/* Edit Asset buttons */
|
||||||
.project-mode-view,
|
.project-mode-view,
|
||||||
@ -702,41 +694,6 @@ ul.project_nav-edit-list
|
|||||||
min-height: 800px
|
min-height: 800px
|
||||||
border: none
|
border: none
|
||||||
|
|
||||||
#project-side-container
|
|
||||||
&.collapsed
|
|
||||||
.project_nav-toggle-btn i:before
|
|
||||||
content: '\e827'
|
|
||||||
|
|
||||||
.project_split
|
|
||||||
background-color: $project-sidebar-background
|
|
||||||
cursor: e-resize
|
|
||||||
right: 0
|
|
||||||
left: 8px
|
|
||||||
width: 5px
|
|
||||||
|
|
||||||
#project_nav
|
|
||||||
width: 5px
|
|
||||||
+media-xs
|
|
||||||
width: initial
|
|
||||||
|
|
||||||
#project_nav-container
|
|
||||||
width: 5px
|
|
||||||
+media-xs
|
|
||||||
display: block
|
|
||||||
width: initial
|
|
||||||
position: relative
|
|
||||||
|
|
||||||
#project_nav-header,
|
|
||||||
#project_context-header,
|
|
||||||
#project_tree
|
|
||||||
display: none
|
|
||||||
visibility: hidden
|
|
||||||
|
|
||||||
+media-xs
|
|
||||||
display: block
|
|
||||||
visibility: visible
|
|
||||||
position: relative
|
|
||||||
|
|
||||||
|
|
||||||
/* The actual navigation tree container */
|
/* The actual navigation tree container */
|
||||||
#project_tree
|
#project_tree
|
||||||
@ -753,20 +710,6 @@ ul.project_nav-edit-list
|
|||||||
&.edit
|
&.edit
|
||||||
margin-top: 0
|
margin-top: 0
|
||||||
|
|
||||||
/* Clickable bar between navtree and context view, to collapse tree */
|
|
||||||
.project_split
|
|
||||||
float: right
|
|
||||||
position: absolute
|
|
||||||
width: 15px
|
|
||||||
margin-left: -8px
|
|
||||||
top: 0
|
|
||||||
right: -15px
|
|
||||||
bottom: 0
|
|
||||||
cursor: w-resize
|
|
||||||
user-select: none
|
|
||||||
|
|
||||||
+media-xs
|
|
||||||
display: none
|
|
||||||
|
|
||||||
/* Node Context */
|
/* Node Context */
|
||||||
=project-node-title
|
=project-node-title
|
||||||
|
@ -239,22 +239,18 @@
|
|||||||
font:
|
font:
|
||||||
family: $font-body
|
family: $font-body
|
||||||
size: 1.8em
|
size: 1.8em
|
||||||
padding-bottom: 10px
|
|
||||||
padding-top: 20px
|
|
||||||
|
|
||||||
.item-info
|
padding: 10px 25px 10px
|
||||||
color: $color-text-dark-secondary
|
|
||||||
font-size: 1em
|
|
||||||
|
|
||||||
a
|
ul.meta
|
||||||
color: $color-text-dark-secondary
|
+list-meta
|
||||||
&:hover
|
font-size: .9em
|
||||||
color: $color-primary
|
padding: 15px 25px 5px
|
||||||
|
|
||||||
.item-content
|
.item-content
|
||||||
+node-details-description
|
+node-details-description
|
||||||
padding: 35px 25px
|
|
||||||
font-size: 1.3em
|
font-size: 1.3em
|
||||||
|
padding: 15px 25px 25px
|
||||||
|
|
||||||
+media-xs
|
+media-xs
|
||||||
padding:
|
padding:
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
| {% macro navigation_tabs(title) %}
|
| {% macro navigation_tabs(title) %}
|
||||||
|
|
||||||
section#nav-tabs
|
nav#nav-tabs
|
||||||
ul#nav-tabs__list
|
ul#nav-tabs__list
|
||||||
li.nav-tabs__list-tab(
|
li.nav-tabs__list-tab(
|
||||||
class="{% if title == 'homepage' %}active{% endif %}")
|
class="{% if title == 'homepage' %}active{% endif %}")
|
||||||
|
@ -1,17 +1,5 @@
|
|||||||
script(type="text/javascript").
|
script(type="text/javascript").
|
||||||
|
|
||||||
/* Convert Markdown */
|
|
||||||
var convert_fields = '.node-details-description, .blog_index-item .item-content';
|
|
||||||
var convert = new Markdown.getSanitizingConverter();
|
|
||||||
Markdown.Extra.init(convert);
|
|
||||||
convert = convert.makeHtml;
|
|
||||||
|
|
||||||
|
|
||||||
/* Parse description/content fields to convert markdown */
|
|
||||||
$(convert_fields).each(function(i){
|
|
||||||
$(convert_fields).eq(i).html(convert($(convert_fields).eq(i).text()));
|
|
||||||
});
|
|
||||||
|
|
||||||
ProjectUtils.setProjectAttributes({isProject: false});
|
ProjectUtils.setProjectAttributes({isProject: false});
|
||||||
|
|
||||||
// Click anywhere in the page to hide the overlay
|
// Click anywhere in the page to hide the overlay
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
| {% if node.description %}
|
| {% if node.description %}
|
||||||
.node-details-description#node-description
|
.node-details-description#node-description
|
||||||
| {{node.description}}
|
| {{ node.description | markdown }}
|
||||||
| {% endif %}
|
| {% endif %}
|
||||||
|
|
||||||
include ../../_node_details
|
include ../../_node_details
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
| {% if node.description %}
|
| {% if node.description %}
|
||||||
.node-details-description#node-description
|
.node-details-description#node-description
|
||||||
| {{node.description}}
|
| {{ node.description | markdown }}
|
||||||
| {% endif %}
|
| {% endif %}
|
||||||
|
|
||||||
include ../../_node_details
|
include ../../_node_details
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
|
|
||||||
| {% if node.description %}
|
| {% if node.description %}
|
||||||
.node-details-description#node-description
|
.node-details-description#node-description
|
||||||
| {{node.description}}
|
| {{ node.description | markdown }}
|
||||||
| {% endif %}
|
| {% endif %}
|
||||||
|
|
||||||
include ../../_node_details
|
include ../../_node_details
|
||||||
|
@ -1,27 +1,31 @@
|
|||||||
//- ******************************************************* -//
|
//- ******************************************************* -//
|
||||||
| {% macro render_blog_post(node) %}
|
| {% macro render_blog_post(node) %}
|
||||||
| {% if node.picture %}
|
| {% if node.picture %}
|
||||||
a.blog_index-header(href="{{ url_for_node(node=node) }}")
|
a.blog_index-header(href="{{ node.url }}")
|
||||||
img(src="{{ node.picture.thumbnail('l', api=api) }}")
|
img(src="{{ node.picture.thumbnail('l', api=api) }}")
|
||||||
| {% endif %}
|
| {% endif %}
|
||||||
|
|
||||||
.blog_index-item
|
.blog_index-item
|
||||||
a.item-title(
|
ul.meta
|
||||||
href="{{ url_for_node(node=node) }}")
|
| {% if node.project.name %}
|
||||||
| {{node.name}}
|
li {{ node.project.name }}
|
||||||
|
| {% endif %}
|
||||||
|
|
||||||
.item-info.
|
li.when
|
||||||
#[span(title="{{node._created}}") {{node._created | pretty_date }}]
|
a(href="{{ node.url }}",
|
||||||
{% if node._created != node._updated %}
|
title="Updated {{ node._updated | pretty_date }}")
|
||||||
#[span(title="{{node._updated}}") (updated {{node._updated | pretty_date }})]
|
| {{ node._created | pretty_date }}
|
||||||
{% endif %}
|
|
||||||
{% if node.properties.category %}| {{node.properties.category}}{% endif %}
|
li
|
||||||
· {{node.user.full_name}}
|
a(href="{{ node.url }}#comments")
|
||||||
· #[a(href="{{ url_for_node(node=node) }}#comments") comment]
|
| comment
|
||||||
{% if node.properties.status != 'published' %} | {{ node.properties.status}} {% endif %}
|
|
||||||
|
a.item-title(
|
||||||
|
href="{{ node.url }}")
|
||||||
|
| {{ node.name }}
|
||||||
|
|
||||||
.item-content
|
.item-content
|
||||||
| {{ node.properties.content }}
|
| {{ node.properties.content | markdown }}
|
||||||
|
|
||||||
| {% endmacro %}
|
| {% endmacro %}
|
||||||
|
|
||||||
@ -30,15 +34,15 @@ a.blog_index-header(href="{{ url_for_node(node=node) }}")
|
|||||||
.blog_index-item.list
|
.blog_index-item.list
|
||||||
|
|
||||||
| {% if node.picture %}
|
| {% if node.picture %}
|
||||||
a.item-header(href="{{ url_for_node(node=node) }}")
|
a.item-header(href="{{ node.url }}")
|
||||||
img.image(src="{{ node.picture.thumbnail('s', api=api) }}")
|
img.image(src="{{ node.picture.thumbnail('s', api=api) }}")
|
||||||
| {% else %}
|
| {% else %}
|
||||||
a.item-header.nothumb(href="{{ url_for_node(node=node) }}")
|
a.item-header.nothumb(href="{{ node.url }}")
|
||||||
i.pi-document-text
|
i.pi-document-text
|
||||||
| {% endif %}
|
| {% endif %}
|
||||||
|
|
||||||
a.item-title(
|
a.item-title(
|
||||||
href="{{ url_for_node(node=node) }}")
|
href="{{ node.url }}")
|
||||||
| {{node.name}}
|
| {{node.name}}
|
||||||
|
|
||||||
.item-info.
|
.item-info.
|
||||||
|
@ -29,7 +29,7 @@ link(href="{{ url_for('static_pillar', filename='assets/css/blog.css', v=1732017
|
|||||||
| {% for post in posts %}
|
| {% for post in posts %}
|
||||||
li.jstree-node
|
li.jstree-node
|
||||||
a.jstree-anchor.tree-item.post(
|
a.jstree-anchor.tree-item.post(
|
||||||
href="{{ url_for_node(node=post) }}")
|
href="{{ node.url }}")
|
||||||
.tree-item-thumbnail
|
.tree-item-thumbnail
|
||||||
| {% if post.picture %}
|
| {% if post.picture %}
|
||||||
img(src="{{ post.picture.thumbnail('s', api=api) }}")
|
img(src="{{ post.picture.thumbnail('s', api=api) }}")
|
||||||
|
@ -73,32 +73,6 @@
|
|||||||
| {% block comment_scripts %}
|
| {% block comment_scripts %}
|
||||||
script.
|
script.
|
||||||
|
|
||||||
// If there's a comment link in the URL, scroll there
|
|
||||||
function scrollToLinkedComment() {
|
|
||||||
var scrollToId = location.hash;
|
|
||||||
if (scrollToId.length <= 1) return;
|
|
||||||
|
|
||||||
$(scrollToId)
|
|
||||||
.addClass('comment-linked')
|
|
||||||
.scrollHere();
|
|
||||||
}
|
|
||||||
$(scrollToLinkedComment);
|
|
||||||
|
|
||||||
|
|
||||||
$('#comment_field').autoResize();
|
|
||||||
|
|
||||||
// Initialize Markdown to later convert comment as we type
|
|
||||||
var convert = new Markdown.getSanitizingConverter();
|
|
||||||
Markdown.Extra.init(convert);
|
|
||||||
convert = convert.makeHtml;
|
|
||||||
|
|
||||||
// Submit new comment
|
|
||||||
$(document)
|
|
||||||
.off('click','body .comment-action-submit')
|
|
||||||
.on( 'click','body .comment-action-submit', function(e){
|
|
||||||
post_comment($(this));
|
|
||||||
});
|
|
||||||
|
|
||||||
{% if show_comments %}
|
{% if show_comments %}
|
||||||
$('body')
|
$('body')
|
||||||
.off('pillar:comment-posted')
|
.off('pillar:comment-posted')
|
||||||
@ -111,9 +85,37 @@ script.
|
|||||||
$('#' + comment_node_id).scrollHere();
|
$('#' + comment_node_id).scrollHere();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// If there's a comment link in the URL, scroll there
|
||||||
|
function scrollToLinkedComment() {
|
||||||
|
var scrollToId = location.hash;
|
||||||
|
if (scrollToId.length <= 1) return;
|
||||||
|
|
||||||
|
$(scrollToId)
|
||||||
|
.addClass('comment-linked')
|
||||||
|
.scrollHere();
|
||||||
|
}
|
||||||
|
$(scrollToLinkedComment);
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
|
{% if can_post_comments %}
|
||||||
|
|
||||||
|
// If we can actually comment, load the tools to do it
|
||||||
|
|
||||||
|
// Initialize Markdown to later convert comment as we type
|
||||||
|
var convert = new Markdown.getSanitizingConverter();
|
||||||
|
Markdown.Extra.init(convert);
|
||||||
|
convert = convert.makeHtml;
|
||||||
|
|
||||||
|
// Submit new comment
|
||||||
|
$(document)
|
||||||
|
.off('click','body .comment-action-submit')
|
||||||
|
.on( 'click','body .comment-action-submit', function(e){
|
||||||
|
post_comment($(this));
|
||||||
|
});
|
||||||
|
|
||||||
// Writing comment
|
// Writing comment
|
||||||
// Markdown convert as we type in the textarea
|
// Markdown convert as we type in the textarea
|
||||||
$(document)
|
$(document)
|
||||||
@ -142,6 +144,9 @@ script.
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Autoresize the textarea as we type
|
||||||
|
$('#comment_field').autoResize();
|
||||||
|
|
||||||
|
|
||||||
// Edit comment
|
// Edit comment
|
||||||
// Enter edit mode
|
// Enter edit mode
|
||||||
@ -218,4 +223,6 @@ script.
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
| {% endblock %}
|
| {% endblock %}
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
| {% if node.description %}
|
| {% if node.description %}
|
||||||
.node-details-description
|
.node-details-description
|
||||||
| {{node.description}}
|
| {{ node.description | markdown }}
|
||||||
| {% endif %}
|
| {% endif %}
|
||||||
|
|
||||||
section.node-children.group
|
section.node-children.group
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
| {% if node.description %}
|
| {% if node.description %}
|
||||||
section.node-row
|
section.node-row
|
||||||
.node-details-description
|
.node-details-description
|
||||||
| {{node.description}}
|
| {{ node.description | markdown }}
|
||||||
| {% endif %}
|
| {% endif %}
|
||||||
|
|
||||||
| {% if children %}
|
| {% if children %}
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
| {% if node.description %}
|
| {% if node.description %}
|
||||||
section.node-row
|
section.node-row
|
||||||
.node-details-description
|
.node-details-description
|
||||||
| {{node.description}}
|
| {{ node.description | markdown }}
|
||||||
| {% endif %}
|
| {% endif %}
|
||||||
|
|
||||||
| {% if children %}
|
| {% if children %}
|
||||||
|
@ -93,7 +93,7 @@
|
|||||||
|
|
||||||
| {% if node.description %}
|
| {% if node.description %}
|
||||||
.node-details-description#node-description
|
.node-details-description#node-description
|
||||||
| {{node.description}}
|
| {{ node.description | markdown }}
|
||||||
| {% endif %}
|
| {% endif %}
|
||||||
|
|
||||||
| {% if node.properties.license_notes %}
|
| {% if node.properties.license_notes %}
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
| {% if node.description %}
|
| {% if node.description %}
|
||||||
.node-details-description#node-description
|
.node-details-description#node-description
|
||||||
| {{node.description}}
|
| {{ node.description | markdown }}
|
||||||
| {% endif %}
|
| {% endif %}
|
||||||
|
|
||||||
.node-details-meta.footer
|
.node-details-meta.footer
|
||||||
|
@ -17,13 +17,13 @@ meta(name="twitter:image", content="{{ url_for('static', filename='assets/img/ba
|
|||||||
|
|
||||||
| {% block body %}
|
| {% block body %}
|
||||||
.dashboard-container
|
.dashboard-container
|
||||||
section#main
|
section.dashboard-main
|
||||||
| {{ navigation_tabs(title) }}
|
| {{ navigation_tabs(title) }}
|
||||||
|
|
||||||
section#projects
|
section#projects
|
||||||
|
|
||||||
| {% if can_create_organization %}
|
| {% if can_create_organization %}
|
||||||
section#sub-nav-tabs.projects
|
nav#sub-nav-tabs.projects
|
||||||
ul#sub-nav-tabs__list
|
ul#sub-nav-tabs__list
|
||||||
li.result#create_organization_result_panel
|
li.result#create_organization_result_panel
|
||||||
li.create
|
li.create
|
||||||
@ -32,7 +32,7 @@ meta(name="twitter:image", content="{{ url_for('static', filename='assets/img/ba
|
|||||||
| Create Organization
|
| Create Organization
|
||||||
| {% endif %}
|
| {% endif %}
|
||||||
|
|
||||||
section.nav-tabs__tab.active#own_projects
|
nav.nav-tabs__tab.active#own_projects
|
||||||
ul.projects__list
|
ul.projects__list
|
||||||
| {% if organizations %}
|
| {% if organizations %}
|
||||||
| {% for organization in organizations['_items'] %}
|
| {% for organization in organizations['_items'] %}
|
||||||
@ -65,7 +65,7 @@ meta(name="twitter:image", content="{{ url_for('static', filename='assets/img/ba
|
|||||||
span Create an Organization to get started!
|
span Create an Organization to get started!
|
||||||
| {% endif %}
|
| {% endif %}
|
||||||
|
|
||||||
section#side
|
section.dashboard-secondary
|
||||||
section.box
|
section.box
|
||||||
#item-details
|
#item-details
|
||||||
|
|
||||||
|
@ -20,23 +20,23 @@ meta(name="twitter:image", content="{{ url_for('static', filename='assets/img/ba
|
|||||||
|
|
||||||
| {% block body %}
|
| {% block body %}
|
||||||
.dashboard-container
|
.dashboard-container
|
||||||
section#main
|
section.dashboard-main
|
||||||
| {{ navigation_tabs(title) }}
|
| {{ navigation_tabs(title) }}
|
||||||
|
|
||||||
section#projects
|
section#projects
|
||||||
|
|
||||||
section#sub-nav-tabs.home
|
nav#sub-nav-tabs.home
|
||||||
ul#sub-nav-tabs__list
|
ul#sub-nav-tabs__list
|
||||||
li.nav-tabs__list-tab#subtab-blender_sync(data-tab-url='.')
|
li.nav-tabs__list-tab#subtab-blender_sync(data-tab-url="{{ url_for('projects.home_project')}}")
|
||||||
i.pi-blender
|
i.pi-blender
|
||||||
| Blender Sync
|
| Blender Sync
|
||||||
|
|
||||||
li.nav-tabs__list-tab#subtab-images(data-tab-url='images')
|
li.nav-tabs__list-tab#subtab-images(data-tab-url="{{ url_for('projects.home_project_shared_images')}}")
|
||||||
i.pi-picture
|
i.pi-picture
|
||||||
| Images
|
| Images
|
||||||
| {% block currenttab %}{% endblock %}
|
| {% block currenttab %}{% endblock %}
|
||||||
|
|
||||||
section#side
|
section.dashboard-secondary
|
||||||
section.announcement
|
section.announcement
|
||||||
img.header(
|
img.header(
|
||||||
src="{{ url_for('static', filename='assets/img/blender_sync_header.jpg') }}")
|
src="{{ url_for('static', filename='assets/img/blender_sync_header.jpg') }}")
|
||||||
|
@ -20,12 +20,12 @@ meta(name="twitter:image", content="{{ url_for('static', filename='assets/img/ba
|
|||||||
|
|
||||||
| {% block body %}
|
| {% block body %}
|
||||||
.dashboard-container
|
.dashboard-container
|
||||||
section#main
|
section.dashboard-main
|
||||||
| {{ navigation_tabs(title) }}
|
| {{ navigation_tabs(title) }}
|
||||||
|
|
||||||
section#projects
|
section#projects
|
||||||
|
|
||||||
section#sub-nav-tabs.projects
|
nav#sub-nav-tabs.projects
|
||||||
ul#sub-nav-tabs__list
|
ul#sub-nav-tabs__list
|
||||||
li.nav-tabs__list-tab.active(data-tab-toggle='own_projects')
|
li.nav-tabs__list-tab.active(data-tab-toggle='own_projects')
|
||||||
| Own Projects
|
| Own Projects
|
||||||
@ -48,7 +48,7 @@ meta(name="twitter:image", content="{{ url_for('static', filename='assets/img/ba
|
|||||||
| Create Project
|
| Create Project
|
||||||
| {% endif %}
|
| {% endif %}
|
||||||
|
|
||||||
section.nav-tabs__tab.active#own_projects
|
nav.nav-tabs__tab.active#own_projects
|
||||||
ul.projects__list
|
ul.projects__list
|
||||||
| {% for project in projects_user %}
|
| {% for project in projects_user %}
|
||||||
li.projects__list-item(
|
li.projects__list-item(
|
||||||
@ -148,7 +148,7 @@ meta(name="twitter:image", content="{{ url_for('static', filename='assets/img/ba
|
|||||||
| No projects shared with you... yet!
|
| No projects shared with you... yet!
|
||||||
| {% endif %}
|
| {% endif %}
|
||||||
|
|
||||||
section#side
|
section.dashboard-secondary
|
||||||
section.announcement
|
section.announcement
|
||||||
img.header(
|
img.header(
|
||||||
src="{{ url_for('static', filename='assets/img/backgrounds/services_projects.jpg')}}")
|
src="{{ url_for('static', filename='assets/img/backgrounds/services_projects.jpg')}}")
|
||||||
|
@ -131,11 +131,6 @@ link(href="{{ url_for('static_pillar', filename='assets/css/project-main.css', v
|
|||||||
i.pi-cog
|
i.pi-cog
|
||||||
| {% endif %}
|
| {% endif %}
|
||||||
|
|
||||||
.project_nav-toggle-btn(
|
|
||||||
title="Toggle navigation [T]",
|
|
||||||
data-toggle="tooltip",
|
|
||||||
data-placement="right")
|
|
||||||
i.pi-angle-double-left
|
|
||||||
|
|
||||||
#project_nav(class="{{ title }}")
|
#project_nav(class="{{ title }}")
|
||||||
#project_nav-container
|
#project_nav-container
|
||||||
@ -150,7 +145,6 @@ link(href="{{ url_for('static_pillar', filename='assets/css/project-main.css', v
|
|||||||
| {% endblock project_tree %}
|
| {% endblock project_tree %}
|
||||||
| {% endif %}
|
| {% endif %}
|
||||||
|
|
||||||
.project_split(title="Toggle Navigation [T]")
|
|
||||||
|
|
||||||
#project_context-container
|
#project_context-container
|
||||||
| {% if project.has_method('PUT') %}
|
| {% if project.has_method('PUT') %}
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
|
|
||||||
| {% if project.description %}
|
| {% if project.description %}
|
||||||
.node-details-description
|
.node-details-description
|
||||||
| {{ project.description }}
|
| {{ project.description | markdown }}
|
||||||
| {% endif %}
|
| {% endif %}
|
||||||
|
|
||||||
| {# Until we implement urls for pages
|
| {# Until we implement urls for pages
|
||||||
|
@ -1,115 +1 @@
|
|||||||
| {% block body %}
|
| {% extends "users/edit_embed_base.html" %}
|
||||||
|
|
||||||
#user-edit-container
|
|
||||||
|
|
||||||
#user-edit-header
|
|
||||||
.user-edit-name(title="Full Name") {{user.full_name}}
|
|
||||||
.user-edit-username(title="Username")
|
|
||||||
i.pi-users
|
|
||||||
| {{user.username}}
|
|
||||||
.user-edit-email(title="E-mail")
|
|
||||||
i.pi-email
|
|
||||||
| {{user.email}}
|
|
||||||
.user-edit-id(title="User ID")
|
|
||||||
i.pi-vcard
|
|
||||||
| {{user.user_id}}
|
|
||||||
|
|
||||||
a.copy-to-clipboard(
|
|
||||||
style="margin-left: auto",
|
|
||||||
name="Copy to Clipboard",
|
|
||||||
type="button",
|
|
||||||
href="javascript:void(0)",
|
|
||||||
data-clipboard-text="{{ user.user_id }}",
|
|
||||||
title="Copy ID to clipboard")
|
|
||||||
| (copy to clipboard)
|
|
||||||
p This user on:
|
|
||||||
=' '
|
|
||||||
a(href="https://store.blender.org/wp-admin/users.php?s={{ user.email | urlencode }}") Blender Store
|
|
||||||
=' | '
|
|
||||||
a(href="https://www.blender.org/id/admin/users/?flt1_4={{ user.email | urlencode }}") Blender ID
|
|
||||||
|
|
||||||
form(
|
|
||||||
id="user-edit-form",
|
|
||||||
method="POST",
|
|
||||||
enctype="multipart/form-data",
|
|
||||||
action="{{url_for('users.users_edit', user_id=user.user_id)}}")
|
|
||||||
|
|
||||||
| {% for field in form %}
|
|
||||||
|
|
||||||
| {% if field.name == 'csrf_token' %}
|
|
||||||
| {{ field }}
|
|
||||||
|
|
||||||
| {% else %}
|
|
||||||
|
|
||||||
| {% if field.type == 'HiddenField' %}
|
|
||||||
| {{ field }}
|
|
||||||
|
|
||||||
| {% else %}
|
|
||||||
|
|
||||||
.form-group(class="{{field.name}}{% if field.errors %} error{% endif %}")
|
|
||||||
| {{ field.label }}
|
|
||||||
| {{ field(class='form-control') }}
|
|
||||||
|
|
||||||
| {% if field.errors %}
|
|
||||||
ul.error
|
|
||||||
| {% for error in field.errors %}
|
|
||||||
li {{ error }}
|
|
||||||
| {% endfor %}
|
|
||||||
| {% endif %}
|
|
||||||
span.field-description {{ field.description }}
|
|
||||||
|
|
||||||
| {% endif %}
|
|
||||||
|
|
||||||
| {% endif %}
|
|
||||||
|
|
||||||
| {% endfor %}
|
|
||||||
|
|
||||||
.form-group.capabilities
|
|
||||||
label Capabilities
|
|
||||||
| {% if user.capabilities %}
|
|
||||||
ul
|
|
||||||
| {% for cap in user.capabilities|sort %}
|
|
||||||
li {{ cap }}
|
|
||||||
| {% endfor %}
|
|
||||||
| {% else %}
|
|
||||||
p
|
|
||||||
i.pi-cancel
|
|
||||||
| none
|
|
||||||
| {% endif %}
|
|
||||||
|
|
||||||
a#button-cancel.btn.btn-default(href="#", data-user-id='{{user.user_id}}') Cancel
|
|
||||||
|
|
||||||
input#submit_edit_user.btn.btn-default(
|
|
||||||
data-user-id="{{user.user_id}}",
|
|
||||||
type="submit" value="Submit")
|
|
||||||
|
|
||||||
#user-edit-notification
|
|
||||||
|
|
||||||
script(src="{{ url_for('static_pillar', filename='assets/js/vendor/clipboard.min.js')}}")
|
|
||||||
script(type="text/javascript").
|
|
||||||
$('#roles').select2();
|
|
||||||
|
|
||||||
$('#user-edit-form').submit(function(e){
|
|
||||||
e.preventDefault();
|
|
||||||
//- console.log($(this).serialize());
|
|
||||||
$.post($(this).attr('action'), $(this).serialize())
|
|
||||||
.done(function(data){
|
|
||||||
// This function is defined in index.pug.
|
|
||||||
displayUser('{{ user.user_id }}')
|
|
||||||
.done(function() {
|
|
||||||
$('#user-edit-notification').addClass('success').html('Success!');
|
|
||||||
});
|
|
||||||
})
|
|
||||||
.fail(function(data){
|
|
||||||
$('#user-edit-notification').addClass('fail').html('Houston!');
|
|
||||||
});
|
|
||||||
//- $("#user-edit-form").submit();
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#button-cancel').click(function(e){
|
|
||||||
$('#user-container').html('')
|
|
||||||
});
|
|
||||||
|
|
||||||
new Clipboard('.copy-to-clipboard');
|
|
||||||
|
|
||||||
| {% endblock %}
|
|
||||||
|
110
src/templates/users/edit_embed_base.pug
Normal file
110
src/templates/users/edit_embed_base.pug
Normal file
@ -0,0 +1,110 @@
|
|||||||
|
| {% block body %}
|
||||||
|
|
||||||
|
#user-edit-container
|
||||||
|
|
||||||
|
#user-edit-header
|
||||||
|
.user-edit-name(title="Full Name") {{user.full_name}}
|
||||||
|
.user-edit-username(title="Username")
|
||||||
|
i.pi-users
|
||||||
|
| {{user.username}}
|
||||||
|
.user-edit-email(title="E-mail")
|
||||||
|
i.pi-email
|
||||||
|
| {{user.email}}
|
||||||
|
.user-edit-id(title="User ID")
|
||||||
|
i.pi-vcard
|
||||||
|
| {{user.user_id}}
|
||||||
|
|
||||||
|
a.copy-to-clipboard(
|
||||||
|
style="margin-left: auto",
|
||||||
|
name="Copy to Clipboard",
|
||||||
|
type="button",
|
||||||
|
href="javascript:void(0)",
|
||||||
|
data-clipboard-text="{{ user.user_id }}",
|
||||||
|
title="Copy ID to clipboard")
|
||||||
|
| (copy to clipboard)
|
||||||
|
| {% block user_links %}{% endblock %}
|
||||||
|
form(
|
||||||
|
id="user-edit-form",
|
||||||
|
method="POST",
|
||||||
|
enctype="multipart/form-data",
|
||||||
|
action="{{url_for('users.users_edit', user_id=user.user_id)}}")
|
||||||
|
|
||||||
|
| {% for field in form %}
|
||||||
|
|
||||||
|
| {% if field.name == 'csrf_token' %}
|
||||||
|
| {{ field }}
|
||||||
|
|
||||||
|
| {% else %}
|
||||||
|
|
||||||
|
| {% if field.type == 'HiddenField' %}
|
||||||
|
| {{ field }}
|
||||||
|
|
||||||
|
| {% else %}
|
||||||
|
|
||||||
|
.form-group(class="{{field.name}}{% if field.errors %} error{% endif %}")
|
||||||
|
| {{ field.label }}
|
||||||
|
| {{ field(class='form-control') }}
|
||||||
|
|
||||||
|
| {% if field.errors %}
|
||||||
|
ul.error
|
||||||
|
| {% for error in field.errors %}
|
||||||
|
li {{ error }}
|
||||||
|
| {% endfor %}
|
||||||
|
| {% endif %}
|
||||||
|
span.field-description {{ field.description }}
|
||||||
|
|
||||||
|
| {% endif %}
|
||||||
|
|
||||||
|
| {% endif %}
|
||||||
|
|
||||||
|
| {% endfor %}
|
||||||
|
|
||||||
|
.form-group.capabilities
|
||||||
|
label Capabilities
|
||||||
|
| {% if user.capabilities %}
|
||||||
|
ul
|
||||||
|
| {% for cap in user.capabilities|sort %}
|
||||||
|
li {{ cap }}
|
||||||
|
| {% endfor %}
|
||||||
|
| {% else %}
|
||||||
|
p
|
||||||
|
i.pi-cancel
|
||||||
|
| none
|
||||||
|
| {% endif %}
|
||||||
|
|
||||||
|
a#button-cancel.btn.btn-default(href="#", data-user-id='{{user.user_id}}') Cancel
|
||||||
|
|
||||||
|
input#submit_edit_user.btn.btn-default(
|
||||||
|
data-user-id="{{user.user_id}}",
|
||||||
|
type="submit" value="Submit")
|
||||||
|
|
||||||
|
#user-edit-notification
|
||||||
|
|
||||||
|
script(src="{{ url_for('static_pillar', filename='assets/js/vendor/clipboard.min.js')}}")
|
||||||
|
script(type="text/javascript").
|
||||||
|
$('#roles').select2();
|
||||||
|
|
||||||
|
$('#user-edit-form').submit(function(e){
|
||||||
|
e.preventDefault();
|
||||||
|
//- console.log($(this).serialize());
|
||||||
|
$.post($(this).attr('action'), $(this).serialize())
|
||||||
|
.done(function(data){
|
||||||
|
// This function is defined in index.pug.
|
||||||
|
displayUser('{{ user.user_id }}')
|
||||||
|
.done(function() {
|
||||||
|
$('#user-edit-notification').addClass('success').html('Success!');
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.fail(function(data){
|
||||||
|
$('#user-edit-notification').addClass('fail').html('Houston!');
|
||||||
|
});
|
||||||
|
//- $("#user-edit-form").submit();
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#button-cancel').click(function(e){
|
||||||
|
$('#user-container').html('')
|
||||||
|
});
|
||||||
|
|
||||||
|
new Clipboard('.copy-to-clipboard');
|
||||||
|
|
||||||
|
| {% endblock %}
|
Loading…
x
Reference in New Issue
Block a user