Browse Source

lien vers le gestionnaire de tickets, si pertinent

voir_toute_version 1.9.0
Maïeul 11 months ago
parent
commit
34d341e449
4 changed files with 22 additions and 1 deletions
  1. +5
    -0
      aside/article.html
  2. +15
    -0
      galactic_contrib_fonctions.php
  3. +1
    -0
      lang/galactic_contrib_fr.php
  4. +1
    -1
      paquet.xml

+ 5
- 0
aside/article.html View File

@ -56,7 +56,12 @@
#SET{url,#SRC_ARCHIVE}
})]
<p><a href="#GET{url}" class="spip_out">#SRC_ARCHIVE</a></p>
[(#SET{tickets,#SRC_ARCHIVE|get_tickets_from_source})]
</BOUCLE_une_source>
[(#GET{tickets}|oui)
<h2><:galactic_contrib:tickets:></h2>
<p><a href="#GET{tickets}" class="spip_out">#GET{tickets}</a></p>
]
[<p class="maj"><:galactic_contrib:dernieres_modifs:>&nbsp;: <strong>(#DATE_MODIF|affdate{d/m/Y})</strong></p>]
</div>


+ 15
- 0
galactic_contrib_fonctions.php View File

@ -77,3 +77,18 @@ function get_articles_from_url($url){
return $cache[$url] = $contexte['id_article'];
}
/**
* A partir de l'url de la source, renvoie l'url de gestionnaire de ticket
* @param string $url
* @return string|null
**/
function get_tickets_from_source($url) {
if (strpos($url, 'http') === false) {
return null;
}
// Supprimer le .git éventuel à la fin de l'url
$url = preg_replace('#\.git$#', '', $url);
// Et ajouter /issues, cela marche pour gitlab, gitea, github
$url = "$url/issues";
return $url;
}

+ 1
- 0
lang/galactic_contrib_fr.php View File

@ -100,6 +100,7 @@ $GLOBALS[$GLOBALS['idx_lang']] = array(
// T
'telechargement' => 'Téléchargements',
'telechargements' => 'Téléchargements',
'tickets' => 'Tickets',
// V
'versions' => 'Compatibilité',


+ 1
- 1
paquet.xml View File

@ -1,7 +1,7 @@
<paquet
prefix="galactic_contrib"
categorie="squelette"
version="1.8.2"
version="1.9.0"
etat="stable"
compatibilite="[3.1.0;3.2.*]"
logo="prive/themes/spip/images/galactic_contrib-64.png"


Loading…
Cancel
Save