...
 
Commits (4)
......@@ -233,8 +233,8 @@ dl:nth-child(even) {
/* Navbar stylesheet */
.horizontal-nav {
min-width: 100%;
width: 100%;
min-width: 100vw;
width: 100vw;
height: 5rem;
min-height: 5rem;
position: fixed;
......@@ -248,6 +248,7 @@ dl:nth-child(even) {
.vertical-nav {
min-width: 14rem;
width: 14rem;
min-height: 100vh;
height: 100vh;
position: fixed;
top: 0;
......@@ -286,13 +287,66 @@ dl:nth-child(even) {
/* Page content stylesheet */
.page-content {
width: calc(100% - 15rem);
margin-left: 15rem;
margin-top: 3rem;
width: 100vw;
position: absolute;
left: 15rem;
top: 6rem;
transition: all 0.4s;
}
.page-title {
padding-bottom: 3rem;
font-variant: small-caps;
}
/* Référentiel page stylesheet */
#ref-main-div {
border-radius: 5px;
width: 80vw;
height: 100vh;
margin: 1rem;
-webkit-box-shadow: 0px 0px 5px 0px rgba(0,0,0,0.1);
-moz-box-shadow: 0px 0px 5px 0px rgba(0,0,0,0.1);
box-shadow: 0px 0px 5px 0px rgba(0,0,0,0.1);
}
#ref-header-row {
padding-top: 3rem;
}
.ref-count-financements-text {
font-size: 1.5em;
}
#ref-count-financements-number {
font-size: 2.5em;
font-style: bolder;
}
/*#ref-filter-row {
}
#ref-results-row {
}*/
.ref-results-count {
color: #000; /* Fallback for older browsers */
color: rgba(0, 0, 0, 0.5);
}
#ref-results-list {
padding-top: 2rem;
}
.ref-horizontal-separator {
border: none;
border-top: 1px solid #bfbfbf;
height: 1px;
width: 90%;
position:relative;
}
#financement-filter-select {
width: 15%;
}
\ No newline at end of file
<financements>
<h2 class="page-title">Liste des types de financements <a href=https://framagit.org/ybon/trefle/tree/master/trefle/config/financements.yml target=_blank></a><i class="icon" style="vertical-align: baseline;">edit</i></h2>
<h2 class="page-title">
Liste des types de financements
<a href=https://framagit.org/ybon/trefle/tree/master/trefle/config/financements.yml target=_blank>
<i class="icon" style="vertical-align: baseline;">edit</i>
</a>
</h2>
<dl each={ this.financements }>
<dt>{ intitule }</dt>
<dd if={ racine.endsWith('.rules') }><strong>Règles racine</strong>: <a href="#/rules/{ racine }">{ racine } <i class="icon">arrow_forward</i></a></dd>
......
<rules>
<div id="ref-main-div" class="bg-light">
<div id="ref-header-row">
<div class="container">
<div class="row mb-4">
<div id="ref-count-financements" class="col-md-3 col-sm-6 col-xs-12">
<span id="ref-count-financements-number" class="ref-count-financements-text">{ this.count_financements }&nbsp;</span>
<span class="ref-count-financements-text" if={ this.lt_two }>financement</span>
<span class="ref-count-financements-text" if={ !this.lt_two }>financements</span>
</div>
<div id="ref-create-financement" class="col-md-3 col-sm-6 col-xs-12 my-auto">
<button href="#" class="btn btn-outline-success" disabled>Créer un financement</button>
</div>
<div id="ref-search-financement" class="col-md-6 col-sm-12 col-xs-12 my-auto">
<div class="form-inline pull-right">
<div class="form-group mx-sm-3 mb-2">
<input class="form-control" id="financement-search-field" name="financement-search" type="search" placeholder="Rechercher">
</div>
<button class="btn btn-success mb-2" id="financement-search-button">OK</button>
</div>
</div>
</div>
<div class="row">
<div id="ref-last-update" class="col-md-12">
Dernière mise à jour le <> à <>
</div>
</div>
</div>
</div>
<hr class="ref-horizontal-separator">
<div id="ref-filter-row" class="container">
<label for="financement-filter-select">Filtrer par</label>
<select id="financement-filter-select" class="form-control" name="financement-filter-select" disabled>
<option>Tous les publics</option>
</select>
</div>
<hr class="ref-horizontal-separator">
<div id="ref-result-row" class="container">
<span class="ref-results-count" if={ this.lt_two }>
Résultat ({ this.count_financements })
</span>
<span class="ref-results-count" if={ !this.lt_two }>
Résultats ({ this.count_financements })
</span>
<div id="ref-results-list">
<ul each={ this.financements } class="container">
<li class="row">
<span class="col-md-3 col-sm-12">
<strong>{ intitule }</strong>
</span>
<span class="col-md-8 col-sm-11">
<button each={ tag in _tags} class="btn btn-outline-info" href="#" disabled>{ tag }</button>
</span>
<span class="col-md-1 col-sm-1 pull-right">
<button href="https://framagit.org/ybon/trefle/tree/master/trefle/config/financements.yml" target="_blank" class="text-dark btn btn-outline-light" disabled>
<i class="icon" style="vertical-align: baseline;">edit</i>
</button>
</span>
</li>
<hr class="ref-list-horizontal-separator">
</ul>
</div>
</div>
</div>
<!--
<aside>
<h2 class="page-title">Règles de gestion</h2>
<rules-menu title="Règles régionales" namespace="région"></rules-menu>
<rules-menu title="Règles nationales" namespace="règles nationales"></rules-menu>
<rules-menu title="Règles des organismes paritaires" namespace="organisme paritaire"></rules-menu>
<rules-menu title="Règles de rémunérations" namespace="rémunération"></rules-menu>
<rules-menu title="Règles de normalisation" namespace="normalisation"></rules-menu>
<financements-menu title="Règles régionales" namespace="région"></financements-menu>
<financements-menu title="Règles nationales" namespace="règles nationales"></financements-menu>
<financements-menu title="Règles des organismes paritaires" namespace="organisme paritaire"></financements-menu>
<financements-menu title="Règles de rémunérations" namespace="rémunération"></financements-menu>
<financements-menu title="Règles de normalisation" namespace="normalisation"></financements-menu>
</aside>
<div if={ this.rule }>
<h3>{ this.rule.path } <a href=https://framagit.org/ybon/trefle/tree/master/trefle/config/rules/{ this.rule.path } target=_blank> <i class="icon">edit</i></a></h3>
<rule content={ this.rule.data } class=with-lines></rule>
<div if={ this.financement }>
<h3>{ this.financement.path } <a href=https://framagit.org/ybon/trefle/tree/master/trefle/config/financements/{ this.financement.path } target=_blank> <i class="icon">edit</i></a></h3>
<financement content={ this.financement.data } class=with-lines></financement>
</div>
<div if={ !this.rule }>
<div if={ !this.financement }>
<p>Sélectionner une règle dans le menu.</p>
</div>
<financements-menu>
<h4>{ this.opts.title }</h4>
<ul>
<li each={ props, id in this.parent.financements } if={ props.path.startsWith(this.opts.namespace) }>
<a href="#financements/{ id }" class='{ on: this.parent.parent.active && this.parent.parent.active.startsWith(id) }' title={ id }>
{ props.name }
</a>
</li>
</ul>
</financements-menu>
-->
<script>
this.rules = []
this.rule = null
this.active = null
this.on('mount', () => this.load())
this.financements = []
this.count_financements = 0
this.lt_two = false;
this.load_data = (data) => {
RULES = data
this.rules = data
if (this.opts.id) {
this.active = decodeURIComponent(this.opts.id)
this.rule = data[this.active.split('~')[0]]
}
this.update()
// Force element target after DOM has been rebuilt
// (eg. if we have a ~line in the URL, to highlight it).
window.location.hash = window.location.hash
}
this.on('mount', () => this.load())
this.load = () => {
if (RULES) return this.load_data(RULES)
request('../explore/rules')
.then(this.load_data)
request('../explore/financements')
.then(data => {
this.financements = data
for (var i = 0; i < this.financements.length; i++) {
// Riot sucks on `tags`…
this.financements[i]['_tags'] = this.financements[i]['tags']
this.count_financements++
}
if (this.count_financements<2) this.lt_two=true;
this.update()
})
}
this.mixin(View)
$(document).ready(function() {
$("#ref-main-div").css("height","100%");
})
</script>
<style scoped>
:scope.tools {
min-width: 1200px;
grid-template-columns: 1fr 4fr;
}
h3 {
font-variant: small-caps;
}
......@@ -56,9 +132,3 @@
</rules>
<rules-menu>
<h4>{ this.opts.title }</h4>
<ul>
<li each={ props, id in this.parent.rules } if={ props.path.startsWith(this.opts.namespace) }><a href="#rules/{ id }" class='{ on: this.parent.parent.active && this.parent.parent.active.startsWith(id) }' title={ id }>{ props.name }</a></li>
</ul>
</rules-menu>
......@@ -35,7 +35,7 @@
<div class="page-content">
<schema class=tools></schema>
<glossary class=full></glossary>
<rules class=tools></rules>
<rules></rules>
<simulate class=tools></simulate>
<financements class=full></financements>
<scenarios class=tools></scenarios>
......