# 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 @@
{% else %}
@@ -31,18 +23,10 @@
{% else %}
@@ -53,18 +37,10 @@
{% else %}
@@ -80,21 +56,21 @@
- {% else %}
-
- {% endif %}
+ {% if tag.wikipediaurl and tag.wikipediaurl != "" %}
+
+ {% else %}
+
+ {% endif %}
+
{% else %}
{% endif %}
 }})