Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bibcirculation: pending request list #193

Open
wants to merge 105 commits into
base: prod
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
105 commits
Select commit Hold shift + click to select a range
bc870bb
WebSearch: fix the order of prev and next links
ludmilamarian Nov 4, 2015
da16294
BibFormat: optional record recommender
ddaze May 3, 2016
bc66faa
SolrUtils: reliable regression test suite
Sep 23, 2013
0ce6852
Merge pull request #28 inveniosoftware/invenio#2235 from egabancho/15…
egabancho May 9, 2016
a337815
WebSearch: new fulltext by default search
Aug 5, 2013
97f3fcd
BibRank: Solr: better ranking for fulltext by default
Aug 26, 2013
aaaf54b
Solrutils: more accurate ranking scores
Aug 26, 2013
dd42a06
Merge pull request #30 inveniosoftware/invenio#2768 from egabancho/ma…
egabancho May 9, 2016
bba3e1f
BibRecord: new MARC code filter
Jul 26, 2013
3e33024
BibFormat: new 'xmf' format
Jul 29, 2013
4fa106d
Merge pull request #31 inveniosoftware#2769 from egabancho/master-xm-…
egabancho May 9, 2016
626b61a
Merge pull request #59 inveniosoftware#2794 from ludmilamarian/master…
egabancho May 9, 2016
ba95cb5
Merge pull request #61 from drjova/Youtube
egabancho May 9, 2016
eacb83b
stats: Elasticsearch logging with Lumberjack.
Oct 17, 2014
136c20f
Merge pull request #87 inveniosoftware/invenio#2431 from egabancho/el…
egabancho May 9, 2016
0c42627
WebStat: register custom events on es
drjova Dec 4, 2014
b1cfc3f
Merge pull request #88 from drjova/custom-events
egabancho May 9, 2016
12c9d18
containerutils: new lazy data structures
egabancho Jan 12, 2015
3c4da44
xmlDict: initial release backport
egabancho Feb 11, 2015
d6eccff
pidstore: initial release backport
egabancho Feb 11, 2015
85e163d
BibFormat: DataCite3 export addition
egabancho Feb 11, 2015
4963d61
Merge pull request #97 inveniosoftware/invenio#2679 from egabancho/ma…
egabancho May 9, 2016
d50e438
Merge pull request #104 inveniosoftware/invenio#2788 from switowski/1…
egabancho May 9, 2016
abdf84b
Merge pull request #105 inveniosoftware/invenio#2792 from ludmilamari…
egabancho May 9, 2016
39b2fe0
Merge pull request #107 inveniosoftware/invenio#2796 from ludmilamari…
egabancho May 9, 2016
4b8dc9a
BibField: bug fixes
egabancho Feb 26, 2015
a4543dd
Merge pull request #113 inveniosoftware/invenio#2822 from egabancho/m…
egabancho May 9, 2016
0e8e9b1
Merge pull request #114 from switowski/bibreformat-only-missing
egabancho May 9, 2016
127dfe3
Merge pull request #117 inveniosoftware/invenio#2912 from kasioumis/l…
egabancho May 9, 2016
448088f
WebSearch & WebAlert: Your Searches improvements
kasioumis Jun 28, 2011
40eb82b
WebSearch: yoursearches interface improvements
kasioumis Jul 25, 2011
a8f749d
WebAlert: youralerts interface improvements
kasioumis Jul 26, 2011
f9c81d3
WebSearch: fix yoursearches string format bug
kasioumis Aug 23, 2011
1d5f4f6
WebSearch & WebAlert: CSS fallback to default
kasioumis Aug 30, 2011
e7b8434
WebSearch: more CSS fallback to default
kasioumis Aug 30, 2011
b2e235d
WebAlert: paging for youralerts
kasioumis Aug 30, 2011
5d21b17
WebAlert: Searching for youralerts
kasioumis Sep 1, 2011
acfd28d
WebSearch: Fix paging bug in yoursearches
kasioumis Sep 1, 2011
b8fd526
WebAlert & WebSearch: fix kwalitee reported issues
kasioumis Feb 2, 2012
8f8ada9
WebStyle: add new images to the Makefile
kasioumis Jul 24, 2013
08ccec4
WebAlert: option to pause and resume alerts
kasioumis Nov 8, 2013
637bf88
Webalert & Websearch: prettify display list header
kasioumis Mar 17, 2014
c507475
Webalert: smart display of popular alerts link
kasioumis Mar 17, 2014
02045b1
Webalert: improve store results in basket menu
kasioumis Mar 20, 2014
9c505e0
Webalert & Websearch: harmonize display
kasioumis Mar 20, 2014
42d60de
Websession: Revamp the "Your Account" page
kasioumis Mar 24, 2014
6ff2ec6
General: fix kwalitee reported issues
kasioumis Mar 26, 2014
99bbe88
Miscutil: fix get_authenticated_mechanize_browser
kasioumis Mar 27, 2014
a28b8dd
Websearch: remove mentions of total searches
kasioumis Mar 27, 2014
c0eef84
General: fix failing tests
kasioumis Mar 28, 2014
2644de1
Merge pull request #122 inveniosoftware/invenio#3121 from kasioumis/l…
egabancho May 9, 2016
358fe01
WebStyle: wsgi handler IP parser enhancement
egabancho Jul 17, 2015
40fc419
WebStyle: kwalitee fix
egabancho Jul 17, 2015
0dafb92
Merge pull request #126 inveniosoftware/invenio#3255 from egabancho/l…
egabancho May 9, 2016
f48a54e
Merge pull request #128 inveniosoftware/invenio#3395 from drjova/tab-lan
egabancho May 9, 2016
3d3798f
WebSubmit: subtitle file addition to converter
egabancho Jul 14, 2015
f978344
BibIndex: external file index enhancement
egabancho Jul 14, 2015
0e48dc2
BibRank: allow ranking external files using solr
egabancho Jul 15, 2015
9ac0f03
Merge pull request #130 inveniosoftware/invenio#3358 from egabancho/b…
egabancho May 9, 2016
9926624
WebJournal: navigation menu category replacement
costaflavio Jul 17, 2015
5d26959
Merge pull request #131 from costaflavio/bfe_webjournal_main_navigation
egabancho May 9, 2016
78ab937
WebNews: New module to display and manage news
kasioumis Dec 21, 2012
2ca7610
Merge pull request #8 from kasioumis/master-webnews
egabancho May 9, 2016
c20a6cb
WebSearch: guess primary collection for CERN Site
egabancho Oct 15, 2015
39e2a7c
Merge pull request #151 from egabancho/webpage_breadcrumb_hack
egabancho May 9, 2016
4359be0
Merge pull request #116 inveniosoftware/invenio#2901 from switowski/c…
egabancho May 9, 2016
c09cdce
WebStat: register custom events on es
drjova Dec 4, 2014
4accd07
elasticsearch: GeoIP in Elasticsearch logging
Aug 3, 2015
93c85eb
Merge pull request #137 from egabancho/elasticsearch_geoip_logging
egabancho May 9, 2016
7798090
WebSubmit: fix authors autocomplete
drjova Sep 4, 2015
597d2a4
Merge pull request #143 from drjova/websubmit-email-missing-authors
egabancho May 9, 2016
9725cd4
oaiharvest: authorlist missing
drjova Sep 7, 2015
dae89c7
Merge pull request #144 from drjova/fix-oaiharvest-authorlist
egabancho May 9, 2016
d3c3edd
Merge pull request #145 inveniosoftware/invenio#3493 from switowski/c…
egabancho May 9, 2016
a907127
Merge pull request #170 inveniosoftware/invenio#3577 from kaplun/bibc…
egabancho May 9, 2016
b4dc387
Merge pull request #155 from ludmilamarian/legacy_help_mm_cds
egabancho May 9, 2016
6174945
Merge pull request #158 from ludmilamarian/legacy_add_sorting_washer
egabancho May 9, 2016
97891ff
WebSubmit: report number generation enhacement
egabancho Nov 20, 2015
585ac32
Merge pull request #163 from ludmilamarian/report_number_generation-e…
egabancho May 9, 2016
bdfbbb6
Merge pull request #165 from ludmilamarian/legacy_better_view_restr
egabancho May 9, 2016
2b267c7
Merge pull request #159 from ludmilamarian/legacy_fix_search_latest
egabancho May 9, 2016
5598f02
elasticsearch: fallback file per hostname
drjova Dec 3, 2015
7ce2de7
Merge pull request #168 from drjova/fix-elasticsearch-fallback
egabancho May 9, 2016
0d10ee3
webstat: downloads and pageviews as events
drjova Aug 24, 2015
002d648
Merge pull request #139 from drjova/elasticsearch-only-option
egabancho May 9, 2016
bd7c03a
BibCirculation: reset ILL overdue_letter_number
mvesper Nov 18, 2015
010c294
Merge pull request #161 inveniosoftware/invenio#3592 from mvesper/inv…
egabancho May 9, 2016
c3ff4ce
Merge pull request #125 inveniosoftware/invenio#3203 from ddaze/legac…
egabancho May 9, 2016
a32bca8
elasticsearch: Fix invenio.config import
ddaze Sep 2, 2015
7170796
Merge pull request #142 from ddaze/cds_qa-elasticsearch
egabancho May 9, 2016
83e0951
Merge pull request #169 inveniosoftware/invenio#3616 from ddaze/lega…
egabancho May 9, 2016
eae3331
Bibfield: Add y subfield to FFT
switowski May 17, 2016
6c03a66
WebSearch: improve detection of record viewers
ludmilamarian May 31, 2016
65fa017
Merge pull request #184 from ludmilamarian/legacy_cern_record_viewer
egabancho Jun 23, 2016
458236a
Merge pull request #156 from ludmilamarian/legacy_fix_prev_next_order
egabancho Jun 23, 2016
3dd9125
Merge pull request #175 from drjova/legacy-fix-submit-button-disable
egabancho Jun 23, 2016
72fbcf0
Merge pull request #176 from egabancho/legacy-multiedit-remove-request
egabancho Jun 23, 2016
fd9e4f7
Merge pull request #177 from drjova/webjournal-redirect-articles-from…
egabancho Jun 23, 2016
2d775c2
Merge pull request #179 from ludmilamarian/legacy_fix_webjournal_inde…
egabancho Jun 23, 2016
1f985ff
Merge pull request #183 from switowski/2016-05-17-atlantis-update
egabancho Jun 23, 2016
ae69764
BibSword: Major rewrite of the module
kasioumis Nov 23, 2012
f7a0649
BibSword: Minor fixes for CDS production
switowski Sep 21, 2016
a317f91
BibSword: Move tables creation to tabcreate.sql
switowski Sep 26, 2016
6d01a09
Merge pull request #191 from switowski/2016-09-19-bibsword-module
egabancho Sep 26, 2016
713d05b
Bibcirculation: pending request list
mvesper Sep 27, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 57 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ MJV = 2.3
MATHJAX = http://invenio-software.org/download/mathjax/MathJax-v$(MJV).zip

