Skip to content

Commit

Permalink
Show version on each page with link (fixes #83)
Browse files Browse the repository at this point in the history
  • Loading branch information
sushain97 committed Feb 28, 2015
1 parent cf759a1 commit 9109ab8
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/util/BaseHttpServlet.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@

import com.google.appengine.api.datastore.Entity;
import com.google.appengine.api.datastore.Text;
import com.google.appengine.api.utils.SystemProperty;

import contestTabulation.Level;

Expand Down Expand Up @@ -68,6 +69,8 @@ public Pair<Entity, UserCookie> init(VelocityContext context, HttpServletRequest
}
}

context.put("applicationVersion", SystemProperty.applicationVersion.get().split("\\.")[0].replace('-', '.'));

return new Pair<Entity, UserCookie>(contestInfo, userCookie);
}

Expand Down
2 changes: 1 addition & 1 deletion war/WEB-INF/app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# along with this program. If not, see [http://www.gnu.org/licenses/].

application: villagetmsca
version: 7-0-0
version: 7-6-0
runtime: java
threadsafe: false
sessions_enabled: true
Expand Down
2 changes: 1 addition & 1 deletion war/WEB-INF/appengine-web.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!-- Generated from app.yaml. Do not edit. -->
<appengine-web-app xmlns='http://appengine.google.com/ns/1.0'>
<application>villagetmsca</application>
<version>7-0-0</version>
<version>7-6-0</version>
<static-files>
<include path='/favicon.ico' expiration='14d'/>
<include path='/css/**.css' expiration='7d'/>
Expand Down
2 changes: 2 additions & 0 deletions war/html/snippets/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -98,5 +98,7 @@

if (window.top !== window.self)
window.top.location.replace(window.self.location.href);

$('#applicationVersion[data-toggle="tooltip"]').tooltip()
});
</script>
6 changes: 6 additions & 0 deletions war/html/snippets/navbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@
#end
#end
</ul>
<div class="pull-right hidden-xs" style="display: inline-flex; height: 50px; cursor: pointer;">
<a style="color: white; margin: auto 0; font-style: italic;" data-toggle="tooltip" data-placement="left" id="applicationVersion" href="https://github.com/sushain97/contestManagement/releases/tag/v$applicationVersion" target="_blank"
title='Version $applicationVersion of the TMSCA Contest Management software licensed by Sushain Cherivirala under the GPLv3 (code) and CC BY-NC-SA (content).'>
v$applicationVersion
</a>
</div>
</div>
</div>
</div>

0 comments on commit 9109ab8

Please sign in to comment.