Class: Precious::Views::LatestChanges
- Includes:
- HasUserIcons, Pagination
- Defined in:
- lib/gollum/views/latest_changes.rb
Constant Summary collapse
- DATE_FORMAT =
'%B %d, %Y'
Constants included from RouteHelpers
Constants included from LocaleHelpers
Precious::Views::LocaleHelpers::NO_METHOD_MESSAGE, Precious::Views::LocaleHelpers::YAML_VARIABLE_REGEXP
Instance Attribute Summary collapse
-
#wiki ⇒ Object
readonly
Returns the value of attribute wiki.
Attributes inherited from Layout
Instance Method Summary collapse
Methods included from HasUserIcons
Methods included from Pagination
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 SprocketsHelpers
included, #sprockets_asset_path, #sprockets_image_path, #sprockets_javascript_tag, #sprockets_stylesheet_tag
Methods included from LocaleHelpers
Methods included from AppHelpers
Instance Attribute Details
#wiki ⇒ Object (readonly)
Returns the value of attribute wiki.
9 10 11 |
# File 'lib/gollum/views/latest_changes.rb', line 9 def wiki @wiki end |
Instance Method Details
#title ⇒ Object
11 12 13 |
# File 'lib/gollum/views/latest_changes.rb', line 11 def title "Latest Changes (Globally)" end |
#versions ⇒ Object
15 16 17 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/latest_changes.rb', line 15 def versions i = @versions.size + 1 @versions.map do |v| i -= 1 = v. { :id => v.id, :id7 => v.id[0..6], :href => page_route("gollum/commit/#{v.id}"), :num => i, :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), :files => v.stats.files.map { |f| new_path = extract_page_dir(f[:new_file]) { :file => new_path, :link => "#{page_route(new_path)}/#{v.id}", :renamed => f[:old_file] ? extract_page_dir(f[:old_file]) : nil } } } end end |