# current CKeditor version
CKV = 3.6.6
CKV = 4.5.3
CKEDITOR = ckeditor_$(CKV).zip

# current MediaElement.js version
Expand Down Expand Up @@ -332,6 +332,62 @@ uninstall-pdfa-helper-files:
@echo "** The PDF/A helper files were successfully uninstalled. **"
@echo "***********************************************************"

<<<<<<< HEAD
install-youtube:
@echo "***********************************************************"
@echo "** Installing youtube client libraries **"
@echo "***********************************************************"
@echo "Please make sure that you have pip installed **"
@echo "-----------------------------------------------------------"
@echo "For more infos about the library please visit:"
@echo "https://developers.google.com/api-client-library/python/start/installation"
sudo pip install --upgrade google-api-python-client
rm -rf /tmp/invenio_js_frameworks
mkdir -p /tmp/invenio_js_frameworks
(cd /tmp/invenio_js_frameworks && \
wget https://github.com/dimsemenov/Magnific-Popup/archive/master.zip && \
unzip master.zip && \
mkdir -p ${prefix}/var/www/static/magnific_popup && \
cp -r Magnific-Popup-master/dist/* ${prefix}/var/www/static/magnific_popup && \
cd /tmp && \
rm -rf invenio_js_frameworks)
@echo "***********************************************************"
@echo "** Youtube client libraries was successfully installed **"
@echo "***********************************************************"

unistall-youtube:
@echo "***********************************************************"
@echo "** Unistalling Youtube client libraries **"
@echo "***********************************************************"
sudo pip uninstall google-api-python-client
rm -rf ${prefix}/var/www/static/magnific_popup
@echo "***********************************************************"
@echo "** Youtube client libraries was successfully unistalled **"
@echo "***********************************************************"

install-webcomment:
@echo "***********************************************************"
@echo "** Installing Webcomment plugin dependencies. **"
@echo "***********************************************************"
rm -rf /tmp/webcomment
mkdir /tmp/webcomment
wget 'https://github.com/cowboy/jquery-throttle-debounce/archive/master.zip' -O '/tmp/webcomment/webcomment.zip' --no-check-certificate
unzip -u -d '/tmp/webcomment' '/tmp/webcomment/webcomment.zip'
mv /tmp/webcomment/jquery-throttle-debounce-master/jquery.ba-throttle-debounce.min.js ${prefix}/var/www/js
wget 'https://raw.githubusercontent.com/bartaz/sandbox.js/master/jquery.highlight.js' -O '/tmp/webcomment/jquery.highlight.min.js' --no-check-certificate
mv /tmp/webcomment/jquery.highlight.min.js ${prefix}/var/www/js
rm -rf /tmp/webcomment
@echo "***********************************************************"
@echo "** Webcomment plugins were successfully installed. **"
@echo "***********************************************************"

uninstall-webcomment:
rm -f ${prefix}/var/www/js/jquery.ba-throttle-debounce.min.js
rm -f ${prefix}/var/www/js/jquery.highlight.min.js
@echo "***********************************************************"
@echo "** The Webcomment plugins were successfully uninstalled. **"
@echo "***********************************************************"

#Solrutils allows automatic installation, running and searching of an external Solr index.
install-solrutils:
@echo "***********************************************************"
Expand Down
90 changes: 90 additions & 0 deletions config/invenio.conf
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,17 @@ CFG_WEBSEARCH_SYNONYM_KBRS = {
'journal': ['SEARCH-SYNONYM-JOURNAL', 'leading_to_number'],
}

# CFG_OBELIX_HOST -- optionally, enables the Obelix integration
# and defines the Obelix IP or Hostname to connect to.
# Searches, page views and downloads will be logged to Obelix
# and will be used to generate recommendations recommendation data for users.
# To integrate Obelix in the search results,
# configure it in the BibRank settings (template_read_recommendations.cfg).
CFG_OBELIX_HOST =

# CFG_OBELIX_PREFIX -- optionally, defines the Obelix cache prefix.
CFG_OBELIX_PREFIX = obelix::

# CFG_SOLR_URL -- optionally, you may use Solr to serve full-text
# queries and ranking. If so, please specify the URL of your Solr instance.
# Example: http://localhost:8983/solr (default solr port)
Expand Down Expand Up @@ -929,6 +940,8 @@ CFG_BIBDOCFILE_DOCUMENT_FILE_MANAGER_RESTRICTIONS = [
CFG_BIBDOCFILE_DOCUMENT_FILE_MANAGER_MISC = {
'can_revise_doctypes': ['*'],
'can_comment_doctypes': ['*'],
'can_change_copyright_doctypes': ['*'],
'can_change_advanced_copyright_doctypes': ['*'],
'can_describe_doctypes': ['*'],
'can_delete_doctypes': ['*'],
'can_keep_doctypes': ['*'],
Expand Down Expand Up @@ -1171,6 +1184,8 @@ CFG_BIBINDEX_PERFORM_OCR_ON_DOCNAMES = scan-.*
# NOTE: for backward compatibility reasons you can set this to a simple
# regular expression that will directly be used as the unique key of the
# map, with corresponding value set to ".*" (in order to match any URL)
# NOTE2: If the value is None, the url mapping the key regex will be used
# directly
CFG_BIBINDEX_SPLASH_PAGES = {
"http://documents\.cern\.ch/setlink\?.*": ".*",
"http://ilcagenda\.linearcollider\.org/subContributionDisplay\.py\?.*|http://ilcagenda\.linearcollider\.org/contributionDisplay\.py\?.*": "http://ilcagenda\.linearcollider\.org/getFile\.py/access\?.*|http://ilcagenda\.linearcollider\.org/materialDisplay\.py\?.*",
Expand Down Expand Up @@ -1475,6 +1490,15 @@ CFG_WEBCOMMENT_MAX_ATTACHED_FILES = 5
# discussions.
CFG_WEBCOMMENT_MAX_COMMENT_THREAD_DEPTH = 1

# CFG_WEBCOMMENT_ENABLE_HTML_EMAILS -- if True, emails will also contain
# HTML content, in addition to the plaintext version.
CFG_WEBCOMMENT_ENABLE_HTML_EMAILS = True

# CFG_WEBCOMMENT_ENABLE_MARKDOWN_TEXT_RENDERING -- if True, and when
# CFG_WEBCOMMENT_USE_RICH_TEXT_EDITOR is False, plain text will be rendered
# as Markdown <http://daringfireball.net/projects/markdown/>.
CFG_WEBCOMMENT_ENABLE_MARKDOWN_TEXT_RENDERING = True

##################################
# Part 11: BibSched parameters ##
##################################
Expand Down Expand Up @@ -2565,6 +2589,72 @@ CFG_ARXIV_URL_PATTERN = http://export.arxiv.org/pdf/%sv%s.pdf
# e.g. CFG_REDIS_HOSTS = [{'db': 0, 'host': '127.0.0.1', 'port': 7001}]
CFG_REDIS_HOSTS = {'default': [{'db': 0, 'host': '127.0.0.1', 'port': 6379}]}

#################################
## Elasticsearch Configuration ##
#################################

## CFG_ELASTICSEARCH_LOGGING -- Whether to use Elasticsearch logging or not
CFG_ELASTICSEARCH_LOGGING = 0

## CFG_ELASTICSEARCH_INDEX_PREFIX -- The prefix to be used for the
## Elasticsearch indices.
CFG_ELASTICSEARCH_INDEX_PREFIX = invenio-

## CFG_ELASTICSEARCH_HOSTS -- The list of Elasticsearch hosts to connect to.
## This is a list of dictionaries with connection information.
CFG_ELASTICSEARCH_HOSTS = [{'host': '127.0.0.1', 'port': 9200}]

## CFG_ELASTICSEARCH_SUFFIX_FORMAT -- The time format string to base the
## suffixes for the Elasticsearch indices on. E.g. "%Y.%m" for indices to be
## called "invenio-2014.10" for example.
CFG_ELASTICSEARCH_SUFFIX_FORMAT = %Y.%m

## CFG_ELASTICSEARCH_MAX_QUEUE_LENGTH -- The maximum length the queue of events
## is allowed to grow to before it is flushed to Elasticsearch. If you don't
## want to set a maximum, and rely entirely on the periodic flush instead, set
## this to -1.
CFG_ELASTICSEARCH_MAX_QUEUE_LENGTH = -1

## CFG_ELASTICSEARCH_FLUSH_INTERVAL -- The time (in seconds) to wait between
## flushes of the event queue to Elasticsearch. If you want to disable
## periodic flushing and instead rely on the max. queue length to trigger
## flushes, set this to -1.
CFG_ELASTICSEARCH_FLUSH_INTERVAL = 30

## CFG_ELASTICSEARCH_BOT_AGENT_STRINGS -- A list of strings which, if found in
## the user agent string, will cause a 'bot' flag to be added to the logged
## event. This list taken from bots marked "active" at
## <http://www.searchenginedictionary.com/spider-names.shtml>. Googlebot and
## bingbot added to the head of the list for speed.
CFG_ELASTICSEARCH_BOT_AGENT_STRINGS = ['Googlebot', 'bingbot', 'Arachnoidea',
'FAST-WebCrawler', 'Fluffy the spider', 'Gigabot', 'Gulper', 'ia_archiver',
'MantraAgent', 'MSN', 'Scooter', 'Scrubby', 'Slurp', 'Teoma_agent1', 'Winona',
'ZyBorg', 'Almaden', 'Cyveillance', 'DTSearch', 'Girafa.com', 'Indy Library',
'LinkWalker', 'MarkWatch', 'NameProtect', 'Robozilla', 'Teradex Mapper',
'Tracerlock', 'W3C_Validator', 'WDG_Validator', 'Zealbot']

##############################
# Recommender Configuration ##
##############################
# CFG_RECOMMENDER_REDIS -- optionally, enables the recommendations and
# specifies the Redis host from where the recommendations are loaded.
# To show the recommendations on the record page include the
# BibFormat element `bfe_record_recommendations`.
CFG_RECOMMENDER_REDIS =

# CFG_RECOMMENDER_PREFIX -- optionally, defines the prefix used in the
# redis cache.
CFG_RECOMMENDER_PREFIX = Reco_1::

##########################
# Part 37: WEBJOURNAL ##
##########################

# Specify webjournal categories that have been deleted and we want to redirect
# the articles in the CDS detail view. For example all the articles in deleted
# category `General Information` will redirect to the record detail view.
CFG_WEBJOURNAL_REDIRECT_ARTICLES_OF_DELETED_CATEGORIES = []

##########################
# THAT's ALL, FOLKS! ##
##########################
6 changes: 6 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -775,6 +775,7 @@ AC_CONFIG_FILES([config.nice \
modules/bibsword/doc/admin/Makefile \
modules/bibsword/doc/hacking/Makefile \
modules/bibsword/lib/Makefile \
modules/bibsword/lib/client_servers/Makefile \
modules/bibsword/etc/Makefile \
modules/bibupload/bin/Makefile \
modules/bibupload/bin/bibupload \
Expand Down Expand Up @@ -811,6 +812,7 @@ AC_CONFIG_FILES([config.nice \
modules/miscutil/etc/ckeditor_scientificchar/lang/Makefile \
modules/miscutil/lib/Makefile \
modules/miscutil/lib/upgrades/Makefile \
modules/miscutil/lib/pid_providers/Makefile \
modules/miscutil/sql/Makefile \
modules/miscutil/web/Makefile \
modules/webaccess/Makefile \
Expand Down Expand Up @@ -874,6 +876,10 @@ AC_CONFIG_FILES([config.nice \
modules/webmessage/doc/hacking/Makefile \
modules/webmessage/lib/Makefile \
modules/webmessage/web/Makefile \
modules/webnews/Makefile \
modules/webnews/doc/Makefile \
modules/webnews/lib/Makefile \
modules/webnews/web/Makefile \
modules/websearch/Makefile \
modules/websearch/bin/Makefile \
modules/websearch/bin/webcoll \
Expand Down
1 change: 1 addition & 0 deletions modules/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ SUBDIRS = bibauthorid \
webjournal \
weblinkback \
webmessage \
webnews \
websearch \
websession \
webstat \
Expand Down
6 changes: 5 additions & 1 deletion modules/bibcirculation/lib/bibcirculation_dblayer.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,6 @@ def get_loan_request_by_status(status):
WHERE lr.id_crcBORROWER=bor.id AND it.barcode=lr.barcode AND
lib.id = it.id_crcLIBRARY AND lr.status=%s
AND lr.period_of_interest_from <= NOW()
AND lr.period_of_interest_to >= NOW()
ORDER BY lr.request_date"""

res = run_sql(query , (status, ))
Expand Down Expand Up @@ -2721,6 +2720,11 @@ def get_purchase_request_borrower_details(ill_request_id):
else:
return None

def update_ill_request_letter_number(ill_request_id, overdue_letter_number):
query = ('UPDATE crcILLREQUEST set overdue_letter_number=%s '
'where id=%s')
run_sql(query, (overdue_letter_number, ill_request_id))

def update_ill_request(ill_request_id, library_id, request_date,
expected_date, arrival_date, due_date, return_date,
status, cost, barcode, library_notes):
Expand Down
70 changes: 44 additions & 26 deletions modules/bibcirculation/lib/bibcirculationadminlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -3044,36 +3044,35 @@ def update_item_info_step6(req, tup_infos, ln=CFG_SITE_LANG):
else:
infos.append(_("Item <strong>[%s]</strong> updated, but the <strong>barcode was not modified</strong> because it was not found (!?).") % (old_barcode))

copies = db.get_item_copies_details(recid)
requests = db.get_item_requests(recid)
loans = db.get_item_loans(recid)
purchases = db.get_item_purchases(CFG_BIBCIRCULATION_ACQ_STATUS_NEW, recid)
copies = db.get_item_copies_details(recid)
requests = db.get_item_requests(recid)
loans = db.get_item_loans(recid)
purchases = db.get_item_purchases(CFG_BIBCIRCULATION_ACQ_STATUS_NEW, recid)

req_hist_overview = db.get_item_requests_historical_overview(recid)
loans_hist_overview = db.get_item_loans_historical_overview(recid)
purchases_hist_overview = db.get_item_purchases(CFG_BIBCIRCULATION_ACQ_STATUS_RECEIVED, recid)
req_hist_overview = db.get_item_requests_historical_overview(recid)
loans_hist_overview = db.get_item_loans_historical_overview(recid)
purchases_hist_overview = db.get_item_purchases(CFG_BIBCIRCULATION_ACQ_STATUS_RECEIVED, recid)

body = bc_templates.tmpl_get_item_details(recid=recid,
copies=copies,
requests=requests,
loans=loans,
purchases=purchases,
req_hist_overview=req_hist_overview,
loans_hist_overview=loans_hist_overview,
purchases_hist_overview=purchases_hist_overview,
infos=infos,
ln=ln)
infos.append(_('If you wish, you can now open the <a href="%s">Record Editor</a> to modify the bibliographic information of this item.') % (CFG_SITE_SECURE_URL + "/record/edit/#state=edit&recid=" + str(recid)))

return page(title=_("Update item information"),
uid=id_user,
req=req,
body=body, language=ln,
navtrail=navtrail_previous_links,
lastupdated=__lastupdated__)
body = bc_templates.tmpl_get_item_details(recid=recid,
copies=copies,
requests=requests,
loans=loans,
purchases=purchases,
req_hist_overview=req_hist_overview,
loans_hist_overview=loans_hist_overview,
purchases_hist_overview=purchases_hist_overview,
infos=infos,
ln=ln)

return page(title=_("Update item information"),
uid=id_user,
req=req,
body=body, language=ln,
navtrail=navtrail_previous_links,
lastupdated=__lastupdated__)

else:
return redirect_to_url(req, CFG_SITE_SECURE_URL +
"/record/edit/#state=edit&recid=" + str(recid))

def item_search(req, infos=[], ln=CFG_SITE_LANG):
"""
Expand Down Expand Up @@ -4969,6 +4968,25 @@ def ill_request_details_step2(req, delete_key, ill_request_id, new_status,
barcode = db.get_ill_barcode(ill_request_id)
db.update_ill_loan_status(borrower_id, barcode, return_date, 'ill')

# ill recall letter issue
try:
from invenio.dbquery import run_sql
_query = ('SELECT due_date from crcILLREQUEST where id = %s')
_due = run_sql(_query, (ill_request_id))[0][0]

# Since we don't know if the due_date is a string or datetime
try:
_due_date = datetime.datetime.strptime(due_date, '%Y-%m-%d')
except TypeError:
_due_date = due_date

# This means that the ILL got extended, we therefore reset the
# overdue_letter_numer
if _due < _due_date:
db.update_ill_request_letter_number(ill_request_id, 0)
except Exception:
pass

db.update_ill_request(ill_request_id, library_id, request_date,
expected_date, arrival_date, due_date, return_date,
new_status, cost, barcode,
Expand Down
2 changes: 1 addition & 1 deletion modules/bibconvert/etc/oaiarxiv2marcxml.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!-- $Id$

This file is part of Invenio.
Copyright (C) 2007, 2008, 2010, 2011 CERN.
Copyright (C) 2007, 2008, 2010, 2011, 2015 CERN.

Invenio is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
Expand Down
Loading