Class | Hobix::Out::Quick |
In: |
lib/hobix/comments.rb
lib/hobix/bixwik.rb lib/hobix/trackbacks.rb |
Parent: | Object |
# File lib/hobix/bixwik.rb, line 166 166: def banner_erb; %{ 167: <% page_id = page.id %> 168: <% page_id = 'HomePage' if page.id == 'index' %> 169: <% page_name = Hobix::BixWik::wiki_word( page_id ) %> 170: <div id="banner"> 171: <% if page_id == "HomePage" %> 172: <h1 id="title"><%= weblog.title %></h1> 173: <% if weblog.tagline %><div id="tagline"><%= weblog.tagline %></div><% end %> 174: <% else %> 175: <div id="title"><%= weblog.title %></div> 176: <h1 id="pageName"><%= page_name %></h1> 177: <% end %> 178: <form id="navigationForm" class="navigation" action="<%= weblog.expand_path( 'search' ) %>" action="get" style="font-size: 10px"> 179: <% Hobix::BixWik::QUICK_MENU.each do |menu_link, attr| %> 180: <% if page_id == menu_link %> 181: <%= attr[0] %> 182: <% else %> 183: <a href="<%= weblog.abs_link( menu_link ) %>" title="<% if attr[1] %>[<%= attr[1] %>] <% end %><%= attr[2] %>" 184: accesskey="<%= attr[1] %>"><%= attr[0] %></a> 185: <% end %> | 186: <% end %> 187: <input type="text" id="searchField" name="query" style="font-size: 10px" value="Search" onClick="this.value == 'Search' ? this.value = '' : true"> 188: </form> 189: </div> } 190: end
# File lib/hobix/comments.rb, line 46 46: def entry_comment_erb; %{ 47: <% entry_id = entry.id %> 48: <div id="comments"> 49: <% comments = weblog.storage.load_attached( entry_id, "comments" ) rescue [] %> 50: <% comments.each do |comment| %> 51: <div class="entry"> 52: <div class="entryAttrib"> 53: <div class="entryAuthor"><h3><%= comment.author %></h3></div> 54: <div class="entryTime">said on <%= comment.created.strftime( "<nobr>%d %b %Y</nobr> at <nobr>%H:%M</nobr>" ) %></div> 55: </div> 56: <div class="entryContentOuter"><div class="entryContent"><%= comment.content.to_html %></div></div> 57: </div> 58: <% end %> 59: } end
# File lib/hobix/comments.rb, line 61 61: def entry_comment_form_erb; %{ 62: <div class="entry"> 63: <form id="userComment" method="post" action="<%= weblog.expand_path( '/control/comment/' + entry_id )%>"> 64: <div class="entryAttrib"> 65: <div class="entryAuthor"><input name="<%= Hobix::Facets::Comments.form_field 'author' %>" type="textbox" size="15" maxlength="50" /></div> 66: <div id="liveTime" class="entryTime">said on <%= Time.now.strftime( "<nobr>%d %b %Y</nobr> at <nobr>%H:%M</nobr>")%></div> 67: </div> 68: <div class="entryContentOuter"><div class="entryContent"> 69: <textarea name="<%= Hobix::Facets::Comments.form_field 'content' %>" rows="6" cols="50"></textarea> 70: <p><input type="button" name="pleasePreview" value="preview" 71: onClick="new Ajax.Request( '<%= weblog.expand_path '/control/preview' %>', {parameters: Form.serialize('userComment'), onComplete: function(req) { $('textilePreview').innerHTML = req.responseText }})" /> 72: <input type="submit" name="<%= Hobix::Facets::Comments.form_field 'submit' %>" value=">>" /> 73: <small>* do <a href="javascript:quickRedReference();">fancy stuff</a> in your comment.</small> 74: </p> 75: <div id="textileWrap"><!-- <h4>PREVIEW PANE</h4> --> 76: <div id="textilePreview"></div> 77: </div> 78: </div> 79: </div></div> 80: 81: </form> 82: </div> 83: } end
# File lib/hobix/bixwik.rb, line 192 192: def entry_content_erb 193: %{ <div class="entryContent"><%= weblog.wiki_page( entry.content.to_html ) %></div> } 194: end
# File lib/hobix/bixwik.rb, line 196 196: def entry_footer_erb; %{ 197: Revision from <%= ( entry.modified || entry.created ).strftime( "%d %B %Y at %H:%M" ) %> by <%= weblog.wiki_link( "authors/" + entry.author ) %> } 198: end
# File lib/hobix/trackbacks.rb, line 38 38: def entry_trackback_erb; %{ 39: <div id="trackbacks"> 40: <% entry_id = entry.id %> 41: <% trackbacks = weblog.storage.load_attached( entry_id, "trackbacks") rescue [] %> 42: <% trackbacks.each do |trackback| %> 43: <div class="entry"> 44: <div class="entryAttrib"> 45: <div class="entryAuthor"><h3><%= trackback.blog_name %></h3></div> 46: <div class="entryTime">tracked back on <%= trackback.created.strftime("<nobr>%d %b %Y</nobr> at <nobr>%H:%M</nobr>" ) %></div> 47: </div> 48: <div class="entryContentOuter"><div class="entryContent"> 49: <h3><a href="<%= trackback.url %>"><%= trackback.title %></a></h3> 50: <%= trackback.excerpt %> 51: </div></div> 52: </div> 53: <% end %> 54: </div> 55: } end