View | Details | Raw Unified | Return to bug 34035
Collapse All | Expand All

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc (-16 lines)
Lines 132-153 Link Here
132
[% END %]
132
[% END %]
133
133
134
<script>
134
<script>
135
    [% IF ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'TagsEnabled' ) == 1 ) %]
136
        var MSG_TAGS_DISABLED = _("Sorry, tags are not enabled on this system.");
137
        var MSG_TAG_ALL_BAD = _("Error! Your tag was entirely markup code.  It was NOT added.  Please try again with plain text.");
138
        var MSG_ILLEGAL_PARAMETER = _("Error! Illegal parameter");
139
        var MSG_TAG_SCRUBBED = _("Note: your tag contained markup code that was removed. The tag was added as ");
140
        var MSG_ADD_TAG_FAILED = _("Error! Adding tags failed at");
141
        var MSG_ADD_TAG_FAILED_NOTE = _("Note: you can only tag an item with a given term once.  Check 'My Tags' to see your current tags.");
142
        var MSG_DELETE_TAG_FAILED = _("Error! You cannot delete the tag");
143
        var MSG_DELETE_TAG_FAILED_NOTE = _("Note: you can only delete your own tags.")
144
        var MSG_LOGIN_REQUIRED = _("You must be logged in to add tags.");
145
        var MSG_TAGS_ADDED = _("Tags added: ");
146
        var MSG_TAGS_DELETED = _("Tags added: ");
147
        var MSG_TAGS_ERRORS = _("Errors: ");
148
        var MSG_MULTI_ADD_TAG_FAILED = _("Unable to add one or more tags.");
149
        var MSG_NO_TAG_SPECIFIED = _("No tag was specified.");
150
    [% END %]
151
    [% IF (query_desc) %]
135
    [% IF (query_desc) %]
152
        var query_desc = "[% query_desc | html %]";
136
        var query_desc = "[% query_desc | html %]";
153
        var querystring = "[% querystring | html %]";
137
        var querystring = "[% querystring | html %]";
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt (-1 / +1 lines)
Lines 395-401 Link Here
395
395
396
                    var tag = $("#tagsel_new").val();
396
                    var tag = $("#tagsel_new").val();
397
                    if (!tag || (tag == "")) {
397
                    if (!tag || (tag == "")) {
398
                        alert(MSG_NO_TAG_SPECIFIED);
398
                        alert( _("No tag was specified.") );
399
                        return false;
399
                        return false;
400
                    }
400
                    }
401
401
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt (-1 / +1 lines)
Lines 1797-1803 Link Here
1797
                        var thisid = $(this).attr("title");
1797
                        var thisid = $(this).attr("title");
1798
                        var tag = $("#newtag"+thisid).val();
1798
                        var tag = $("#newtag"+thisid).val();
1799
                        if (!tag || (tag == "")) {
1799
                        if (!tag || (tag == "")) {
1800
                            alert(MSG_NO_TAG_SPECIFIED);
1800
                            alert( _("No tag was specified.") );
1801
                            return false;
1801
                            return false;
1802
                        }
1802
                        }
1803
                        KOHA.Tags.add_tag_button(thisid, tag);
1803
                        KOHA.Tags.add_tag_button(thisid, tag);
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt (-2 / +2 lines)
Lines 647-653 Link Here
647
647
648
                var tag = $("#tagsel_new").val();
648
                var tag = $("#tagsel_new").val();
649
                if (!tag || (tag == "")) {
649
                if (!tag || (tag == "")) {
650
                    alert(MSG_NO_TAG_SPECIFIED);
650
                    alert( _("No tag was specified.") );
651
                    return false;
651
                    return false;
652
                }
652
                }
653
653
Lines 888-894 Link Here
888
                    var thisid = $(this).attr("title");
888
                    var thisid = $(this).attr("title");
889
                    var tag = $("#newtag"+thisid).val();
889
                    var tag = $("#newtag"+thisid).val();
890
                    if (!tag || (tag == "")) {
890
                    if (!tag || (tag == "")) {
891
                        alert(MSG_NO_TAG_SPECIFIED);
891
                        alert( _("No tag was specified.") );
892
                        return false;
892
                        return false;
893
                    }
893
                    }
894
                    KOHA.Tags.add_tag_button(thisid, tag);
894
                    KOHA.Tags.add_tag_button(thisid, tag);
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt (-2 / +2 lines)
Lines 882-888 var MSG_CONFIRM_REMOVE_SHARE = _("Are you sure you want to remove this share?"); Link Here
882
882
883
        var tag = $("#tagsel_new").val();
883
        var tag = $("#tagsel_new").val();
884
        if (!tag || (tag == "")) {
884
        if (!tag || (tag == "")) {
885
            alert(MSG_NO_TAG_SPECIFIED);
885
            alert( _("No tag was specified.") );
886
            return false;
886
            return false;
887
        }
887
        }
