Packages
A navigation tree representation with helpers to generate HTML out of it - depending of userroles. Also creates nice HTML navbars for Bootstrap. Implemented as Agent to hold config state.
Current section
Files
Jump to
Current section
Files
doc/NavigationTree.Server.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>NavigationTree.Server – navigation_tree v0.4.2</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="ExDoc">
<link rel="stylesheet" href="dist/app.css">
</head>
<body>
<div class="row row-offcanvas row-offcanvas-left">
<section id="sidebar" class="col-xs-6 col-sm-3 sidebar-offcanvas">
<p class="pull-right visible-xs">
<button type="button" class="btn btn-default btn-sm" data-toggle="offcanvas">
<span class="glyphicon glyphicon-search"></span>
</button>
</p>
<h1 id="full_list_header">
navigation_tree v0.4.2
</h1>
<h2 id="sub_list_header">
<a href="overview.html">Overview</a>
</h2>
<div class="nav">
<span><a id="modules_list" href="#full_list">Modules</a></span>
<span role="presentation" class="disabled">Exceptions</span>
<span role="presentation" class="disabled">Protocols</span>
</div>
<div id="search">
<div class="col-xs-10">
<div class="input-group input-group-sm">
<label for="search_field" class="sr-only">Search</label>
<input type="text" id="search_field" class="form-control" placeholder="Search" autocomplete="off" autofocus="autofocus" results="0">
<span class="input-group-btn">
<button class="btn btn-default" type="button"><span class="glyphicon glyphicon-search"></span></button>
</span>
</div><!-- /input-group -->
</div><!-- /.col-xs-10 -->
<div class="col-xs-2" id="spinning">
<span></span>
</div><!-- /.col-xs-2 -->
</div><!-- /#search .row -->
<script src="dist/sidebar_items.js" defer></script>
<ul id="full_list">
</ul>
<div id="no_results"></div>
</section><!--/.sidebar-offcanvas -->
<section id="content" class="col-xs-12 col-sm-9">
<div class="breadcrumbs">
<button type="button" class="btn btn-default btn-sm" data-toggle="offcanvas">
<span class="glyphicon glyphicon-menu-hamburger"></span>
</button>
navigation_tree v0.4.2 → <a href="overview.html">Overview</a> → <a href="NavigationTree.html#content">NavigationTree</a> → <a href="NavigationTree.Server.html#content">Server</a>
</div>
<h1>
NavigationTree.Server
</h1>
<ul class="summary_links">
<li><a href="#summary_details">Summary</a></li>
<li><a href="#functions_details">Functions</a></li>
</ul>
<section id="summary_details" class="details_list">
<h1>Summary</h1>
<table class="summary">
<tr>
<td class="summary_signature"><a href="#as_html/2">as_html(roles, atom2)</a></td>
<td class="summary_synopsis"><p>Return an HTML string suitable to fit in a navbar in a Twitter/Bootstrap
environment</p>
</td>
</tr>
<tr>
<td class="summary_signature"><a href="#get/0">get()</a></td>
<td class="summary_synopsis"></td>
</tr>
<tr>
<td class="summary_signature"><a href="#node_of/1">node_of(path)</a></td>
<td class="summary_synopsis"><p>Returns node at given path. Path must be a either</p>
</td>
</tr>
<tr>
<td class="summary_signature"><a href="#path_of/1">path_of(url)</a></td>
<td class="summary_synopsis"><p>Returns node path for given url</p>
</td>
</tr>
<tr>
<td class="summary_signature"><a href="#start_link/1">start_link(root_node)</a></td>
<td class="summary_synopsis"></td>
</tr>
</table>
</section>
<section id="functions_details" class="details_list">
<h1>Functions</h1>
<section class="detail">
<div class="detail_header" id="as_html/2">
<span class="signature"><strong>as_html(roles, atom2)</strong></span>
<div class="detail_header_links">
<span class="detail_type">(function)</span>
<a href="#as_html/2" class="detail_link" title="Link to this function">#</a>
<a class="to_top_link" href="#content" title="To the top of the page">↑</a>
</div>
</div>
<section class="docstring">
<p>Return an HTML string suitable to fit in a navbar in a Twitter/Bootstrap
environment. </p>
<ul>
<li>roles must be a list of user roles (strings)
</li>
<li>atom2 must be either
</li>
<li>:bootstrap (currently the only supported framework)
</li>
<li>a module implementing tree_to_html( tree, roles )
</li>
</ul>
</section>
</section>
<section class="detail">
<div class="detail_header" id="get/0">
<span class="signature"><strong>get()</strong></span>
<div class="detail_header_links">
<span class="detail_type">(function)</span>
<a href="#get/0" class="detail_link" title="Link to this function">#</a>
<a class="to_top_link" href="#content" title="To the top of the page">↑</a>
</div>
</div>
<section class="docstring">
</section>
</section>
<section class="detail">
<div class="detail_header" id="node_of/1">
<span class="signature"><strong>node_of(path)</strong></span>
<div class="detail_header_links">
<span class="detail_type">(function)</span>
<a href="#node_of/1" class="detail_link" title="Link to this function">#</a>
<a class="to_top_link" href="#content" title="To the top of the page">↑</a>
</div>
</div>
<section class="docstring">
<p>Returns node at given path. Path must be a either</p>
<ul>
<li>A list of node names traversing the stree starting with root node’s name
</li>
<li>An URL string. URL must be absolute e.g. “/admin/users”
</li>
</ul>
</section>
</section>
<section class="detail">
<div class="detail_header" id="path_of/1">
<span class="signature"><strong>path_of(url)</strong></span>
<div class="detail_header_links">
<span class="detail_type">(function)</span>
<a href="#path_of/1" class="detail_link" title="Link to this function">#</a>
<a class="to_top_link" href="#content" title="To the top of the page">↑</a>
</div>
</div>
<section class="docstring">
<p>Returns node path for given url</p>
</section>
</section>
<section class="detail">
<div class="detail_header" id="start_link/1">
<span class="signature"><strong>start_link(root_node)</strong></span>
<div class="detail_header_links">
<span class="detail_type">(function)</span>
<a href="#start_link/1" class="detail_link" title="Link to this function">#</a>
<a class="to_top_link" href="#content" title="To the top of the page">↑</a>
</div>
</div>
<section class="docstring">
</section>
</section>
</section>
</section> <!--/content -->
</div><!--/row -->
<script src="dist/app.js"></script>
</body>
</html>