<?if $arg.node.geo() && window.GMap2?>
  <h2>Location</h2>
  <div style="width: 500px; height: 300px;">
    <?run setTimeout(partial(showNodeOnMap, $arg.node, $node), 0);?>
  </div>
<?if.?>

<?for type ["s", "p", "o"]?>
  <?if $arg[type].triples.length || userWrite()?>
    <div class="block nodeview">
      <h2>
        Relations with <?part $arg.node?>
        <?if $arg.node.url?><a href="[?t $arg.node.url?]" target="_blank">»</a><?if.?>
        as the <?t fullName[type]?>.
      </h2>
      <?if $arg[type].triples.length?>
        <?triples {triples: $arg[type].triples, ignore: type,
                   more: loadMoreNeighbours($arg.node, type, $arg[type].more)}?>
      <?if.?>
      <?if userWrite()?>
        <p><span class="linkish">Add relation</span>.<?event click addTripleDialog(type, $arg.node);?></p>
      <?if.?>
    </div>
  <?if.?>
<?for.?>

<?if (!($arg.s.triples.length || $arg.o.triples.length || $arg.p.triples.length || userWrite()))?>
  <div class="block">
    <h2>No relations.</h2>
    <p>Node <?part $arg.node?> is not connected to anything.</p>
  </div>
<?if.?>
