client/test/templates/youtube_template.html
author ymh <ymh.work@gmail.com>
Thu, 05 Jan 2017 16:26:07 +0100
changeset 647 eaaa1efce396
permissions -rw-r--r--
add examples for youtube node types, add a way to open node urls with a single click

<h2>
    <span class="Rk-CloseX">&times;</span>
    <% if (options.show_node_tooltip_color) { %>
        <span class="Rk-UserColor" style="background: <%-node.color%>;"></span>
    <% } %>
    <span class="Rk-Display-Title">
        <% if (node.uri) { %>
            <a href="<%-node.uri%>" target="_blank">
        <% } %>
        <%=node.title%>
        <% if (node.uri) { %></a><% } %>
    </span>
</h2>
<% if (node.uri && options.show_node_tooltip_uri) { 
    var youtube_id = get_youtube_id(node.uri);
    if(youtube_id) {
    %>
      <iframe width="255" height="143" src="https://www.youtube.com/embed/<%=youtube_id%>" frameborder="0"></iframe>
<%  } 
    else { %> 
    <p>The node url is not a youtube video</p>
<%  }
   }
%>
<a href="#?idnode=<%-node._id%>"><%-renkan.translate("Link to the node")%></a>