Skip to content
This repository was archived by the owner on Jul 24, 2020. It is now read-only.

Display version somewhere in the admin view? #560

Merged
merged 3 commits into from
Jul 7, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions app/views/app_configs/edit.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<% title "Application Settings" %>
<h3>You are currently running Reservations <%= APP_VERSION %>.</h3>
<hr />

<%= simple_form_for @app_config, :html => { multipart: true, :class => "form-horizontal" } do |f| %>

Expand Down
4 changes: 2 additions & 2 deletions app/views/layouts/_footer.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
<% else %>
<div class="span5">
<% end %>
Powered by <a href="https://github.com/YaleSTC/reservations">Reservations</a>, an open source equipment reservation app.<br />
&copy; 2012 Yale Student Technology Collaborative
Powered by <a href="https://github.com/YaleSTC/reservations">Reservations</a><%= ' (' + APP_VERSION + ')' if can? :manage, :all %>, an open-source app.<br />
&copy; <%= Time.now.year %> Yale Student Technology Collaborative
<div id="footer_feedback">
<hr>
<a href="https://docs.google.com/a/yale.edu/spreadsheet/viewform?formkey=dE8zTFprNVB4RTAwdURhWEVTTlpDQVE6MQ#gid=0">Provide feedback</a> (suggestions, issues, and bug reports)
Expand Down
3 changes: 3 additions & 0 deletions config/environment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,8 @@
require File.expand_path('../application', __FILE__)
require 'rails_extensions'

# Version variable
APP_VERSION = `git describe --tags --abbrev=0`.strip unless defined? APP_VERSION

# Initialize the rails application
Reservations::Application.initialize!