modifications sur le template default
[mw_sourceml] / app / out / default / views / sources / source / documents.php
index 56af9e0..df8d6a8 100644 (file)
@@ -2,7 +2,7 @@
 
   $documents = $source["reference"] ? $source["reference"]["documents"] : $source["documents"];
   if($documents) :
-
+  $mw_out = $this->helper("mw_helper_out");
 ?>
 
 
       </div>
       <?php endif; ?>
       <div class="no_player"><!-- --></div>
-      <a href="<?php echo $document["url"] ?>"><?php echo $document["nom"]; ?></a>
+      <?php
+        $ext = explode(".", $document["url"]);
+        if(count($ext) > 1) $ext = $ext[count($ext) - 1];
+        else $ext = $document["url"];
+        if(strlen($ext) > 16) $ext = "(...) ".substr($ext, -16);
+      ?>
+      <a href="<?php echo $document["url"] ?>" title="<?php echo $mw_out->esc_attr($document["nom"]); ?>"><?php echo $ext; ?></a>
     </li>
 
   <?php endforeach; ?>