Class: EPIC::XHTML
- Inherits:
-
Rackful::XHTML
- Object
- Rackful::Serializer
- Rackful::XHTML
- EPIC::XHTML
- Defined in:
- src/epic_resource.rb
Constant Summary
Constant Summary
Constants inherited from Rackful::XHTML
Instance Attribute Summary
Attributes inherited from Rackful::Serializer
Instance Method Summary (collapse)
Methods inherited from Rackful::XHTML
#each, #each_nested, #htmlify, #xsd_type
Methods inherited from Rackful::Serializer
Constructor Details
This class inherits a constructor from Rackful::Serializer
Instance Method Details
- (void) breadcrumbs
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'src/epic_resource.rb', line 24 def segments = Rackful::Request.current.path.split('/') segments.pop return '' if segments.empty? bc_path = '' '<ul class="breadcrumb">' + segments.collect do |segment| bc_path += segment + '/' '<li><a href="' + bc_path + '" rel="' + ( segment.empty? && 'home' || 'contents' ) + '">' + ( segment.empty? && 'home' || segment.to_path.unescape ) + '</a><span class="divider">/</span></li>' end.join + '</ul>' end |
- (void) footer
header
57 58 59 60 61 62 63 64 |
# File 'src/epic_resource.rb', line 57 def <<EOS <p align="right"><em> Developed by <a href="http://www.sara.nl/">SARA</a> and <a href="http://www.gwdg.de/">GWDG</a><br/> Sponsored by <a href="http://www.catchplus.nl/">CATCH+</a> and <a href="http://www.eudat.eu/">EUDAT</a> </em></p></body></html> EOS end |
- (void) header
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'src/epic_resource.rb', line 40 def header <<EOS <link rel="stylesheet" href="/inc/bootstrap/css/bootstrap.min.css"/> <link rel="stylesheet" href="/inc/bootstrap/css/bootstrap-responsive.min.css"/> <!--<link rel="stylesheet/less" type="text/css" href="/inc/epic.less"/>--> <title>#{Rack::Utils.escape_html( resource.title )}</title></head> <body>#{self.}#{resource.xhtml} <script src="/inc/jquery.js" type="text/javascript"></script> <script type="text/javascript"> window.onload = function() { $("dl.rackful-object").addClass("dl-horizontal"); $("table.rackful-objects").addClass("table table-striped table-condensed table-bordered"); } </script> EOS end |