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

(-)a/koha-tmpl/intranet-tmpl/lib/codemirror/xml.min.js (-1 / +1 lines)
Line 1 Link Here
1
!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}(function(y){"use strict";var N={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},z={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};y.defineMode("xml",function(t,e){var i,a,l=t.indentUnit,u={},n=e.htmlMode?N:z;for(var r in n)u[r]=n[r];for(var r in e)u[r]=e[r];function d(e,n){function t(t){return(n.tokenize=t)(e,n)}var r=e.next();return"<"==r?e.eat("!")?e.eat("[")?e.match("CDATA[")?t(o("atom","]]>")):null:e.match("--")?t(o("comment","--\x3e")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),t(function r(o){return function(t,e){for(var n;null!=(n=t.next());){if("<"==n)return e.tokenize=r(o+1),e.tokenize(t,e);if(">"==n){if(1!=o)return e.tokenize=r(o-1),e.tokenize(t,e);e.tokenize=d;break}}return"meta"}}(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),n.tokenize=o("meta","?>"),"meta"):(i=e.eat("/")?"closeTag":"openTag",n.tokenize=c,"tag bracket"):"&"!=r?(e.eatWhile(/[^&<]/),null):(e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"))?"atom":"error"}function c(t,e){var n=t.next();if(">"==n||"/"==n&&t.eat(">"))return e.tokenize=d,i=">"==n?"endTag":"selfcloseTag","tag bracket";if("="==n)return i="equals",null;if("<"!=n)return/[\'\"]/.test(n)?(e.tokenize=(r=n,(o=function(t,e){for(;!t.eol();)if(t.next()==r){e.tokenize=c;break}return"string"}).isInAttribute=!0,o),e.stringStartCol=t.column(),e.tokenize(t,e)):(t.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word");e.tokenize=d,e.state=g,e.tagName=e.tagStart=null;var r,o,a=e.tokenize(t,e);return a?a+" tag error":"tag error"}function o(n,r){return function(t,e){for(;!t.eol();){if(t.match(r)){e.tokenize=d;break}t.next()}return n}}function s(t,e,n){this.prev=t.context,this.tagName=e,this.indent=t.indented,this.startOfLine=n,(u.doNotIndent.hasOwnProperty(e)||t.context&&t.context.noIndent)&&(this.noIndent=!0)}function f(t){t.context&&(t.context=t.context.prev)}function m(t,e){for(var n;;){if(!t.context)return;if(n=t.context.tagName,!u.contextGrabbers.hasOwnProperty(n)||!u.contextGrabbers[n].hasOwnProperty(e))return;f(t)}}function g(t,e,n){return"openTag"==t?(n.tagStart=e.column(),p):"closeTag"==t?h:g}function p(t,e,n){return"word"==t?(n.tagName=e.current(),a="tag",k):u.allowMissingTagName&&"endTag"==t?(a="tag bracket",k(t,e,n)):(a="error",p)}function h(t,e,n){if("word"!=t)return u.allowMissingTagName&&"endTag"==t?(a="tag bracket",x(t,e,n)):(a="error",b);var r=e.current();return n.context&&n.context.tagName!=r&&u.implicitlyClosed.hasOwnProperty(n.context.tagName)&&f(n),n.context&&n.context.tagName==r||!1===u.matchClosing?(a="tag",x):(a="tag error",b)}function x(t,e,n){return"endTag"!=t?(a="error",x):(f(n),g)}function b(t,e,n){return a="error",x(t,0,n)}function k(t,e,n){if("word"==t)return a="attribute",w;if("endTag"!=t&&"selfcloseTag"!=t)return a="error",k;var r=n.tagName,o=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==t||u.autoSelfClosers.hasOwnProperty(r)?m(n,r):(m(n,r),n.context=new s(n,r,o==n.indented)),g}function w(t,e,n){return"equals"==t?v:(u.allowMissing||(a="error"),k(t,0,n))}function v(t,e,n){return"string"==t?T:"word"==t&&u.allowUnquoted?(a="string",k):(a="error",k(t,0,n))}function T(t,e,n){return"string"==t?T:k(t,0,n)}return d.isInText=!0,{startState:function(t){var e={tokenize:d,state:g,indented:t||0,tagName:null,tagStart:null,context:null};return null!=t&&(e.baseIndent=t),e},token:function(t,e){if(!e.tagName&&t.sol()&&(e.indented=t.indentation()),t.eatSpace())return null;i=null;var n=e.tokenize(t,e);return(n||i)&&"comment"!=n&&(a=null,e.state=e.state(i||n,t,e),a&&(n="error"==a?n+" error":a)),n},indent:function(t,e,n){var r=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+l;if(r&&r.noIndent)return y.Pass;if(t.tokenize!=c&&t.tokenize!=d)return n?n.match(/^(\s*)/)[0].length:0;if(t.tagName)return!1!==u.multilineTagIndentPastTag?t.tagStart+t.tagName.length+2:t.tagStart+l*(u.multilineTagIndentFactor||1);if(u.alignCDATA&&/<!\[CDATA\[/.test(e))return 0;var o=e&&/^<(\/)?([\w_:\.-]*)/.exec(e);if(o&&o[1])for(;r;){if(r.tagName==o[2]){r=r.prev;break}if(!u.implicitlyClosed.hasOwnProperty(r.tagName))break;r=r.prev}else if(o)for(;r;){var a=u.contextGrabbers[r.tagName];if(!a||!a.hasOwnProperty(o[2]))break;r=r.prev}for(;r&&r.prev&&!r.startOfLine;)r=r.prev;return r?r.indent+l:t.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:u.htmlMode?"html":"xml",helperType:u.htmlMode?"html":"xml",skipAttribute:function(t){t.state==v&&(t.state=k)}}}),y.defineMIME("text/xml","xml"),y.defineMIME("application/xml","xml"),y.mimeModes.hasOwnProperty("text/html")||y.defineMIME("text/html",{name:"xml",htmlMode:!0})});
1
!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}(function(y){"use strict";var N={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},z={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};y.defineMode("xml",function(t,e){var i,a,l=t.indentUnit,u={},n=e.htmlMode?N:z;for(var r in n)u[r]=n[r];for(var r in e)u[r]=e[r];function d(e,n){function t(t){return(n.tokenize=t)(e,n)}var r=e.next();return"<"==r?e.eat("!")?e.eat("[")?e.match("CDATA[")?t(o("atom","]]>")):null:e.match("--")?t(o("comment","--\x3e")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),t(function r(o){return function(t,e){for(var n;null!=(n=t.next());){if("<"==n)return e.tokenize=r(o+1),e.tokenize(t,e);if(">"==n){if(1!=o)return e.tokenize=r(o-1),e.tokenize(t,e);e.tokenize=d;break}}return"meta"}}(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),n.tokenize=o("meta","?>"),"meta"):(i=e.eat("/")?"closeTag":"openTag",n.tokenize=c,"tag bracket"):"&"!=r?(e.eatWhile(/[^&<]/),null):(e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"))?"atom":"error"}function c(t,e){var n=t.next();if(">"==n||"/"==n&&t.eat(">"))return e.tokenize=d,i=">"==n?"endTag":"selfcloseTag","tag bracket";if("="==n)return i="equals",null;if("<"!=n)return/[\'\"]/.test(n)?(e.tokenize=(r=n,(o=function(t,e){for(;!t.eol();)if(t.next()==r){e.tokenize=c;break}return"string"}).isInAttribute=!0,o),e.stringStartCol=t.column(),e.tokenize(t,e)):(t.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word");e.tokenize=d,e.state=g,e.tagName=e.tagStart=null;var r,o,a=e.tokenize(t,e);return a?a+" tag error":"tag error"}function o(n,r){return function(t,e){for(;!t.eol();){if(t.match(r)){e.tokenize=d;break}t.next()}return n}}function s(t,e,n){this.prev=t.context,this.tagName=e,this.indent=t.indented,this.startOfLine=n,(u.doNotIndent.hasOwnProperty(e)||t.context&&t.context.noIndent)&&(this.noIndent=!0)}function f(t){t.context&&(t.context=t.context.prev)}function m(t,e){for(var n;;){if(!t.context)return;if(n=t.context.tagName,!u.contextGrabbers.hasOwnProperty(n)||!u.contextGrabbers[n].hasOwnProperty(e))return;f(t)}}function g(t,e,n){return"openTag"==t?(n.tagStart=e.column(),p):"closeTag"==t?h:g}function p(t,e,n){return"word"==t?(n.tagName=e.current(),a="tag",k):u.allowMissingTagName&&"endTag"==t?(a="tag bracket",k(t,e,n)):(a="error",p)}function h(t,e,n){if("word"!=t)return u.allowMissingTagName&&"endTag"==t?(a="tag bracket",x(t,e,n)):(a="error",b);var r=e.current();return n.context&&n.context.tagName!=r&&u.implicitlyClosed.hasOwnProperty(n.context.tagName)&&f(n),n.context&&n.context.tagName==r||!1===u.matchClosing?(a="tag",x):(a="tag error",b)}function x(t,e,n){return"endTag"!=t?(a="error",x):(f(n),g)}function b(t,e,n){return a="error",x(t,0,n)}function k(t,e,n){if("word"==t)return a="attribute",w;if("endTag"!=t&&"selfcloseTag"!=t)return a="error",k;var r=n.tagName,o=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==t||u.autoSelfClosers.hasOwnProperty(r)?m(n,r):(m(n,r),n.context=new s(n,r,o==n.indented)),g}function w(t,e,n){return"equals"==t?v:(u.allowMissing||(a="error"),k(t,0,n))}function v(t,e,n){return"string"==t?T:"word"==t&&u.allowUnquoted?(a="string",k):(a="error",k(t,0,n))}function T(t,e,n){return"string"==t?T:k(t,0,n)}return d.isInText=!0,{startState:function(t){var e={tokenize:d,state:g,indented:t||0,tagName:null,tagStart:null,context:null};return null!=t&&(e.baseIndent=t),e},token:function(t,e){if(!e.tagName&&t.sol()&&(e.indented=t.indentation()),t.eatSpace())return null;i=null;var n=e.tokenize(t,e);return(n||i)&&"comment"!=n&&(a=null,e.state=e.state(i||n,t,e),a&&(n="error"==a?n+" error":a)),n},indent:function(t,e,n){var r=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+l;if(r&&r.noIndent)return y.Pass;if(t.tokenize!=c&&t.tokenize!=d)return n?n.match(/^(\s*)/)[0].length:0;if(t.tagName)return!1!==u.multilineTagIndentPastTag?t.tagStart+t.tagName.length+2:t.tagStart+l*(u.multilineTagIndentFactor||1);if(u.alignCDATA&&/<!\[CDATA\[/.test(e))return 0;var o=e&&/^<(\/)?([\w_:\.-]*)/.exec(e);if(o&&o[1])for(;r;){if(r.tagName==o[2]){r=r.prev;break}if(!u.implicitlyClosed.hasOwnProperty(r.tagName))break;r=r.prev}else if(o)for(;r;){var a=u.contextGrabbers[r.tagName];if(!a||!a.hasOwnProperty(o[2]))break;r=r.prev}for(;r&&r.prev&&!r.startOfLine;)r=r.prev;return r?r.indent+l:t.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:u.htmlMode?"html":"xml",helperType:u.htmlMode?"html":"xml",skipAttribute:function(t){t.state==v&&(t.state=k)}}}),y.defineMIME("text/xml","xml"),y.defineMIME("application/xml","xml"),y.mimeModes.hasOwnProperty("text/html")||y.defineMIME("text/html",{name:"xml",htmlMode:!0})});
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/oai-pmh-harvester/dashboard.tt (-209 / +192 lines)
Lines 1-100 Link Here
1
[% USE raw %]
2
[% USE Asset %]
1
[% USE ColumnsSettings %]
3
[% USE ColumnsSettings %]
4
[% USE KohaDates %]
2
[% SET footerjs = 1 %]
5
[% SET footerjs = 1 %]
3
[% INCLUDE 'doc-head-open.inc' %]
6
[% INCLUDE 'doc-head-open.inc' %]
4
<title>Koha &rsaquo; Tools &rsaquo; OAI-PMH harvester</title>
7
<title>Koha &rsaquo; Tools &rsaquo; OAI-PMH harvester</title>
5
[% INCLUDE 'doc-head-close.inc' %]
8
[% INCLUDE 'doc-head-close.inc' %]
6
[% dashboard_page = '/cgi-bin/koha/tools/oai-pmh-harvester/dashboard.pl' %]
9
[% dashboard_page = '/cgi-bin/koha/tools/oai-pmh-harvester/dashboard.pl' %]
7
[% request_page = '/cgi-bin/koha/tools/oai-pmh-harvester/request.pl' %]
10
[% request_page = '/cgi-bin/koha/tools/oai-pmh-harvester/request.pl' %]
8
<style type="text/css">
11
[% Asset.css("css/datatables.css") | $raw %]
9
    a.paginate_button {
10
        padding: 2px;
11
    }
12
</style>
13
</head>
12
</head>
14
<body id="tools_oai-pmh-harvester" class="tools">
13
<body id="tools_oai-pmh-harvester" class="tools">
15
[% INCLUDE 'header.inc' %]
14
[% INCLUDE 'header.inc' %]
16
[% INCLUDE 'cat-search.inc' %]
15
[% INCLUDE 'cat-search.inc' %]
17
    <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> &rsaquo; OAI-PMH harvester</div>
16
    <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> &rsaquo; OAI-PMH harvester</div>
18
    <div id="doc3" class="yui-t2">
17
19
        <div id="bd">
18
<div class="main container-fluid">
20
            <div id="yui-main">
19
    <div class="row">
21
                <div class="yui-b">
20
        <div class="col-sm-10 col-sm-push-2">
22
                    <h1>OAI-PMH harvester</h1>
21
            <main>
23
                    <div id="toolbar" class="btn-toolbar">
22
24
                        <a id="new-request" class="btn btn-default btn-sm" href="[% request_page | url %]?op=new"><i class="fa fa-plus"></i> New request</a>
23
                <h1>OAI-PMH harvester</h1>
24
                <div id="toolbar" class="btn-toolbar">
25
                    <a id="new-request" class="btn btn-default btn-sm" href="[% request_page | url %]?op=new"><i class="fa fa-plus"></i> New request</a>
26
                </div>
27
                [% IF ( harvester.offline ) %]
28
                    <div class="dialog alert">
29
                        <span>OAI-PMH harvester offline</span>
25
                    </div>
30
                    </div>
26
                    [% IF ( harvester.offline ) %]
31
                [% END %]
27
                        <div class="alert">
32
                <div id="dashboard-items" class="toptabs">
28
                            <span>OAI-PMH harvester offline</span>
33
                    <ul>
29
                        </div>
34
                        <li>
30
                    [% END %]
35
                            <a href="#saved_requests">Saved requests <span id="saved_count">([% saved_requests.size | html %])</span></a>
31
                    <div id="dashboard-items" class="toptabs">
36
                        </li>
32
                        <ul>
37
                        <li>
33
                            <li>
38
                            <a href="#submitted_requests">Submitted requests <span id="submitted_count">([% submitted_requests.size | html %])</span></a>
34
                                <a href="#saved_requests">Saved requests <span id="saved_count">([% saved_requests.size | html %])</span></a>
39
                        </li>
35
                            </li>
40
                        <li>
36
                            <li>
41
                            <a href="#imports">Import history <span id="import_count">(0)</span></a>
37
                                <a href="#submitted_requests">Submitted requests <span id="submitted_count">([% submitted_requests.size | html %])</span></a>
42
                        </li>
38
                            </li>
43
                    </ul>
39
                            <li>
44
                    <div id="submitted_requests">
40
                                <a href="#imports">Import history <span id="import_count">(0)</span></a>
45
                        [% IF ( result.defined("start") ) %]
41
                            </li>
46
                            [% IF ( result.start ) %]
42
                        </ul>
47
                                <div class="dialog message">
43
                        <div id="submitted_requests">
48
                                    <span>Start succeeded</span>
44
                            [% IF ( result.defined("start") ) %]
45
                                <div class="alert">
46
                                    [% IF ( result.start ) %]
47
                                        <span>Start succeeded</span>
48
                                    [% ELSE %]
49
                                        <span>Start failed</span>
50
                                    [% END %]
51
                                </div>
49
                                </div>
52
                            [% ELSIF ( result.defined("stop") ) %]
50
                            [% ELSE %]
53
                                 <div class="alert">
51
                                <div class="dialog alert">
54
                                    [% IF ( result.stop ) %]
52
                                    <span>Start failed</span>
53
                                </div>
54
                            [% END %]
55
                        [% ELSIF ( result.defined("stop") ) %]
56
                                [% IF ( result.stop ) %]
57
                                    <div class="dialog message">
55
                                        <span>Stop succeeded</span>
58
                                        <span>Stop succeeded</span>
56
                                    [% ELSE %]
59
                                    </div>
60
                                [% ELSE %]
61
                                    <div class="dialog alert">
57
                                        <span>Stop failed</span>
62
                                        <span>Stop failed</span>
58
                                    [% END %]
63
                                    </div>
59
                                </div>
64
                                [% END %]
60
                            [% ELSIF ( result.defined("delete") ) %]
65
                        [% ELSIF ( result.defined("delete") ) %]
61
                                 <div class="alert">
66
                                [% IF ( result.delete ) %]
62
                                    [% IF ( result.delete ) %]
67
                                    <div class="dialog message">
63
                                        <span>Delete succeeded</span>
68
                                        <span>Delete succeeded</span>
64
                                    [% ELSE %]
69
                                    </div>
70
                                [% ELSE %]
71
                                    <div class="dialog alert">
65
                                        <span>Delete failed</span>
72
                                        <span>Delete failed</span>
66
                                    [% END %]
73
                                    </div>
67
                                </div>
74
                                [% END %]
68
                            [% END %]
75
                        [% END %]
69
                            <table id="submitted-table">
76
                        <table id="submitted-table">
70
                                <thead>
77
                            <thead>
71
                                    <tr>
78
                                <tr>
72
                                        <th>Name</th>
79
                                    <th>Name</th>
73
                                        <th>URL</th>
80
                                    <th>URL</th>
74
                                        <th>Set</th>
81
                                    <th>Set</th>
75
                                        <th>From</th>
82
                                    <th class="title-string">From</th>
76
                                        <th>Until</th>
83
                                    <th class="title-string">Until</th>
77
                                        <th>Interval</th>
84
                                    <th>Interval</th>
78
                                        <th>Effective from</th>
85
                                    <th class="title-string">Effective from</th>
79
                                        <th>Effective until</th>
86
                                    <th class="title-string">Effective until</th>
80
                                        <th>Pending imports</th>
87
                                    <th>Pending imports</th>
81
                                        <th>Status</th>
88
                                    <th>Status</th>
82
                                        <th>Error</th>
89
                                    <th>Error</th>
83
                                        <th></th>
90
                                    <th class="NoSort"></th>
84
                                    </tr>
91
                                </tr>
85
                                </thead>
92
                            </thead>
86
                                <tbody>
93
                            <tbody>
87
                                [% IF ( submitted_requests ) %]
94
                                [% IF ( submitted_requests ) %]
88
                                    [% FOREACH submitted_request IN submitted_requests %]
95
                                    [% FOREACH submitted_request IN submitted_requests %]
89
                                        <tr>
96
                                        <tr>
90
                                            <td>[% submitted_request.name | html %]</td>
97
                                            <td>[% submitted_request.name | html %]</td>
91
                                            <td>[% submitted_request.parameters.oai_pmh.baseURL | html %]</td>
98
                                            <td>[% submitted_request.parameters.oai_pmh.baseURL | html %]</td>
92
                                            <td>[% submitted_request.parameters.oai_pmh.set | html %]</td>
99
                                            <td>[% submitted_request.parameters.oai_pmh.set | html %]</td>
93
                                            <td>[% submitted_request.parameters.oai_pmh.from | html %]</td>
100
                                            <td><span title="[% submitted_request.parameters.oai_pmh.from | html %]">[% submitted_request.parameters.oai_pmh.from | $KohaDates with_hours = 1 %]</span></td>
94
                                            <td>[% submitted_request.parameters.oai_pmh.until | html %]</td>
101
                                            <td><span title="[% submitted_request.parameters.oai_pmh.until | html %]">[% submitted_request.parameters.oai_pmh.until | $KohaDates with_hours = 1 %]</span></td>
95
                                            <td>[% submitted_request.interval | html %]</td>
102
                                            <td>[% submitted_request.interval | html %]</td>
96
                                            <td>[% submitted_request.effective_from | html %]</td>
103
                                            <td><span title="[% submitted_request.effective_from | html %]">[% submitted_request.effective_from | $KohaDates with_hours = 1 %]</span></td>
97
                                            <td>[% submitted_request.effective_until | html %]</td>
104
                                            <td><span title="[% submitted_request.effective_until | html %]">[% submitted_request.effective_until | $KohaDates with_hours = 1 %]</span></td>
98
                                            <td>[% submitted_request.pending_imports |html %]</td>
105
                                            <td>[% submitted_request.pending_imports |html %]</td>
99
                                            <td>
106
                                            <td>
100
                                                [% IF ( submitted_status = submitted_request.status ) %]
107
                                                [% IF ( submitted_status = submitted_request.status ) %]
Lines 123-129 Link Here
123
                                                              <a href="[% dashboard_page | url %]?op=stop&uuid=[% submitted_request.uuid | url %]"><i class="fa fa-stop"></i> Stop</a>
130
                                                              <a href="[% dashboard_page | url %]?op=stop&uuid=[% submitted_request.uuid | url %]"><i class="fa fa-stop"></i> Stop</a>
124
                                                          </li>
131
                                                          </li>
125
                                                          <li>
132
                                                          <li>
126
                                                              <a href="[% dashboard_page | url %]?op=delete&uuid=[% submitted_request.uuid | url %]"><i class="fa fa-trash"></i> Delete</a>
133
                                                              <a class="confirmdelete" href="[% dashboard_page | url %]?op=delete&uuid=[% submitted_request.uuid | url %]"><i class="fa fa-trash"></i> Delete</a>
127
                                                          </li>
134
                                                          </li>
128
                                                    </ul>
135
                                                    </ul>
129
                                                </div>
136
                                                </div>
Lines 131-279 Link Here
131
                                        </tr>
138
                                        </tr>
132
                                    [% END %]
139
                                    [% END %]
133
                                [% END %]
140
                                [% END %]
134
                                </tbody>
141
                            </tbody>
135
                            </table>
142
                        </table>
136
                        </div>
143
                    </div>
137
                        <div id="saved_requests">
144
                    <div id="saved_requests">
138
                            [% IF ( result.send.defined ) %]
145
                        [% IF ( result.send.defined ) %]
139
                                <div class="alert">
146
                                [% IF ( result.send ) %]
140
                                    [% IF ( result.send ) %]
147
                                    <div class="dialog message">
141
                                        <span>Submit succeeded</span>
148
                                        <span>Submit succeeded</span>
142
                                    [% ELSE %]
149
                                    </div>
150
                                [% ELSE %]
151
                                    <div class="dialog alert">
143
                                        <span>Submit failed</span>
152
                                        <span>Submit failed</span>
144
                                    [% END %]
153
                                    </div>
145
                                </div>
146
                            [% END %]
147
                            <table id="saved-table">
148
                                <thead>
149
                                    <tr>
150
                                        <th>Name</th>
151
                                        <th>URL</th>
152
                                   <!-- <th>Verb</th>
153
                                        <th>Metadata prefix</th>
154
                                        <th>Identifier</th> -->
155
                                        <th>Set</th>
156
                                        <th>From</th>
157
                                        <th>Until</th>
158
                                        <th>Interval</th>
159
                                   <!-- <th>Filter</th>
160
                                        <th>Framework code</th>
161
                                        <th>Record type</th>
162
                                        <th>Matcher code</th> -->
163
                                        <th></th>
164
                                    </tr>
165
                                </thead>
166
                                <tbody>
167
                                [% IF ( saved_requests ) %]
168
                                    [% FOREACH saved_request IN saved_requests %]
169
                                        <tr>
170
                                            <td>[% saved_request.name | html %]</td>
171
                                            <td>[% saved_request.http_url | html %]</td>
172
                                       <!-- <td>[% saved_request.oai_verb | html %]</td>
173
                                            <td>[% saved_request.oai_metadataPrefix | html %]</td>
174
                                            <td>[% saved_request.oai_identifier | html %]</td> -->
175
                                            <td>[% saved_request.oai_set | html %]</td>
176
                                            <td>[% saved_request.oai_from | html %]</td>
177
                                            <td>[% saved_request.oai_until | html %]</td>
178
                                            <td>[% saved_request.interval | html %]</td>
179
                                       <!-- <td>
180
                                                [% IF ( saved_request.import_filter == "default" ) %]
181
                                                    <span>Default</span>
182
                                                [% ELSE %]
183
                                                    [% saved_request.import_filter | html %]
184
                                                [% END %]
185
                                            </td>
186
                                            <td>
187
                                                [% display_framework = "" %]
188
                                                [% FOREACH framework IN frameworks %]
189
                                                    [% IF ( framework.frameworkcode == saved_request.import_framework_code ) %]
190
                                                        [% display_framework = framework %]
191
                                                    [% END %]
192
                                                [% END %]
193
                                                [% IF ( display_framework ) %]
194
                                                    [% display_framework.frameworktext | html %]
195
                                                [% ELSE %]
196
                                                    [% saved_request.import_framework_code | html %]
197
                                                [% END %]
198
                                            </td>
199
                                            <td>
200
                                                [% IF ( saved_request.import_record_type == "biblio" ) %]
201
                                                    <span>Bibliographic</span>
202
                                                [% ELSE %]
203
                                                    [% saved_request.import_record_type | html %]
204
                                                [% END %]
205
                                            </td>
206
                                            <td>
207
                                                [% display_matcher = "" %]
208
                                                [% FOREACH matcher IN matchers %]
209
                                                    [% IF ( matcher.code == saved_request.import_matcher_code ) %]
210
                                                        [% display_matcher = matcher %]
211
                                                    [% END %]
212
                                                [% END %]
213
                                                [% IF ( display_matcher ) %]
214
                                                    [% display_matcher.description | html %]
215
                                                [% ELSE %]
216
                                                    [% saved_request.import_matcher_code | html %]
217
                                                [% END %]
218
                                            </td> -->
219
                                            <td>
220
                                                <div class="dropdown">
221
                                                    <a class="btn btn-default btn-xs dropdown-toggle" role="button" data-toggle="dropdown" href="#">Actions <span class="caret"></span></a>
222
                                                    <ul class="dropdown-menu pull-right" role="menu">
223
                                                          <li>
224
                                                              <a href="[% request_page | url %]?op=edit&id=[% saved_request.id | url %]"><i class="fa fa-pencil"></i> Edit</a>
225
                                                          </li>
226
                                                          <li>
227
                                                              <a href="[% request_page | url %]?op=new&id=[% saved_request.id | url %]"><i class="fa fa-copy"></i> Copy</a>
228
                                                          </li>
229
                                                          <li>
230
                                                              <a href="[% dashboard_page | url %]?op=send&id=[% saved_request.id | url %]"><i class="fa fa-send"></i> Submit</a>
231
                                                          </li>
232
                                                          <li>
233
                                                            <a href="[% request_page | url %]?op=delete&id=[% saved_request.id | url %]"><i class="fa fa-trash"></i> Delete</a>
234
                                                          </li>
235
                                                    </ul>
236
                                                </div>
237
                                            </td>
238
                                        </tr>
239
                                    [% END %]
240
                                [% END %]
154
                                [% END %]
241
                                </tbody>
155
                        [% END %]
242
                            </table>
156
                        <table id="saved-table">
243
                        </div>
157
                            <thead>
244
                        <div id="imports">
158
                                <tr>
245
                            <div class="btn-toolbar">
159
                                    <th>Name</th>
246
                                <button id="refresh-button" type="button" class="btn btn-default btn-sm">Refresh import history</button>
160
                                    <th>URL</th>
247
                            </div>
161
                                    <th>Set</th>
248
                            <table id="history-table">
162
                                    <th class="title-string">From</th>
249
                                <thead>
163
                                    <th class="title-string">Until</th>
164
                                    <th>Interval</th>
165
                                    <th class="NoSort"></th>
166
                                </tr>
167
                            </thead>
168
                            <tbody>
169
                            [% IF ( saved_requests ) %]
170
                                [% FOREACH saved_request IN saved_requests %]
250
                                    <tr>
171
                                    <tr>
251
                                        <th>Id</th>
172
                                        <td>[% saved_request.name | html %]</td>
252
                                        <th>Repository</th>
173
                                        <td>[% saved_request.http_url | html %]</td>
253
                                        <th>Identifier</th>
174
                                        <td>[% saved_request.oai_set | html %]</td>
254
                                        <th>Datestamp</th>
175
                                        <td><span title="[% saved_request.oai_from | html %]">[% saved_request.oai_from | $KohaDates with_hours = 1 %]</span></td>
255
                                        <th>Upstream status</th>
176
                                        <td><span title="[% saved_request.oai_until | html %]">[% saved_request.oai_until | $KohaDates with_hours = 1 %]</span></td>
256
                                        <th>Import status</th>
177
                                        <td>[% saved_request.interval | html %]</td>
257
                                        <th>Import timestamp</th>
178
                                        <td>
258
                                        <th>Imported record</th>
179
                                            <div class="dropdown">
259
                                        <th>Downloaded record</th>
180
                                                <a class="btn btn-default btn-xs dropdown-toggle" role="button" data-toggle="dropdown" href="#">Actions <span class="caret"></span></a>
181
                                                <ul class="dropdown-menu pull-right" role="menu">
182
                                                      <li>
183
                                                          <a href="[% request_page | url %]?op=edit&id=[% saved_request.id | url %]"><i class="fa fa-pencil"></i> Edit</a>
184
                                                      </li>
185
                                                      <li>
186
                                                          <a href="[% request_page | url %]?op=new&id=[% saved_request.id | url %]"><i class="fa fa-copy"></i> Copy</a>
187
                                                      </li>
188
                                                      <li>
189
                                                          <a href="[% dashboard_page | url %]?op=send&id=[% saved_request.id | url %]"><i class="fa fa-send"></i> Submit</a>
190
                                                      </li>
191
                                                      <li>
192
                                                        <a class="confirmdelete" href="[% request_page | url %]?op=delete&id=[% saved_request.id | url %]"><i class="fa fa-trash"></i> Delete</a>
193
                                                      </li>
194
                                                </ul>
195
                                            </div>
196
                                        </td>
260
                                    </tr>
197
                                    </tr>
261
                                </thead>
198
                                [% END %]
262
                            </table>
199
                            [% END %]
263
200
                            </tbody>
264
                        </div>
201
                        </table>
202
                    </div>
203
                    <div id="imports">
204
                        <button id="refresh-button" type="button" class="btn btn-default btn-xs"><i class="fa fa-refresh"></i> Refresh import history</button>
205
                        <table id="history-table">
206
                            <thead>
207
                                <tr>
208
                                    <th>Id</th>
209
                                    <th>Repository</th>
210
                                    <th>Identifier</th>
211
                                    <th>Datestamp</th>
212
                                    <th>Upstream status</th>
213
                                    <th>Import status</th>
214
                                    <th>Import timestamp</th>
215
                                    <th class="NoSort">Imported record</th>
216
                                    <th class="NoSort">Downloaded record</th>
217
                                </tr>
218
                            </thead>
219
                        </table>
265
                    </div>
220
                    </div>
266
                </div>
221
                </div>
267
            </div>
222
            </main>
268
            <div class="yui-b">
223
        </div> <!-- /.col-sm-10.col-sm-push-2 -->
224
225
        <div class="col-sm-2 col-sm-pull-10">
226
            <aside>
269
                [% INCLUDE 'tools-menu.inc' %]
227
                [% INCLUDE 'tools-menu.inc' %]
270
            </div>
228
            </aside>
271
        </div>
229
        </div> <!-- /.col-sm-2.col-sm-pull-10 -->
230
    </div> <!-- /.row -->
272
231
273
[% MACRO jsinclude BLOCK %]
232
[% MACRO jsinclude BLOCK %]
274
    [% INCLUDE 'datatables.inc' %]
233
    [% INCLUDE 'datatables.inc' %]
275
    [% INCLUDE 'columns_settings.inc' %]
234
    [% INCLUDE 'columns_settings.inc' %]
276
    <script type="text/javascript">
235
    [% Asset.js("js/tools-menu.js") | $raw %]
236
    <script>
277
        $(document).ready(function() {
237
        $(document).ready(function() {
278
            $('#dashboard-items').tabs();
238
            $('#dashboard-items').tabs();
279
            [% IF ( result.start.defined || result.stop.defined || result.delete.defined ) %]
239
            [% IF ( result.start.defined || result.stop.defined || result.delete.defined ) %]
Lines 281-293 Link Here
281
            [% END %]
241
            [% END %]
282
242
283
            var saved_table_columns_settings = [% ColumnsSettings.GetColumns( 'tools','oai-pmh-harvester-dashboard', 'saved-table', 'json' ) | $raw %];
243
            var saved_table_columns_settings = [% ColumnsSettings.GetColumns( 'tools','oai-pmh-harvester-dashboard', 'saved-table', 'json' ) | $raw %];
284
            var saved_table = KohaTable("saved-table",{},saved_table_columns_settings);
244
            var saved_table = KohaTable("saved-table",{
245
                "autoWidth": false,
246
                "aoColumnDefs": [
247
                    { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] },
248
                    { "sType": "title-string", "aTargets" : [ "title-string" ] }
249
                ],
250
                "sPaginationType": "four_button"
251
            },saved_table_columns_settings);
285
252
286
            var submitted_table_columns_settings = [% ColumnsSettings.GetColumns( 'tools','oai-pmh-harvester-dashboard', 'submitted-table', 'json' ) | $raw %];
253
            var submitted_table_columns_settings = [% ColumnsSettings.GetColumns( 'tools','oai-pmh-harvester-dashboard', 'submitted-table', 'json' ) | $raw %];
287
            var submitted_table = KohaTable("submitted-table",{},submitted_table_columns_settings);
254
            var submitted_table = KohaTable("submitted-table",{
255
                "autoWidth": false,
256
                "aoColumnDefs": [
257
                    { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] },
258
                    { "sType": "title-string", "aTargets" : [ "title-string" ] }
259
                ],
260
                "sPaginationType": "four_button"
261
            },submitted_table_columns_settings);
288
262
289
            var history_table_columns_settings = [% ColumnsSettings.GetColumns( 'tools','oai-pmh-harvester-dashboard', 'history-table', 'json' ) | $raw %];
263
            var history_table_columns_settings = [% ColumnsSettings.GetColumns( 'tools','oai-pmh-harvester-dashboard', 'history-table', 'json' ) | $raw %];
290
            var history_table = KohaTable("history-table",{
264
            var history_table = KohaTable("history-table",{
265
                "autoWidth": false,
266
                "aoColumnDefs": [
267
                    { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] },
268
                    { "sType": "title-string", "aTargets" : [ "title-string" ] }
269
                ],
270
                "sPaginationType": "four_button",
291
                serverSide: true,
271
                serverSide: true,
292
                searching: true,
272
                searching: true,
293
                processing: true,
273
                processing: true,
Lines 344-351 Link Here
344
                            var display_string = data;
324
                            var display_string = data;
345
                            var record_type = (full.record_type) ? full.record_type : 'biblio';
325
                            var record_type = (full.record_type) ? full.record_type : 'biblio';
346
                            if (data && record_type == 'biblio'){
326
                            if (data && record_type == 'biblio'){
347
                                var link_text = _("View biblio record");
327
                                var link_text = _("View in catalog");
348
                                var link = '<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber='+data+'">'+link_text+'</a>';
328
                                var link = '<a class=\"btn btn-default btn-xs\" href="/cgi-bin/koha/catalogue/detail.pl?biblionumber='+data+'"><i class=\"fa fa-eye\"></i> '+link_text+'</a>';
349
                                display_string = link;
329
                                display_string = link;
350
                            }
330
                            }
351
                            return display_string;
331
                            return display_string;
Lines 356-362 Link Here
356
                        data: 'import_oai_id', render: function (data, type, full, meta){
336
                        data: 'import_oai_id', render: function (data, type, full, meta){
357
                            var display_string = data;
337
                            var display_string = data;
358
                            var link_text = _("View record");
338
                            var link_text = _("View record");
359
                            var link = '<a href="/cgi-bin/koha/tools/oai-pmh-harvester/record.pl?import_oai_id='+data+'">'+link_text+'</a>';
339
                            var link = '<a class=\"btn btn-default btn-xs\" href="/cgi-bin/koha/tools/oai-pmh-harvester/record.pl?import_oai_id='+data+'"><i class=\"fa fa-code\"></i> '+link_text+'</a>';
360
                            display_string = link;
340
                            display_string = link;
361
                            return display_string;
341
                            return display_string;
362
                        }, searchable: false
342
                        }, searchable: false
Lines 372-377 Link Here
372
            $('#refresh-button').click(function(){
352
            $('#refresh-button').click(function(){
373
                history_table.dataTable().api().ajax.reload( null, false );
353
                history_table.dataTable().api().ajax.reload( null, false );
374
            });
354
            });
355
            $(".confirmdelete").on("click", function(){
356
                return confirmDelete(_("Are you sure you want to delete this request?"));
357
            })
375
        });
358
        });
376
    </script>
359
    </script>
377
[% END %]
360
[% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/oai-pmh-harvester/record.tt (-11 / +43 lines)
Lines 1-23 Link Here
1
[% USE raw %]
2
[% USE Asset %]
3
[% SET footerjs = 1 %]
1
[% INCLUDE 'doc-head-open.inc' %]
4
[% INCLUDE 'doc-head-open.inc' %]
2
<title>Koha &rsaquo; Tools &rsaquo; OAI-PMH harvester &rsaquo; Downloaded record</title>
5
<title>Koha &rsaquo; Tools &rsaquo; OAI-PMH harvester &rsaquo; Downloaded record</title>
3
[% INCLUDE 'doc-head-close.inc' %]
6
[% INCLUDE 'doc-head-close.inc' %]
7
[% Asset.css("lib/codemirror/codemirror.css") | $raw %]
8
<style>
9
.CodeMirror {
10
    height: 100%
11
}
12
</style>
4
</head>
13
</head>
5
<body id="tools_oai-pmh-harvester_request" class="tools">
14
<body id="tools_oai-pmh-harvester_request" class="tools">
6
[% INCLUDE 'header.inc' %]
15
[% INCLUDE 'header.inc' %]
7
[% INCLUDE 'cat-search.inc' %]
16
[% INCLUDE 'cat-search.inc' %]
8
    <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> &rsaquo; <a href="/cgi-bin/koha/tools/oai-pmh-harvester/dashboard.pl">OAI-PMH harvester</a> &rsaquo; Downloaded record</div>
17
    <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> &rsaquo; <a href="/cgi-bin/koha/tools/oai-pmh-harvester/dashboard.pl">OAI-PMH harvester</a> &rsaquo; Downloaded record</div>
9
    <div id="doc3" class="yui-t2">
18
10
        <div id="bd">
19
    <div class="main container-fluid">
11
            <div id="yui-main">
20
        <div class="row">
12
                <div class="yui-b">
21
            <div class="col-sm-10 col-sm-push-2">
22
                <main>
23
13
                    <h1>Downloaded record</h1>
24
                    <h1>Downloaded record</h1>
14
                    [% IF ( record ) %]
25
                    [% IF ( record ) %]
15
                        <div style="white-space:pre">[% record | xml %]</div>
26
                        <textarea id="record">[% record | html %]</textarea>
16
                    [% END %]
27
                    [% END %]
17
                </div>
28
18
            </div>
29
                </main>
19
            <div class="yui-b">
30
            </div> <!-- /.col-sm-10.col-sm-push-2 -->
20
                [% INCLUDE 'tools-menu.inc' %]
31
21
            </div>
32
            <div class="col-sm-2 col-sm-pull-10">
22
        </div>
33
                <aside>
34
                    [% INCLUDE 'tools-menu.inc' %]
35
                </aside>
36
            </div> <!-- /.col-sm-2.col-sm-pull-10 -->
37
        </div> <!-- /.row -->
38
39
[% MACRO jsinclude BLOCK %]
40
    [% Asset.js("js/tools-menu.js") | $raw %]
41
    [% Asset.js("lib/codemirror/codemirror-compressed.js") | $raw %]
42
    [% Asset.js( "lib/codemirror/xml.min.js" ) | $raw %]
43
    <script>
44
        $(document).ready(function() {
45
            var editor = CodeMirror.fromTextArea( record, {
46
                lineNumbers: false,
47
                mode: "application/xml",
48
                lineWrapping: true,
49
                readOnly: true
50
            });
51
        });
52
    </script>
53
[% END %]
54
23
[% INCLUDE 'intranet-bottom.inc' %]
55
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/oai-pmh-harvester/request.tt (-177 / +212 lines)
Lines 4-10 Link Here
4
[% INCLUDE 'doc-head-open.inc' %]
4
[% INCLUDE 'doc-head-open.inc' %]
5
<title>Koha &rsaquo; Tools &rsaquo; OAI-PMH harvester &rsaquo; Request</title>
5
<title>Koha &rsaquo; Tools &rsaquo; OAI-PMH harvester &rsaquo; Request</title>
6
[% INCLUDE 'doc-head-close.inc' %]
6
[% INCLUDE 'doc-head-close.inc' %]
7
<style type="text/css">
7
<style>
8
    /* Override staff-global.css which hides second, millisecond, and microsecond sliders */
8
    /* Override staff-global.css which hides second, millisecond, and microsecond sliders */
9
    .ui_tpicker_second {
9
    .ui_tpicker_second {
10
        display: block;
10
        display: block;
Lines 15-209 Link Here
15
[% INCLUDE 'header.inc' %]
15
[% INCLUDE 'header.inc' %]
16
[% INCLUDE 'cat-search.inc' %]
16
[% INCLUDE 'cat-search.inc' %]
17
    <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> &rsaquo; <a href="/cgi-bin/koha/tools/oai-pmh-harvester/dashboard.pl">OAI-PMH harvester</a> &rsaquo; Request</div>
17
    <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> &rsaquo; <a href="/cgi-bin/koha/tools/oai-pmh-harvester/dashboard.pl">OAI-PMH harvester</a> &rsaquo; Request</div>
18
    <div id="doc3" class="yui-t2">
18
19
        <div id="bd">
19
<div class="main container-fluid">
20
            <div id="yui-main">
20
    <div class="row">
21
                <div class="yui-b">
21
        <div class="col-sm-10 col-sm-push-2">
22
                    [% IF ( op == "edit" ) %]
22
            <main>
23
                        <h1>Edit OAI-PMH request</h1>
23
24
                [% IF ( op == "edit" ) %]
25
                    <h1>Edit OAI-PMH request</h1>
26
                [% ELSE %]
27
                    <h1>New OAI-PMH request</h1>
28
                [% END %]
29
                [% IF ( test_parameters ) %]
30
                    [% IF ( errors.size ) %]
31
                        <div class="dialog alert">Tests failed!</div>
24
                    [% ELSE %]
32
                    [% ELSE %]
25
                        <h1>New OAI-PMH request</h1>
33
                        <div class="dialog message">Tests succeeded!</div>
26
                    [% END %]
34
                    [% END %]
27
                    [% IF ( test_parameters ) %]
35
                [% END %]
28
                        [% IF ( errors.size ) %]
36
                <form action="/cgi-bin/koha/tools/oai-pmh-harvester/request.pl" method="post" name="entry-form">
29
                            <div class="dialog message"><span class="text-danger">Tests failed!</span></div>
37
                    [% IF ( op == "new" ) %]
30
                        [% ELSE %]
38
                        <input type="hidden" name="op" value="create" />
31
                            <div class="dialog message"><span class="text-success">Tests succeeded!</span></div>
39
                    [% ELSIF ( op == "edit" ) %]
32
                        [% END %]
40
                         <input type="hidden" name="op" value="update" />
41
                    [% ELSE %]
42
                        <input type="hidden" name="op" value="[% op | html %]" />
43
                    [% END %]
44
                    [% IF ( id ) %]
45
                        <input type="hidden" name="id" value="[% id | html %]" />
33
                    [% END %]
46
                    [% END %]
34
                    <form action="/cgi-bin/koha/tools/oai-pmh-harvester/request.pl" method="post" name="entry-form">
47
                    <fieldset class="rows">
35
                        [% IF ( op == "new" ) %]
48
                        <ol>
36
                            <input type="hidden" name="op" value="create" />
49
                            <li>
37
                        [% ELSIF ( op == "edit" ) %]
50
                                <label for="name">Name:</label>
38
                             <input type="hidden" name="op" value="update" />
51
                                <input type="text" size="30" id="name" name="name" value="[% oai_pmh_request.name | html %]"/>
39
                        [% ELSE %]
52
                                <span class="hint">This is a short name to help in managing requests.</span>
40
                            <input type="hidden" name="op" value="[% op | html %]" />
53
                            </li>
41
                        [% END %]
54
                        </ol>
42
                        [% IF ( id ) %]
55
                    </fieldset>
43
                            <input type="hidden" name="id" value="[% id | html %]" />
56
                    <fieldset class="rows">
44
                        [% END %]
57
                        <legend>HTTP parameters:</legend>
45
                        <fieldset class="rows">
58
                        <ol>
46
                            <ol>
59
                            <li>
47
                                <li>
60
                                <label for="http_url">URL:</label>
48
                                    <label for="name">Name:</label>
61
                                <input type="text" size="30" id="http_url" name="http_url" value="[% oai_pmh_request.http_url | html %]">
49
                                    <input type="text" size="30" id="name" name="name" value="[% oai_pmh_request.name | html %]"/>
62
                                [% IF (errors.http_url.malformed) %]
50
                                    <span class="help">This is just a short name to help in managing requests.</span>
63
                                    <span class="required">This must be a properly formatted HTTP or HTTPS URL.</span>
51
                                </li>
64
                                [% END %]
52
                            </ol>
65
                                [% IF (errors.http.404) %]
53
                        </fieldset>
66
                                    <span class="required">Cannot find address specified by this URL.</span>
54
                        <fieldset class="rows">
67
                                [% END %]
55
                            <legend>HTTP parameters:</legend>
68
                                [% IF (errors.http.401) %]
56
                            <ol>
69
                                    <span class="required">Permission denied to access this URL.</span>
57
                                <li>
70
                                [% END %]
58
                                    <label for="http_url">URL:</label>
71
                                [% IF (errors.http.generic) %]
59
                                    <input type="text" size="30" id="http_url" name="http_url" value="[% oai_pmh_request.http_url | html %]">
72
                                    <span class="required">Unable to access this URL.</span>
60
                                    [% IF (errors.http_url.malformed) %]<span class="error">[This must be a properly formatted HTTP or HTTPS URL.]</span>[% END %]
73
                                [% END %]
61
                                    [% IF (errors.http.404) %]<span class="error">[Cannot find address specified by this URL.]</span>[% END %]
74
                            </li>
62
                                    [% IF (errors.http.401) %]<span class="error">[Permission denied to access this URL.]</span>[% END %]
75
                        </ol>
63
                                    [% IF (errors.http.generic) %]<span class="error">[Unable to access this URL.]</span>[% END %]
76
                        <div class="hint">The following parameters are not required by all OAI-PMH repositories, so they may be optional for this task.</div>
64
                                </li>
77
                        <ol>
65
                            </ol>
78
                            <li>
66
                            <span class="help">The following parameters are not required by all OAI-PMH repositories, so they may be optional for this task.</span>
79
                                <label for="http_username">Username:</label>
67
                            <ol>
80
                                <input type="text" size="30" id="http_username" name="http_username" value="[% oai_pmh_request.http_username | html %]">
68
                                <li>
81
                            </li>
69
                                    <label for="http_username">Username:</label>
82
                            <li>
70
                                    <input type="text" size="30" id="http_username" name="http_username" value="[% oai_pmh_request.http_username | html %]">
83
                                <label for="http_password">Password:</label>
71
                                </li>
84
                                <input type="text" size="30" id="http_password" name="http_password" value="[% oai_pmh_request.http_password | html %]">
72
                                <li>
85
                            </li>
73
                                    <label for="http_password">Password:</label>
86
                            <li>
74
                                    <input type="text" size="30" id="http_password" name="http_password" value="[% oai_pmh_request.http_password | html %]">
87
                                <label for="http_realm">Realm:</label>
75
                                </li>
88
                                <input type="text" size="30" id="http_realm" name="http_realm" value="[% oai_pmh_request.http_realm | html %]">
76
                                <li>
89
                            </li>
77
                                    <label for="http_realm">Realm:</label>
90
                        </ol>
78
                                    <input type="text" size="30" id="http_realm" name="http_realm" value="[% oai_pmh_request.http_realm | html %]">
91
                    </fieldset>
79
                                </li>
92
                    <fieldset class="rows">
80
                            </ol>
93
                        <legend>OAI-PMH parameters:</legend>
81
                        </fieldset>
94
                        <ol>
82
                        <fieldset class="rows">
95
                            <li>
83
                            <legend>OAI-PMH parameters:</legend>
96
                                <label for="oai_verb">Verb:</label>
84
                            <ol>
97
                                <select id="oai_verb" name="oai_verb">
85
                                <li>
98
                                    [% IF ( oai_pmh_request.oai_verb == "ListRecords" ) %]
86
                                    <label for="oai_verb">Verb:</label>
99
                                    <option value="ListRecords" selected="selected">ListRecords</option>
87
                                    <select id="oai_verb" name="oai_verb">
100
                                    [% ELSE %]
88
                                        [% IF ( oai_pmh_request.oai_verb == "ListRecords" ) %]
101
                                    <option value="ListRecords">ListRecords</option>
89
                                        <option value="ListRecords" selected="selected">ListRecords</option>
102
                                    [% END %]
103
                                    [% IF ( oai_pmh_request.oai_verb == "GetRecord" ) %]
104
                                    <option value="GetRecord" selected="selected">GetRecord</option>
105
                                    [% ELSE %]
106
                                    <option value="GetRecord">GetRecord</option>
107
                                    [% END %]
108
                                </select>
109
                            </li>
110
                            <li>
111
                                <label for="oai_metadataPrefix">Metadata prefix:</label>
112
                                <input type="text" size="30" id="oai_metadataPrefix" name="oai_metadataPrefix" value="[% oai_pmh_request.oai_metadataPrefix | html %]">
113
                                [% IF (errors.oai_metadataPrefix.unavailable) %]
114
                                    <span class="required">This metadataPrefix is unavailable from this OAI-PMH provider.</span>
115
                                [% END %]
116
                                [% IF (errors.oai_metadataPrefix.missing) %]
117
                                    <span class="required">metadataPrefix is a required field for an OAI-PMH request.</span>
118
                                [% END %]
119
                            </li>
120
                            <li>
121
                                <label for="oai_identifier">Identifier:</label>
122
                                <input type="text" size="30" id="oai_identifier" name="oai_identifier" value="[% oai_pmh_request.oai_identifier | html %]">
123
                                [% IF (errors.oai_identifier.missing) %]
124
                                    <span class="required">Identifier is a required field when using GetRecord for an OAI-PMH request.</span>
125
                                [% END %]
126
                            </li>
127
                            <li>
128
                                <label for="oai_set">Set:</label>
129
                                <input type="text" size="30" id="oai_set" name="oai_set" value="[% oai_pmh_request.oai_set | html %]">
130
                                [% IF (errors.oai_set.unavailable) %]
131
                                    <span class="required">This set is unavailable from this OAI-PMH provider.</span>
132
                                [% END %]
133
                            </li>
134
                            [% IF (errors.oai.granularity_mismatch) %]
135
                                <span class="required">You must specify the same granularity for both From and Until.</span>
136
                            [% END %]
137
                            <li>
138
                                <label for="oai_from">From:</label>
139
                                <input type="text" size="30" class="datetime_utc" id="oai_from" name="oai_from" value="[% oai_pmh_request.oai_from | html %]">
140
                                <span class="hint">This value will be treated as UTC time. Note that some repositories only support YYYY-MM-DD datestamps.</span>
141
                                [% IF (errors.oai_from.malformed) %]
142
                                    <span class="required">This must be in YYYY-MM-DD or YYYY-MM-DDThh:mm:ssZ format.</span>
143
                                [% END %]
144
                                [% IF (errors.oai_from.unavailable) %]
145
                                    <span class="required">This granularity is unsupported by this OAI-PMH provider.</span>
146
                                [% END %]
147
                            </li>
148
                            <li>
149
                                <label for="oai_until">Until:</label>
150
                                <input type="text" size="30" class="datetime_utc" id="oai_until" name="oai_until" value="[% oai_pmh_request.oai_until | html %]">
151
                                <span class="hint">This value will be treated as UTC time. Note that some repositories only support YYYY-MM-DD datestamps.</span>
152
                                [% IF (errors.oai_until.malformed) %]
153
                                    <span class="required">This must be in YYYY-MM-DD or YYYY-MM-DDThh:mm:ssZ format.</span>
154
                                [% END %]
155
                                [% IF (errors.oai_until.unavailable) %]
156
                                    <span class="required">This granularity is unsupported by this OAI-PMH provider.</span>
157
                                [% END %]
158
                            </li>
159
                        </ol>
160
                    </fieldset>
161
                    <fieldset class="rows">
162
                        <legend>Import parameters:</legend>
163
                        <ol>
164
                            <li>
165
                                <label for="import_filter">Filter:</label>
166
                                [% IF ( oai_pmh_request.import_filter == "default" ) %]
167
                                    <input type="text" size="30" id="import_filter" name="import_filter" value="default">
168
                                [% ELSE %]
169
                                    <input type="text" size="30" id="import_filter" name="import_filter" value="[% oai_pmh_request.import_filter | html %]">
170
                                [% END %]
171
                                <span class="hint">If no filter is entered, the default filter will be used.</span>
172
                            </li>
173
                            <li>
174
                                <label for="import_framework_code">Framework code:</label>
175
                                <select id="import_framework_code" name="import_framework_code">
176
                                    <option value="">Default framework</option>
177
                                    [% FOREACH framework IN frameworks %]
178
                                        [% IF ( oai_pmh_request.import_framework_code == framework.frameworkcode ) %]
179
                                            <option selected="selected" value="[% framework.frameworkcode | html %]">[% framework.frameworktext | html %]</option>
90
                                        [% ELSE %]
180
                                        [% ELSE %]
91
                                        <option value="ListRecords">ListRecords</option>
181
                                            <option value="[% framework.frameworkcode | html %]">[% framework.frameworktext | html %]</option>
92
                                        [% END %]
182
                                        [% END %]
93
                                        [% IF ( oai_pmh_request.oai_verb == "GetRecord" ) %]
183
                                    [% END %]
94
                                        <option value="GetRecord" selected="selected">GetRecord</option>
184
                                </select>
185
                            </li>
186
                            <li>
187
                                <label for="import_record_type">Record type:</label>
188
                                <select id="import_record_type" name="import_record_type">
189
                                    <option value="biblio">Bibliographic</option>
190
                                </select>
191
                            </li>
192
                            <li>
193
                                <label for="import_matcher_code">Record matcher:</label>
194
                                <select id="import_matcher_code" name="import_matcher_code">
195
                                    <option value="">None</option>
196
                                    [% FOREACH matcher IN matchers %]
197
                                        [% IF ( oai_pmh_request.import_matcher_code == matcher.code ) %]
198
                                            <option value="[% matcher.code | html %]" selected="selected">[% matcher.code | html %] ([% matcher.description | html %])</option>
95
                                        [% ELSE %]
199
                                        [% ELSE %]
96
                                        <option value="GetRecord">GetRecord</option>
200
                                            <option value="[% matcher.code | html %]">[% matcher.code | html %] ([% matcher.description | html %])</option>
97
                                        [% END %]
201
                                        [% END %]
98
                                    </select>
99
                                </li>
100
                                <li>
101
                                    <label for="oai_metadataPrefix">Metadata prefix:</label>
102
                                    <input type="text" size="30" id="oai_metadataPrefix" name="oai_metadataPrefix" value="[% oai_pmh_request.oai_metadataPrefix | html %]">
103
                                    [% IF (errors.oai_metadataPrefix.unavailable) %]<span class="error">[This metadataPrefix is unavailable from this OAI-PMH provider.]</span>[% END %]
104
                                    [% IF (errors.oai_metadataPrefix.missing) %]<span class="error">[metadataPrefix is a required field for an OAI-PMH request.]</span>[% END %]
105
                                </li>
106
                                <li>
107
                                    <label for="oai_identifier">Identifier:</label>
108
                                    <input type="text" size="30" id="oai_identifier" name="oai_identifier" value="[% oai_pmh_request.oai_identifier | html %]">
109
                                    [% IF (errors.oai_identifier.missing) %]<span class="error">[Identifier is a required field when using GetRecord for an OAI-PMH request.]</span>[% END %]
110
                                </li>
111
                                <li>
112
                                    <label for="oai_set">Set:</label>
113
                                    <input type="text" size="30" id="oai_set" name="oai_set" value="[% oai_pmh_request.oai_set | html %]">
114
                                    [% IF (errors.oai_set.unavailable) %]<span class="error">[This set is unavailable from this OAI-PMH provider.]</span>[% END %]
115
                                </li>
116
                                [% IF (errors.oai.granularity_mismatch) %]<span class="error">[You must specify the same granularity for both From and Until.]</span>[% END %]
117
                                <li>
118
                                    <label for="oai_from">From:</label>
119
                                    <input type="text" size="30" class="datetime_utc" id="oai_from" name="oai_from" value="[% oai_pmh_request.oai_from | html %]">
120
                                    <span class="help">This value will be treated as UTC time. Note that some repositories only support YYYY-MM-DD datestamps.</span>
121
                                    [% IF (errors.oai_from.malformed) %]<span class="error">[This must be in YYYY-MM-DD or YYYY-MM-DDThh:mm:ssZ format.]</span>[% END %]
122
                                    [% IF (errors.oai_from.unavailable) %]<span class="error">[This granularity is unsupported by this OAI-PMH provider.]</span>[% END %]
123
                                </li>
124
                                <li>
125
                                    <label for="oai_until">Until:</label>
126
                                    <input type="text" size="30" class="datetime_utc" id="oai_until" name="oai_until" value="[% oai_pmh_request.oai_until | html %]">
127
                                    <span class="help">This value will be treated as UTC time. Note that some repositories only support YYYY-MM-DD datestamps.</span>
128
                                    [% IF (errors.oai_until.malformed) %]<span class="error">[This must be in YYYY-MM-DD or YYYY-MM-DDThh:mm:ssZ format.]</span>[% END %]
129
                                    [% IF (errors.oai_until.unavailable) %]<span class="error">[This granularity is unsupported by this OAI-PMH provider.]</span>[% END %]
130
                                </li>
131
                            </ol>
132
                        </fieldset>
133
                        <fieldset class="rows">
134
                            <legend>Import parameters:</legend>
135
                            <ol>
136
                                <li>
137
                                    <label for="import_filter">Filter:</label>
138
                                    [% IF ( oai_pmh_request.import_filter == "default" ) %]
139
                                        <input type="text" size="30" id="import_filter" name="import_filter" value="default">
140
                                    [% ELSE %]
141
                                        <input type="text" size="30" id="import_filter" name="import_filter" value="[% oai_pmh_request.import_filter | html %]">
142
                                    [% END %]
202
                                    [% END %]
143
                                    <span class="help">If no filter is entered, the default filter will be used.</span>
203
                                </select>
144
                                </li>
204
                                <span class="hint">See <a href="/cgi-bin/koha/admin/matching-rules.pl">record matching rules</a> to add or edit rules.</span>
145
                                <li>
205
                            </li>
146
                                    <label for="import_framework_code">Framework code:</label>
206
                        </ol>
147
                                    <select id="import_framework_code" name="import_framework_code">
207
                    </fieldset>
148
                                        <option value="">Default framework</option>
208
                    <fieldset class="rows">
149
                                        [% FOREACH framework IN frameworks %]
209
                        <legend>Download parameters:</legend>
150
                                            [% IF ( oai_pmh_request.import_framework_code == framework.frameworkcode ) %]
210
                        <ol>
151
                                                <option selected="selected" value="[% framework.frameworkcode | html %]">[% framework.frameworktext | html %]</option>
211
                            <li>
152
                                            [% ELSE %]
212
                                <label for="interval">Interval (seconds): </label>
153
                                                <option value="[% framework.frameworkcode | html %]">[% framework.frameworktext | html %]</option>
213
                                <input type="text" id="interval" name="interval" value="[% oai_pmh_request.interval | html %]" size="4">
154
                                            [% END %]
214
                                <span class="hint">The download request will be repeated in intervals of this many seconds. Enter "0" if you want the task to only happen once.</span>
155
                                        [% END %]
215
                            </li>
156
                                    </select>
216
                        </ol>
157
                                </li>
217
                    </fieldset>
158
                                <li>
218
                    <fieldset class="action">
159
                                    <label for="import_record_type">Record type:</label>
219
                        <input type="submit" name="test_parameters" value="Test parameters">
160
                                    <select id="import_record_type" name="import_record_type">
220
                        <input type="submit" name="save" value="Save">
161
                                        <option value="biblio">Bibliographic</option>
221
                        <a class="cancel" href="/cgi-bin/koha/tools/oai-pmh-harvester/dashboard.pl">Cancel</a>
162
                                    </select>
222
                    </fieldset>
163
                                </li>
223
                </form>
164
                                <li>
224
165
                                    <label for="import_matcher_code">Record matcher:</label>
225
            </main>
166
                                    <select id="import_matcher_code" name="import_matcher_code">
226
        </div> <!-- /.col-sm-10.col-sm-push-2 -->
167
                                        <option value="">None</option>
227
168
                                        [% FOREACH matcher IN matchers %]
228
        <div class="col-sm-2 col-sm-pull-10">
169
                                            [% IF ( oai_pmh_request.import_matcher_code == matcher.code ) %]
229
            <aside>
170
                                                <option value="[% matcher.code | html %]" selected="selected">[% matcher.code | html %] ([% matcher.description | html %])</option>
171
                                            [% ELSE %]
172
                                                <option value="[% matcher.code | html %]">[% matcher.code | html %] ([% matcher.description | html %])</option>
173
                                            [% END %]
174
                                        [% END %]
175
                                    </select>
176
                                    <span class="help">See <a href="/cgi-bin/koha/admin/matching-rules.pl">record matching rules</a> to add or edit rules.</span>
177
                                </li>
178
                            </ol>
179
                        </fieldset>
180
                        <fieldset class="rows">
181
                            <legend>Download parameters:</legend>
182
                            <ol>
183
                                <li>
184
                                    <label for="interval">Interval (seconds): </label>
185
                                    <input type="text" id="interval" name="interval" value="[% oai_pmh_request.interval | html %]" size="4">
186
                                    <span class="help">The download request will be repeated in intervals of this many seconds. Enter "0" if you want the task to only happen once.</span>
187
                                </li>
188
                            </ol>
189
                        </fieldset>
190
                        <fieldset class="action">
191
                            <input type="submit" name="test_parameters" value="Test parameters">
192
                            <input type="submit" name="save" value="Save">
193
                            <a class="cancel" href="/cgi-bin/koha/tools/oai-pmh-harvester/dashboard.pl">Cancel</a>
194
                        </fieldset>
195
                    </form>
196
                </div>
197
            </div>
198
            <div class="yui-b">
199
                [% INCLUDE 'tools-menu.inc' %]
230
                [% INCLUDE 'tools-menu.inc' %]
200
            </div>
231
            </aside>
201
        </div>
232
        </div> <!-- /.col-sm-2.col-sm-pull-10 -->
233
    </div> <!-- /.row -->
234
235
202
[% MACRO jsinclude BLOCK %]
236
[% MACRO jsinclude BLOCK %]
237
    [% Asset.js("js/tools-menu.js") | $raw %]
203
    [% INCLUDE 'calendar.inc' %]
238
    [% INCLUDE 'calendar.inc' %]
204
    [% Asset.js("lib/jquery/plugins/jquery-ui-timepicker-addon.min.js") | $raw %]
239
    [% Asset.js("lib/jquery/plugins/jquery-ui-timepicker-addon.min.js") | $raw %]
205
    [% INCLUDE 'timepicker.inc' %]
240
    [% INCLUDE 'timepicker.inc' %]
206
    <script type="text/javascript">
241
    <script>
207
        $(document).ready(function() {
242
        $(document).ready(function() {
208
            toggle_identifier();
243
            toggle_identifier();
209
            $("#oai_verb").on("click",toggle_identifier);
244
            $("#oai_verb").on("click",toggle_identifier);
(-)a/koha-tmpl/intranet-tmpl/prog/js/tools-menu.js (-1 / +2 lines)
Lines 18-22 Link Here
18
          $('#navmenulist a[href$="/cgi-bin/koha/tools/stockrotation.pl"]').addClass("current");
18
          $('#navmenulist a[href$="/cgi-bin/koha/tools/stockrotation.pl"]').addClass("current");
19
      } else if (path.indexOf("plugins") >= 0 ) {
19
      } else if (path.indexOf("plugins") >= 0 ) {
20
          $('#navmenulist a[href$="/cgi-bin/koha/plugins/plugins-home.pl?method=tool"]').addClass("current");
20
          $('#navmenulist a[href$="/cgi-bin/koha/plugins/plugins-home.pl?method=tool"]').addClass("current");
21
      } else if (path.indexOf("oai-pmh-harvester") >= 0 ) {
22
          $('#navmenulist a[href$="/cgi-bin/koha/tools/oai-pmh-harvester/dashboard.pl"]').addClass("current");
21
      }
23
      }
22
  });
24
  });
23
- 

Return to bug 10662