Class: Precious::Views::History
- Includes:
- HasPage, HasUserIcons, Pagination, SprocketsHelpers, Sprockets::Helpers
- Defined in:
- lib/gollum/views/history.rb
Constant Summary collapse
- DATE_FORMAT =
'%B %d, %Y'
Constants included from RouteHelpers
Constants included from LocaleHelpers
LocaleHelpers::NO_METHOD_MESSAGE, LocaleHelpers::YAML_VARIABLE_REGEXP
Instance Attribute Summary collapse
-
#allow_editing ⇒ Object
readonly
Returns the value of attribute allow_editing.
-
#page ⇒ Object
readonly
Returns the value of attribute page.
Attributes inherited from Layout
Instance Method Summary collapse
Methods included from SprocketsHelpers
included, #sprockets_asset_path, #sprockets_image_path, #sprockets_javascript_tag, #sprockets_stylesheet_tag
Methods included from HasUserIcons
Methods included from Pagination
Methods included from HasPage
#escaped_url_path, #format, #id, #path
Methods inherited from Layout
#base_url, #critic_markup, #css, #custom_css, #custom_js, #custom_path, #escaped_name, #has_path, #history, #js, #latest_changes, #mathjax_config_path, #mathjax_js, #overview, #partial, #per_page_uploads, #search, #show_local_time
Methods included from TemplateCascade
#first_path_available, #template_file, #template_priority_path, #template_priority_path=
Methods included from OcticonHelpers
included, #octicon, #rocticon, #rocticon_css
Methods included from RouteHelpers
#clean_url, included, #page_route, parse_routes
Methods included from LocaleHelpers
Methods included from AppHelpers
Instance Attribute Details
#allow_editing ⇒ Object (readonly)
Returns the value of attribute allow_editing.
12 13 14 |
# File 'lib/gollum/views/history.rb', line 12 def allow_editing @allow_editing end |
#page ⇒ Object (readonly)
Returns the value of attribute page.
12 13 14 |
# File 'lib/gollum/views/history.rb', line 12 def page @page end |
Instance Method Details
#editable ⇒ Object
42 43 44 |
# File 'lib/gollum/views/history.rb', line 42 def editable @editable end |
#title ⇒ Object
14 15 16 |
# File 'lib/gollum/views/history.rb', line 14 def title @page.title end |
#versions ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/gollum/views/history.rb', line 18 def versions i = @versions.size + 1 @versions.map do |v| i -= 1 filename = path_for_version(v.tracked_pathname) = v. { :id => v.id, :id7 => v.id[0..6], :href => page_route("gollum/commit/#{v.id}"), :href_page => page_route("#{filename}/#{v.id}"), :num => i, :selected => @page.version.id == v.id, :author => v..name.respond_to?(:force_encoding) ? v..name.force_encoding('UTF-8') : v..name, :message => v..respond_to?(:force_encoding) ? v..force_encoding('UTF-8') : v., :date_full => , :date => .strftime(DATE_FORMAT), :datetime => .utc.iso8601, :date_format => DATE_FORMAT, :user_icon => self.user_icon_code(v..email), :filename => filename } end end |