# HG changeset patch # User cavaliet # Date 1322821911 -3600 # Node ID e804ae133f27b5888c7645cf354a21bf5a2260a0 # Parent 67c323b2f4d1922e741e61c9fc9d9c1ec1a5f4c0 icon images in css, little debug, update document profile configuration diff -r 67c323b2f4d1 -r e804ae133f27 Controller/WikiTagController.php --- a/Controller/WikiTagController.php Thu Dec 01 12:11:10 2011 +0100 +++ b/Controller/WikiTagController.php Fri Dec 02 11:31:51 2011 +0100 @@ -686,6 +686,7 @@ $qb->addOrderBy('t.normalizedLabel','ASC'); $qb->addOrderBy('t.label','ASC'); $reverse_sort = "labd"; + break; case "nbd": $qb->addOrderBy('nb_docs','DESC'); $qb->addOrderBy('t.popularity','DESC'); diff -r 67c323b2f4d1 -r e804ae133f27 Resources/public/css/wikiTag.css --- a/Resources/public/css/wikiTag.css Thu Dec 01 12:11:10 2011 +0100 +++ b/Resources/public/css/wikiTag.css Fri Dec 02 11:31:51 2011 +0100 @@ -1,6 +1,6 @@ @charset "UTF-8"; -.wikitag_hand_cursor, .wikitag_remove_wp_link, .wikitag_remove_tag_from_list, .wikitag_reset_wp_info { +.wikitag_hand_cursor, .wikitag_reset_wp_info { cursor: pointer; } #wikitag_actions span { @@ -13,6 +13,9 @@ #wikitag_table td, th { padding: 3px; } +#wikitag_table tr, #wikitag_alltags_table tr { + height: 25px; +} .wikitag_text_centered { text-align: center; } @@ -28,15 +31,51 @@ tr.wikitag_oddline:hover, tr.wikitag_evenline:hover { background: lightblue; } -.wikitag_updown_td { - width: 12px; - cursor: n-resize; -} tr.wikitag_dragged_row td { color: yellow; background-color: black; } +/* Styles for images in tables */ +.wikitag_a_icon { + width: 16px; + height: 16px; + display: block; + margin: 0 auto; +} +.wikitag_wp_link { + background-image: url('../images/arrow_right.png'); +} +.wikitag_wp_nolink { + background-image: url('../images/wikipedia_search.png'); +} +.wikitag_wp_permalink { + background-image: url('../images/clock_arrow.png'); +} +.wikitag_wp_dbplink { + background-image: url('../images/arrow_green_right.png'); +} +.wikitag_td_icon { + width: 16px; + height: 16px; + margin: 0 auto; + background-repeat: no-repeat; + background-position: center; +} +.wikitag_updown_td { + cursor: n-resize; + background-image: url('../images/arrow_up_down.png'); +} +.wikitag_remove_wp_link { + cursor: pointer; + background-image: url('../images/red_cross.png'); +} +.wikitag_remove_tag_from_list { + cursor: pointer; + background-image: url('../images/tag_remove.png'); +} + + /* styles for the 4 types of STATUS */ .wikitag_null_result { color: #000000; diff -r 67c323b2f4d1 -r e804ae133f27 Resources/public/js/wikiTag.js --- a/Resources/public/js/wikiTag.js Thu Dec 01 12:11:10 2011 +0100 +++ b/Resources/public/js/wikiTag.js Fri Dec 02 11:31:51 2011 +0100 @@ -359,35 +359,6 @@ }); } -function wikitag_up_down(arrow) -{ - if ($(arrow).is(".up")) { - mv = "u"; - } else { - mv = "d"; - } - var url = tag_up_down_url; - var id_tag = $(arrow).attr('id'); - // This indicates the position (from 0) of the tag in the list. NB : it is different from the TagSheet.order in the database. - var pos_tag = $(arrow).attr('pos'); - $.ajax({ - url: url, - type: 'POST', - data: {csrfmiddlewaretoken:global_csrf_token, - wikitag_document_id:$('#wikitag_document_id').val(), - wikitag_document_profile:$('#wikitag_document_profile').val(), - tag_id:id_tag, - move:mv, - tag_pos:pos_tag - }, - // bug with jquery >= 1.5, "json" adds a callback so we don't specify dataType - //dataType: 'json', - success: function(msg, textStatus, XMLHttpRequest) { - $('#wikitag_table_container').html(msg); - wikitag_init_tags_events(); - } - }); -} function add_tag(tag_label) { diff -r 67c323b2f4d1 -r e804ae133f27 Resources/views/WikiTag/TagListTable.html.twig --- a/Resources/views/WikiTag/TagListTable.html.twig Thu Dec 01 12:11:10 2011 +0100 +++ b/Resources/views/WikiTag/TagListTable.html.twig Fri Dec 02 11:31:51 2011 +0100 @@ -3,18 +3,10 @@ id {% if sort != "laba" and sort != "labd" %} - {% if searched and searched != "" %} - label - {% else %} - label - {% endif %} + label {% else %} label   - {% if searched and searched != "" %} - - {% else %} - - {% endif %} + {% if sort == "laba" %} {% else %} @@ -31,18 +23,10 @@ Alias {% if sort != "nba" and sort != "nbd" %} - {% if searched and searched != "" %} - Nb de
fiches
- {% else %} - Nb de
fiches
- {% endif %} + Nb de
fiches
{% else %} Nb de
fiches - {% if searched and searched != "" %} - - {% else %} - - {% endif %} + {% if sort == "nba" %} {% else %} @@ -53,18 +37,10 @@ {% if sort != "popa" and sort != "popd" %} - {% if searched and searched != "" %} - Popularité - {% else %} - Popularité - {% endif %} + Popularité {% else %} Popularité   - {% if searched and searched != "" %} - - {% else %} - - {% endif %} + {% if sort == "popa" %} {% else %} @@ -80,21 +56,21 @@ {{tag.label}} {{tag.originallabel}} - {% if tag.wikipediaurl and tag.wikipediaurl != "" %} - - {% else %} - - {% endif %} + {% if tag.wikipediaurl and tag.wikipediaurl != "" %} + + {% else %} + + {% endif %} {% if tag.dbpediauri and tag.dbpediauri != "" %} - + {% else %}   {% endif %} {% if tag.category %}{{ tag.category.label }}{% endif %} - {{tag.label}} + {% if tag.alias %}{{tag.alias}}{% endif %} {% if nb_docs > 0 %} diff -r 67c323b2f4d1 -r e804ae133f27 Resources/views/WikiTag/documentTags.html.twig --- a/Resources/views/WikiTag/documentTags.html.twig Thu Dec 01 12:11:10 2011 +0100 +++ b/Resources/views/WikiTag/documentTags.html.twig Fri Dec 02 11:31:51 2011 +0100 @@ -2,7 +2,7 @@ {% block document_tags %}
- {% if columns is null or "wikipedia_link" in columns %} + {% if columns is null or "sort_tag" in columns %} Trier les tags : {% endif %} Ajouter un tag : OK diff -r 67c323b2f4d1 -r e804ae133f27 Resources/views/WikiTag/tagTable.html.twig --- a/Resources/views/WikiTag/tagTable.html.twig Thu Dec 01 12:11:10 2011 +0100 +++ b/Resources/views/WikiTag/tagTable.html.twig Fri Dec 02 11:31:51 2011 +0100 @@ -40,7 +40,7 @@ {{loop.index}} {% endif %} {% if columns is null or "move_up_down" in columns %} - updown + {% endif %} {% if columns is null or "id" in columns %} {{t.tag.id}} @@ -50,17 +50,17 @@ {% endif %} {% if columns is null or "wikipedia_link" in columns %} - {% if t.tag.wikipediaurl and t.tag.wikipediaurl != "" %} - - {% else %} - - {% endif %} + {% if t.tag.wikipediaurl and t.tag.wikipediaurl != "" %} + + {% else %} + + {% endif %} {% endif %} {% if columns is null or "wikipedia_permalink" in columns %} {% if t.wikipediarevisionid %} - + {% else %}   {% endif %} @@ -69,7 +69,7 @@ {% if columns is null or "dbpedia_link" in columns %} {% if t.tag.dbpediauri and t.tag.dbpediauri != "" %} - + {% else %}   {% endif %} @@ -79,13 +79,14 @@ {% if t.tag.category %}{{ t.tag.category.label }}{% endif %} {% endif %} {% if columns is null or "remove_wikipedia_link" in columns %} - {{t.tag.label}} + {% endif %} {% if columns is null or "alias" in columns %} {% if t.tag.alias %}{{t.tag.alias}}{% endif %} {% endif %} {% if columns is null or "remove_tag_from_list" in columns %} - {{t.tag.label}} + + {% endif %} {% endfor %}