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

Commit 4f21af1

Browse files
committed
Merge pull request #560 from YaleSTC/560_display_version
Display version somewhere in the admin view?
2 parents 0c5d5df + 7386993 commit 4f21af1

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

app/views/app_configs/edit.html.erb

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
<% title "Application Settings" %>
2+
<h3>You are currently running Reservations <%= APP_VERSION %>.</h3>
3+
<hr />
24

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

app/views/layouts/_footer.html.erb

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
<% else %>
1111
<div class="span5">
1212
<% end %>
13-
Powered by <a href="https://github.com/YaleSTC/reservations">Reservations</a>, an open source equipment reservation app.<br />
14-
&copy; 2012 Yale Student Technology Collaborative
13+
Powered by <a href="https://github.com/YaleSTC/reservations">Reservations</a><%= ' (' + APP_VERSION + ')' if can? :manage, :all %>, an open-source app.<br />
14+
&copy; <%= Time.now.year %> Yale Student Technology Collaborative
1515
<div id="footer_feedback">
1616
<hr>
1717
<a href="https://docs.google.com/a/yale.edu/spreadsheet/viewform?formkey=dE8zTFprNVB4RTAwdURhWEVTTlpDQVE6MQ#gid=0">Provide feedback</a> (suggestions, issues, and bug reports)

config/environment.rb

+3
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,8 @@
22
require File.expand_path('../application', __FILE__)
33
require 'rails_extensions'
44

5+
# Version variable
6+
APP_VERSION = `git describe --tags --abbrev=0`.strip unless defined? APP_VERSION
7+
58
# Initialize the rails application
69
Reservations::Application.initialize!

0 commit comments

Comments
 (0)