
	{% set base_view_url = app.config.base_url ~ "/" ~ current_route %}

		

	{% if module_config.visibility_inheritance_relations is defined and module_config.visibility_inheritance_relations|length > 0 %}	{% set tot_in_mod = 0 %}
	{% for relmodule,relmod in module_config.visibility_inheritance_relations %}
		{% if app.modules[relmodule] is defined %}{% set tot_in_mod = tot_in_mod+1 %}{% endif %}
	{% endfor %} 	
	{% if tot_in_mod>0 %}
	<div class="col s12 m12">
            <div class="card {{themebasiccolor}}">
          
              <div class="card-tabs">
                <ul class="tabs tabs-transparent">
                  <li class="tab"><a onclick="gotoPage('{{app.config.base_url}}/{{current_route}}/{{view_name}}/{% if target_field is defined %}?field={{target_field}}{% endif %}');" {% if inherited_view==false %}class="active"{% endif %} style="cursor: pointer">{{modulename|trans}}</a></li>
                  {% for relmodule,relmod in module_config.visibility_inheritance_relations %}
                  
                  {% if app.modules[relmodule] is defined %}
                  <li class="tab"><a class="tooltipped {% if parent_module is defined and parent_module.route.route==relmodule %}active{% endif %}" data-position="top" data-delay="50" data-tooltip="{{modulename|trans}} related by {{relmodule|trans}}" onclick="gotoPage('{{app.config.base_url}}/{{current_route}}/{{view_name}}/related/{{app.modules[relmodule].route.route}}/{% if target_field is defined %}?field={{target_field}}{% endif %}');" style="cursor: pointer">
				 
                  {% if app.modules[relmodule].icon is defined %} 
			      <i style="font-size: 1.4rem" class="material-icons">{{app.modules[relmodule].icon}}</i>
			      {% else %}
			      <small>by </small>&nbsp;{{app.modules[relmodule].route.label|trans}}
				  {% endif %}
			      {% endif %} 
		      </a></li>
                  {% endfor %}               
                <div class="indicator" style="right: 173.594px; left: 173.406px;"></div></ul>
              </div>
            </div>
	</div>
	{% endif %}
	{% endif %}
	

	{% if view_name is defined and view_name!="popup" %}
	
	 <div class="col s8 left-align">
		 	
		 		 			 	
		 	{% if view_name!="list" %}		 			 	
		 	{% set view_url = base_view_url ~ "/list/" %}
		 	{% if inherited_view %}{% set view_url = view_url ~ "related/" ~ parent_module.route.route %}{% endif %}		 	
			<a class="btn {{themebasiccolor}} waves-effect waves-light btn-small" href="javascript:gotoPage('{{view_url}}')"><i class="material-icons large left">view_list</i>View List</a>
			{% endif %}
		 	
		 	{% if view_name!="grid" and module_config.grid.enabled is defined and module_config.grid.enabled %}
		 	{% set view_url = base_view_url ~ "/grid/" %}
		 	{% if inherited_view %}{% set view_url = view_url ~ "related/" ~ parent_module.route.route %}{% endif %}	
			<a class="btn {{themebasiccolor}} waves-effect waves-light btn-small" href="javascript:gotoPage('{{view_url}}')"><i class="material-icons large left">view_module</i>View Grid</a>
			{% endif %}
			
			{% if view_name!="kanban" and module_config.kanban.enabled is defined and module_config.kanban.enabled %}
			{% set view_url = base_view_url ~ "/kanban/" %}
			{% if inherited_view %}{% set view_url = view_url ~ "related/" ~ parent_module.route.route %}{% endif %}	
			<a class="btn {{themebasiccolor}} waves-effect waves-light btn-small" href="javascript:gotoPage('{{view_url}}')"><i class="material-icons large left">view_week</i>View Kanban</a>
			{% endif %}
			
			{% if view_name!="gantt" and module_config.gantt.enabled is defined and module_config.gantt.enabled %}
			{% set view_url = base_view_url ~ "/gantt/" %}
			{% if inherited_view %}{% set view_url = view_url ~ "related/" ~ parent_module.route.route %}{% endif %}	
			<a class="btn {{themebasiccolor}} waves-effect waves-light btn-small" href="javascript:gotoPage('{{view_url}}')"><i class="material-icons large left">view_day</i>View Gantt</a>
			{% endif %}
			
			{% if view_name!="calendar" and module_config.calendar.enabled is defined and module_config.calendar.enabled %}
			{% set view_url = base_view_url ~ "/calendar/" %}
			{% if inherited_view %}{% set view_url = view_url ~ "related/" ~ parent_module.route.route %}{% endif %}	
			<a class="btn {{themebasiccolor}} waves-effect waves-light btn-small" href="javascript:gotoPage('{{view_url}}')"><i class="material-icons large left">date_range</i>View Calendar</a>
			{% endif %}
		</div>
		<div class="col s4 right-align">
			{% if module_config.create_enabled is defined and module_config.create_enabled %} 
			<a class="btn {{themebasiccolor}} waves-effect waves-light btn-small" href="javascript:gotoPage('{{app.config.base_url}}/{{current_route}}/create')"><i class="material-icons large left">add</i>Create New</a>
			{% endif %}
			
			{% if upload_document_enabled is defined and upload_document_enabled %} 
				<a class="btn {{themebasiccolor}} waves-effect waves-light btn-small" href="#uploadmodal"><i class="material-icons large left">file_upload</i>Upload Document</a>
	{% endif %}
			
		</div>
		
		{% endif %}
