first commit.

This commit is contained in:
CBS Information System 2022-05-11 12:30:30 +09:00
commit df8ad45ff5
9 changed files with 229 additions and 0 deletions

229
src/templates/head.html Normal file
View File

@ -0,0 +1,229 @@
<!DOCTYPE HTML>
<!--
* @author Nicolas CARPi <nico-git@deltablot.email>
* @copyright 2012 Nicolas CARPi
* @see https://www.elabftw.net Official website
* @license AGPL-3.0
* @package elabftw
-->
<html lang='{{ App.getLang() | slice(0, 2) }}'>
<head>
<meta http-equiv='Content-type' content='text/html;charset=UTF-8' />
<meta name='viewport' content='width=device-width, initial-scale=1'>
<meta name='description' content='Electronic lab notebook - eLabFTW'>
{% if App.Config.configArr.autologout_time != '0' %}
<meta http-equiv='refresh' content='{{ App.Config.configArr.autologout_time }};url=app/logout.php' />
{% endif %}
<meta name='csrf-token' content='{{ App.Session.get('csrf') }}'/>
<link rel='icon' type='image/ico' href='app/img/favicon.ico' />
<link rel='apple-touch-icon' href='app/img/apple-touch-icon.png' />
<link rel='apple-touch-icon-precomposed' href='app/img/apple-touch-icon-precomposed.png'>
<title>{{ block('title') }} - CBS Labnote</title>
{% if App.Users.userData.use_ove %}
<!-- load open vector editor -->
<link rel='stylesheet' type='text/css' href='assets/ove/main.css?v={{ v }}'>
<script defer src='assets/ove/open-vector-editor.min.js?v={{ v }}'></script>
{% endif %}
<!-- see builder.js to see what gets inside these files -->
<!-- CSS -->
<link rel='stylesheet' media='all' href='assets/vendor.min.css?v={{ v }}' />
<link rel='stylesheet' media='all' href='assets/elabftw.min.css?v={{ v }}' />
<!-- disable tracking of 3dmol.js, has to be loaded before vendor.bundle.js -->
<script src='assets/3Dmol-notrack.bundle.js?v={{ v }}'></script>
<!-- all js dependencies bundled by webpack (see builder.js) -->
<script defer src='assets/vendor.bundle.js?v={{ v }}'></script>
<!-- the main JS bundle with all the elabftw TS code (see builder.js) -->
<script defer src='assets/main.bundle.js?v={{ v }}'></script>
<!-- rest of js libs -->
<script defer src='assets/jslibs.bundle.js?v={{ v }}'></script>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-5ZJBPJGFK8"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-5ZJBPJGFK8');
</script>
</head>
<body>
<!-- container-fluid is from bootstrap -->
<div id='container' class='container-fluid'>
<!-- begin main menu -->
<nav class='navbar navbar-expand-lg navbar-dark'>
{% if App.Session.has('is_auth') %}
<!-- hamburger menu -->
<button class='navbar-toggler' type='button' data-toggle='collapse' data-target='#main-nav' aria-controls='main-nav' aria-expanded='false' aria-label='Toggle navigation'>
<span class='navbar-toggler-icon'></span>
</button>
{% endif %}
<!-- logo -->
<a href='index.php'><img class='navbar-brand' src='assets/images/logo-header.png' width='110' height='40' alt='elabftw' /></a>
{% if App.Session.has('is_auth') %}
<!-- everything in there will be part of the burger -->
<div class='collapse navbar-collapse' id='main-nav'>
<div class='navbar-nav'>
<a class='nav-item nav-link {{ App.Request.getScriptName|split('/')|last == 'experiments.php' ? 'active' }}'
href='experiments.php'>{% trans %}Experiment{% plural 2 %}Experiments{% endtrans %}</a>
<a class='nav-item nav-link {{ App.Request.getScriptName|split('/')|last == 'database.php' ? 'active' }}'
href='database.php'>{{ 'Database'|trans }}</a>
{% if not App.Session.has('is_anon') %}
<a class='nav-item nav-link {{ App.Request.getScriptName|split('/')|last == 'team.php' ? 'active' }}'
href='team.php'>{{ 'Team'|trans }}</a>
{% endif %}
<a class='nav-item nav-link {{ App.Request.getScriptName|split('/')|last == 'search.php' ? 'active' }}'
href='search.php'>{{ 'Search'|trans }}</a>
<a class='nav-item nav-link' href='{{ App.linkHref }}' target='_blank' rel='noopener'>{{ App.linkName }}</a>
</div>
<!-- SEARCH BAR -->
<form class='nav-item form-inline ml-auto' method='get' action='{{ App.Request.getScriptName }}'>
{% if App.Request.getScriptName|split('/')|last == 'experiments.php' or App.Request.getScriptName|split('/')|last == 'database.php' %}
<input class='form-control big-search {{- extendedError ? ' is-invalid' }}' type='search' name='q' aria-label='Search' size='20' value='{{ App.Request.query.get('q') }}' />
{% endif %}
</form>
<!-- Notification bell -->
{% if App.Session.has('is_auth') and not App.Session.has('is_anon') %}
<div class='nav-item dropdown ml-3' id='navbarNotifDiv'>
<a class='nav-link dropdown-toggle' href='#' id='navbarNotifDropdown' role='button' aria-label='{{ 'Notifications'|trans }}' data-toggle='dropdown' aria-haspopup='true' aria-expanded='false'><i class='far fa-bell navbar-icon {{ App.notifsArr|filter(n => n.is_ack == 0)|length ? 'active' }}'></i></a>
<div class='dropdown-menu dropdown-menu-right' id='navbar-notif-dropdown' aria-labelledby='navbarNotifDropdown'><span class='dropdown-header'>{{ 'Notifications'|trans }}</span>
{% if App.notifsArr %}
{% for notif in App.notifsArr %}
<div class='notification p-3' data-ack='{{ notif.is_ack }}'>{{ notif|notifWeb|raw }}</div>
{% endfor %}
<div class='dropdown-divider'></div>
<a class='dropdown-item hover-danger' href='#' data-action='destroy-notif'><i class='fas fa-trash-alt fa-fw' title='{{ 'Clear all'|trans }}'></i> {{ 'Clear all'|trans }}</a>
{% else %}
<div class='notification p-3'>{{ 'No new notifications to show.'|trans }}</div>
<div class='dropdown-divider'></div>
{% endif %}
<a href='ucp.php?tab=5' class='dropdown-item'><i class='fas fa-cogs fa-fw'></i> {{ 'Notifications settings'|trans }}</a>
</div>
</div>
{% endif %}
<div class='nav-item dropdown'>
<a class='nav-link dropdown-toggle' href='#' id='navbarDropdown' role='button' aria-label='{{ 'User menu'|trans }}' data-toggle='dropdown' aria-haspopup='true' aria-expanded='false'><i class='fas fa-user navbar-icon'></i></a>
<div class='dropdown-menu dropdown-menu-right' aria-labelledby='navbarDropdown'><h6 class='dropdown-header'>{{ 'Logged in as'|trans }} {{ App.Users.userData.firstname|default('Anonymous')|raw }}</h6>
{% if App.Session.has('is_auth') and not App.Session.has('is_anon') %}
<a class='dropdown-item' href='ucp.php'><i class='fas fa-cogs fa-fw'></i> {{ 'User panel'|trans }}</a>
<a class='dropdown-item' href='profile.php'><i class='fas fa-user fa-fw'></i> {{ 'My Profile'|trans }}</a>
<a class='dropdown-item' data-action='toggle-todolist' href='#'><i class='fas fa-list fa-fw'></i> {{ 'Todolist'|trans }}</a>
{% if App.Session.get('is_admin') %}
<a class='dropdown-item' href='admin.php'><i class='fas fa-tools fa-fw'></i> {{ 'Admin panel'|trans }}</a>
{% endif %}
{% if App.Session.get('is_sysadmin') %}
<a class='dropdown-item' href='sysconfig.php'><i class='fas fa-tools fa-fw' style='color:#e6614c'></i> {{ 'Sysadmin panel'|trans }}</a>
{% endif %}
{% endif %}
<a class='dropdown-item' data-action='toggle-modal' data-target='helpModal'><i class='fas fa-question-circle fa-fw'></i> {{ 'Help'|trans }}</a>
<div class='dropdown-divider'></div>
<a class='dropdown-item' href='#' data-action='logout'><i class='fas fa-sign-out-alt fa-fw'></i> {{ 'Logout'|trans }}</a>
</div>
</div>
</div>
{% endif %}
</nav>
<!-- SHOW FAVTAGS PANEL -->
<a class='clickable float-left' data-action='toggle-favtags' id='favtags-opener' title='{{ 'Open favorite tags'|trans }}' hidden>
<i class='fas fa-chevron-right fa-2x'></i>
</a>
<div class='real-container'>
<noscript><!-- show warning if javascript is disabled -->
<div class='alert alert-danger'>
<p class='font-weight-bold'>Javascript is disabled. Please enable Javascript to view eLabFTW in all its glory.</p>
</div>
</noscript>
<!-- Modal for help -->
<div class='modal fade' id='helpModal' tabindex='-1' role='dialog' aria-labelledby='helpModalLabel' aria-hidden='true'>
<div class='modal-dialog' role='document'>
<div class='modal-content'>
<div class='modal-header'>
<h5 class='modal-title' id='helpModalLabel'>{{ 'Help'|trans }}</h5>
<button type='button' class='close' data-dismiss='modal' aria-label='Close'>
<span aria-hidden='true'>&times;</span>
</button>
</div>
<div class='modal-body' data-wait='{{ 'Please wait' }}'>
<ul>
<li class='tip'>
{{ 'Make sure to read the %suser guide%s.'|trans|format("<a href='https://doc.elabftw.net/user-guide.html'>", "</a>")|raw }}
</li>
<li class='tip'>
{{ "You can use a TODOlist by pressing '%s'."|trans|format(App.Users.userData.sc_todo) }}
</li>
<li class='tip'>
{{ 'You can have experiments templates (%sControl Panel%s).'|trans|format("<a href='ucp.php?tab=3'>", "</a>")|raw }}
</li>
<li class='tip'>
{{ 'You can make links inside the text by typing # and an autocomplete menu will spawn with a list of Experiments/Items.'|trans }}
</li>
<li class='tip'>
{{ 'The admin of a team can edit the status and the types of items available (%sAdmin Panel%s).'|trans|format("<a href='admin.php?tab=4'>", "</a>")|raw }}
</li>
<li class='tip'>
{{ 'If you press Ctrl Shift D in the editor, the date will appear under the cursor.'|trans }}
</li>
<li class='tip'>
{{ 'Custom shortcuts are available (%sControl Panel%s).'|trans|format("<a href='ucp.php?tab=1'>", "</a>")|raw }}
</li>
<li class='tip'>
{{ 'You can duplicate experiments in one click.'|trans }}
</li>
<li class='tip'>
{{ 'Click a tag to list all items with this tag.'|trans }}
</li>
<li class='tip'>
{{ 'Once timestamped an experiment cannot be unlocked or modified. Only comments can be added.'|trans }}
</li>
</ul>
</div>
<div class='modal-footer'>
<button type='button' class='btn btn-secondary' data-dismiss='modal'>{{ 'Close'|trans }}</button>
</div>
</div>
</div>
</div>
<!-- Search error feedback -->
{% if (App.Request.getScriptName|split('/')|last == 'experiments.php'
or App.Request.getScriptName|split('/')|last == 'database.php'
) and extendedError %}
{{ extendedError|msg('ko') }}
{% endif %}
<!-- TITLE -->
<!-- login and register pages will have this title hidden -->
<h1 {% if hideTitle %}hidden{%endif%}>{% block title %}{{ App.pageTitle }}{% endblock %}</h1>
<!-- INFO BOX (FLASH MESSAGES) -->
{% for ok in App.ok %}
{{ ok|msg('ok') }}
{% endfor %}
{% for ko in App.ko %}
{{ ko|msg('ko') }}
{% endfor %}
{% for warning in App.warning %}
{{ warning|msg('warning') }}
{% endfor %}
<!-- ANNOUNCEMENT -->
{% if App.Config.configArr.announcement %}
{{ App.Config.configArr.announcement|msg('warning') }}
{% endif %}
<div id='output'></div>

BIN
web/app/img/CBS-57x57.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

BIN
web/app/img/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

BIN
web/app/img/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

BIN
web/app/img/logo.psd Normal file

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.