888
888
Lines 975-981 $(function() { Link Here
975
          var thisid = $(this).attr("title");
975
          var thisid = $(this).attr("title");
976
          var tag = $("#newtag"+thisid).val();
976
          var tag = $("#newtag"+thisid).val();
977
          if (!tag || (tag == "")) {
977
          if (!tag || (tag == "")) {
978
              alert(MSG_NO_TAG_SPECIFIED);
978
              alert( _("No tag was specified.") );
979
              return false;
979
              return false;
980
          }
980
          }
981
          KOHA.Tags.add_tag_button(thisid, tag);
981
          KOHA.Tags.add_tag_button(thisid, tag);
(-)a/koha-tmpl/opac-tmpl/bootstrap/js/tags.js (-14 / +13 lines)
Lines 39-47 KOHA.Tags = { Link Here
39
    },
39
    },
40
    common_status : function(addcount, delcount, errcount) {
40
    common_status : function(addcount, delcount, errcount) {
41
        var cstat = "";
41
        var cstat = "";
42
        if (addcount && addcount > 0) {cstat += MSG_TAGS_ADDED + addcount + ".  " ;}
42
        if (addcount && addcount > 0) {cstat += __("Tags added: ") + addcount + ".  " ;}
43
        if (delcount && delcount > 0) {cstat += MSG_TAGS_DELETED + delcount + ".  " ;}
43
        if (delcount && delcount > 0) {cstat += __("Tags deleted: ") + delcount + ".  " ;}
44
        if (errcount && errcount > 0) {cstat += MSG_TAGS_ERRORS + errcount + ". " ;}
44
        if (errcount && errcount > 0) {cstat += __("Errors: ") + errcount + ". " ;}
45
        return cstat;
45
        return cstat;
46
    },
46
    },
47
    set_tag_status : function(tagid, newstatus) {
47
    set_tag_status : function(tagid, newstatus) {
Lines 57-69 KOHA.Tags = { Link Here
57
    },
57
    },
58
58
59
    tag_message: {
59
    tag_message: {
60
    tagsdisabled : function(arg) {return (MSG_TAGS_DISABLED);},
60
    tagsdisabled : function(arg) {return ( __("Sorry, tags are not enabled on this system.") );},
61
    scrubbed_all_bad : function(arg) {return (MSG_TAG_ALL_BAD);},
61
    scrubbed_all_bad : function(arg) {return ( __("Error! Your tag was entirely markup code.  It was NOT added.  Please try again with plain text.") );},
62
    badparam : function(arg) {return (MSG_ILLEGAL_PARAMETER+" "+arg);},
62
    badparam : function(arg) {return ( __("Error! Illegal parameter") +" "+arg);},
63
    scrubbed : function(arg) {return (MSG_TAG_SCRUBBED+" "+arg);},
63
    scrubbed : function(arg) {return ( __("Note: your tag contained markup code that was removed. The tag was added as ") +" "+arg);},
64
    failed_add_tag : function(arg) {return (MSG_ADD_TAG_FAILED+ " '"+arg+"'. \n"+MSG_ADD_TAG_FAILED_NOTE);},
64
    failed_add_tag : function(arg) {return ( __("Error! Adding tags failed at") + " '"+arg+"'. \n"+ __("Note: you can only tag an item with a given term once.  Check 'Tags' to see your current tags.") );},
65
    failed_delete  : function(arg) {return (MSG_DELETE_TAG_FAILED+ " '"+arg+"'. \n"+MSG_DELETE_TAG_FAILED_NOTE);},
65
    failed_delete  : function(arg) {return ( __("Error! You cannot delete the tag") + " '"+arg+"'. \n"+ __("Note: you can only delete your own tags.") );},
66
    login : function(arg) {return (MSG_LOGIN_REQUIRED);}
66
    login : function(arg) {return ( __("You must be logged in to add tags.") );}
67
    },
67
    },
68
68
69
    // Used to tag multiple items at once.  The main difference
69
    // Used to tag multiple items at once.  The main difference
Lines 93-99 KOHA.Tags = { Link Here
93
                    if (response[bib]) {
93
                    if (response[bib]) {
94
                        var added = response[bib]["added"];
94
                        var added = response[bib]["added"];
95
                        if (added > 0) {
95
                        if (added > 0) {
96
                            status = MSG_TAGS_ADDED + added + ".  ";
96
                            status = __("Tags added: ") + added + ".  ";
97
                        KOHA.Tags.set_tag_status(mytagid + "_status", status);
97
                        KOHA.Tags.set_tag_status(mytagid + "_status", status);
98
                        }
98
                        }
99
99
Lines 103-109 KOHA.Tags = { Link Here
103
                            bibErrors = true;
103
                            bibErrors = true;
104
                            var errid = "tagerr_" + bib;
104
                            var errid = "tagerr_" + bib;
105
                            var errstat = "<a id=\"" + errid + "\" class=\"tagerror\" href=\"#\">";
105
                            var errstat = "<a id=\"" + errid + "\" class=\"tagerror\" href=\"#\">";
106
                            errstat += MSG_TAGS_ERRORS + errors.length + ". ";
106
                            errstat += __("Errors: ") + errors.length + ". ";
107
                            errstat += "</a>";
107
                            errstat += "</a>";
108
                        KOHA.Tags.append_tag_status(mytagid + "_status", errstat);
108
                        KOHA.Tags.append_tag_status(mytagid + "_status", errstat);
109
                            var errmsg = "";
109
                            var errmsg = "";
Lines 123-129 KOHA.Tags = { Link Here
123
                if (bibErrors || response["global_errors"]) {
123
                if (bibErrors || response["global_errors"]) {
124
                    var msg = "";
124
                    var msg = "";
125
                    if (bibErrors) {
125
                    if (bibErrors) {
126
                        msg = MSG_MULTI_ADD_TAG_FAILED;
126
                        msg = __("Unable to add one or more tags.");
127
                    }
127
                    }
128
128
129
                    // Show global errors in a dialog.
129
                    // Show global errors in a dialog.
130
- 

Return to bug 34035