 	'''
 	refresh_fines_summary = ->
 		$('#fines_summary').openils 'fines summary', 'actor.user.fines.summary.authoritative', (o) ->
-			$('.summary_line', @).text tpl_fines_summary {
-				nf:  nf = o.balance_owed
-			}
+			$('.summary_line', @).text tpl_fines_summary
+				nf: nf = o.balance_owed
 		return false
 
 	tpl_checkouts_summary = _.template '''

	'''
	refresh_checkouts_summary = ->
		$('#checkouts_summary').openils 'checkouts summary', 'actor.user.checked_out.count.authoritative', (o) ->
			$('.summary_line', @).text tpl_checkouts_summary {
				nco: nco = o.out
				nod: nod = o.overdue
				nxx: nxx = o.total - nco - nod
			}
		return false

	tpl_holds_summary = _.template '''

		# we will refresh the line and its inner plugins.
		.live 'expand', (e, ui) ->
			$(@).publish $('h3', @).prop 'id' # The h3 element id is the name of the data channel to publish on
			$('.plugin', @).refresh()
			return false

		# Upon the user collapsing a summary line,
		# we will empty its inner plugin content.
		.live 'collapse', (e, ui) ->
			$('.plugin', @).empty()
			return false

		# Upon the user logging in,
		# we will refresh a summary line's inner plugin content if the summary line is not collapsed.
		.subscribe 'login_event', ->
			$(ps).refresh() for ps in $('.plugin', @) when $(ps).closest('.ui-collapsible-content').prop('aria-hidden') is 'false'
			return false

		# Upon the user logging out,
		# we will empty a summary line's inner plugin content if the summary line is not collapsed.
		.subscribe 'logout_event', ->
			$(ps).empty() for ps in $('.plugin', @) when $(ps).closest('.ui-collapsible-content').prop('aria-hidden') is 'false'
			return false

