Skip to content
Extraits de code Groupes Projets
Valider a17763bf rédigé par nicod's avatar nicod
Parcourir les fichiers

Pas de titre, pas de page en ligne et pas de preview sur les blocs

parent 6737d86e
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -47,7 +47,6 @@ function blocks_declarer_tables_objets_sql($tables) {
'field' => [
'id_bloc' => 'bigint(21) NOT NULL',
'id_blocs_type' => 'bigint(21) NOT NULL DEFAULT 0',
'titre' => 'text',
'valeurs' => 'text NOT NULL DEFAULT ""',
'date' => 'datetime NOT NULL DEFAULT "0000-00-00 00:00:00"',
'statut' => 'varchar(20) DEFAULT "0" NOT NULL',
......@@ -58,11 +57,10 @@ function blocks_declarer_tables_objets_sql($tables) {
'KEY id_blocs_type' => 'id_blocs_type',
'KEY statut' => 'statut',
],
'titre' => 'titre AS titre, "" AS lang',
'titre' => 'id_blocs_type AS titre',
'date' => 'date',
'champs_editables' => ['titre', 'id_blocs_type'],
'champs_versionnes' => ['titre', 'valeurs', 'id_blocs_type'],
'rechercher_champs' => ["titre" => 10],
'champs_editables' => ['id_blocs_type'],
'champs_versionnes' => ['valeurs', 'id_blocs_type'],
'tables_jointures' => ['spip_blocs_liens'],
'statut_textes_instituer' => [
'prepa' => 'texte_statut_en_cours_redaction',
......@@ -81,7 +79,7 @@ function blocks_declarer_tables_objets_sql($tables) {
],
],
'texte_changer_statut' => 'bloc:texte_changer_statut_bloc',
'page' => false,
];
$tables['spip_blocs_types'] = [
......@@ -100,12 +98,11 @@ function blocks_declarer_tables_objets_sql($tables) {
'UNIQUE KEY identifiant' => 'identifiant',
],
'titre' => 'titre AS titre, "" AS lang',
#'date' => '',
'champs_editables' => ['titre', 'saisies', 'identifiant'],
'champs_versionnes' => ['titre', 'saisies', 'identifiant'],
'rechercher_champs' => ["titre" => 10, 'identifiant' => 5],
'tables_jointures' => [],
'page' => false,
];
// jointure potentielle avec tous les objets
......
......@@ -58,14 +58,6 @@ function formulaires_editer_bloc_saisies_dist($id_bloc = 'new', $objet = null, $
'label' => _T('bloc:champ_bloc_config_label'),
],
'saisies' => [
[
'saisie' => 'input',
'options' => [
'nom' => 'titre',
'obligatoire' => 'oui',
'label' => _T('bloc:champ_titre_label'),
],
],
[
'saisie' => ($id_blocs_type ? 'hidden' : 'blocs_types'),
'options' => [
......@@ -156,7 +148,7 @@ function formulaires_editer_bloc_charger_dist($id_bloc = 'new', $objet = null, $
* @uses formulaires_editer_objet_verifier()
*/
//function formulaires_editer_bloc_verifier_dist($id_bloc = 'new', $objet = null, $id_objet = null, $retour = null) {
// $erreurs = formulaires_editer_objet_verifier('bloc', $id_bloc, ['titre', 'id_blocs_type']);
// $erreurs = formulaires_editer_objet_verifier('bloc', $id_bloc, ['id_blocs_type']);
// return $erreurs;
//}
......
......@@ -13,7 +13,6 @@ $GLOBALS[$GLOBALS['idx_lang']] = [
// C
'champ_bloc_config_label' => 'Configuration du bloc',
'champ_bloc_contenu_label' => 'Contenu du bloc',
'champ_titre_label' => 'Titre',
'champ_id_blocs_type_label' => 'Type de bloc',
'champ_valeurs_label' => 'Valeurs',
'confirmer_supprimer_bloc' => 'Confirmez-vous la suppression de cet bloc ?',
......
<BOUCLE_bloc(BLOCS){id_bloc}{statut?}>
[<div class="champ contenu_titre[ (#TITRE*|strlen|?{'',vide})]">
<div class="label"><:bloc:champ_titre_label:/> : </div>
<span dir="#LANG_DIR" class="#EDIT{titre} titre">(#TITRE)</span>
</div>]
[<div class="champ contenu_valeurs[ (#VALEURS*|strlen|?{'',vide})]">
<div class="label"><:bloc:champ_valeurs_label:/> : </div>
......
......@@ -5,26 +5,5 @@
[(#FORMULAIRE_INSTITUER_OBJET{bloc,#ID_BLOC})]
<div class='nb_elements'><!--nb_elements--></div>
[(#REM)
Bouton voir en ligne
]
<BOUCLE_publie(BLOCS){id_bloc}>
[(#VAL{redirect}
|generer_url_action{type=bloc&id=#ID_BLOC}
|parametre_url{var_mode,calcul}
|icone_horizontale{<:icone_voir_en_ligne:/>,racine})]
</BOUCLE_publie>
[(#AUTORISER{previsualiser,bloc,#ID_BLOC,'',#ARRAY{statut,#STATUT}})
[(#VAL{redirect}
|generer_url_action{type=bloc&id=#ID_BLOC}
|parametre_url{var_mode,preview}
|icone_horizontale{<:previsualiser:/>,preview})]
]
<//B_publie>
</div>
</BOUCLE_bloc>
[(#SET{defaut_tri,#ARRAY{
titre,1,
date,-1,
id_bloc,1,
points,-1
......@@ -11,19 +10,19 @@
<thead>
<tr class="first_row">
<th class="picto" scope="col"></th>
<th class="statut" scope="col">[(#TRI{statut,<span title="<:lien_trier_statut|attribut_html:/>">#</span>,ajax})]</th>
<th class="titre" scope="col">[(#TRI{titre,<:bloc:champ_titre_label:/>,ajax})]</th>
<th class="date" scope="col">[(#TRI{date,<:date:/>,ajax})]</th>
<th class="statut" scope="col">[(#TRI{statut,<span title="<:lien_trier_statut|attribut_html:/>">#</span>,ajax})]</th>
<th class="titre" scope="col">[(#TRI{id_blocs_type,<:bloc:champ_id_blocs_type_label:/>,ajax})]</th>
<th class="date" scope="col">[(#TRI{date,<:date:/>,ajax})]</th>
<th class="id" scope="col">[(#TRI{id_bloc,<:info_numero_abbreviation:/>,ajax})]</th>
</tr>
</thead>
<tbody>
<BOUCLE_liste_blocs(BLOCS){id_blocs_type?}{id_mot?}{id_auteur?}{where?}{statut?}{recherche?}{tri #ENV{par,num titre},#GET{defaut_tri}}{par titre}{pagination #ENV{nb,10}}>
<BOUCLE_liste_blocs(BLOCS){id_blocs_type?}{id_mot?}{id_auteur?}{where?}{statut?}{recherche?}{tri #ENV{par,date},#GET{defaut_tri}}{!par date}{pagination #ENV{nb,10}}>
<tr class="[(#COMPTEUR_BOUCLE|alterner{row_odd,row_even})]">
<td class="picto">[(#CHEMIN_IMAGE{bloc-16.png}|balise_img)]</td>
<td class="statut">[(#STATUT|puce_statut{bloc,#ID_BLOC})]</td>
<td class="titre principale">[(#LOGO_BLOC|image_reduire{20,26})]<a href="[(#ID_BLOC|generer_url_entite{bloc})]" title="<:info_numero_abbreviation|attribut_html:/> #ID_BLOC">[(#RANG). ]#TITRE</a></td>
<td class="date secondaire">[(#DATE|affdate_jourcourt)]</td>
<td class="statut">[(#STATUT|puce_statut{bloc,#ID_BLOC})]</td>
<td class="titre principale">[(#LOGO_BLOC|image_reduire{20,26})]<a href="[(#ID_BLOC|generer_url_entite{bloc})]" title="<:info_numero_abbreviation|attribut_html:/> #ID_BLOC">[(#RANG). ]#INFO_TITRE{blocs_type,#ID_BLOCS_TYPE}</a></td>
<td class="date secondaire">[(#DATE|affdate_jourcourt)]</td>
<td class="id">[(#AUTORISER{modifier,bloc,#ID_BLOC}|?{
<a href="[(#URL_ECRIRE{bloc_edit,id_bloc=#ID_BLOC})]">#ID_BLOC</a>,
#ID_BLOC
......
......@@ -2,7 +2,7 @@
<a href="#URL_ECRIRE{blocs}"><:bloc:titre_blocs:/></a>
<BOUCLE_hierarchie(BLOCS){id_bloc}{statut?}>
&gt; [(#URL_ECRIRE{blocs_type,id_blocs_type=#ID_BLOCS_TYPE}|lien_ou_expose{#INFO_TITRE{blocs_types,#ID_BLOCS_TYPE},''})]
&gt; <strong class="on">#TITRE</strong>
&gt; <strong class="on">#ID_BLOC</strong>
</BOUCLE_hierarchie>
[(#ENV{id_blocs_type}|oui)
&gt; [(#URL_ECRIRE{blocs_type,id_blocs_type=#ID_BLOCS_TYPE}|lien_ou_expose{#INFO_TITRE{blocs_types,#ID_BLOCS_TYPE},''})]
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter