summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeiko Bernlöhr <Heiko.Bernloehr@FreeIT.de>2020-06-12 01:11:30 +0200
committerHeiko Bernlöhr <Heiko.Bernloehr@FreeIT.de>2020-09-10 15:33:24 +0200
commitdee3f81c09f82b6152b9796e03d76e162079667d (patch)
treeacfb72b390a06bcf6bccb00dd881d319eb850080
parent0999f4dfc4a1eb0ff11d5e2e80c6920ac2992b33 (diff)
downloadecs-dee3f81c09f82b6152b9796e03d76e162079667d.tar.gz
ecs-dee3f81c09f82b6152b9796e03d76e162079667d.zip
Add version string to menu line.
To mark a new version write the version string into the file "version" in rails root directory. Then commit a "bump version".
-rw-r--r--app/assets/stylesheets/ecs.css4
-rw-r--r--app/views/shared/_main_menu_line.html.erb5
-rw-r--r--version1
3 files changed, 9 insertions, 1 deletions
diff --git a/app/assets/stylesheets/ecs.css b/app/assets/stylesheets/ecs.css
index c63201b..3130b93 100644
--- a/app/assets/stylesheets/ecs.css
+++ b/app/assets/stylesheets/ecs.css
@@ -123,6 +123,8 @@ ul.menu { display: inline-block; padding: 0 0 0 0; margin: 0 0 2px 0; }
ul.menu li { display: block; float: left; list-style: none; border-right: 1px solid #282; }
ul.menu li:last-child { display: block; float: left; list-style: none; border-right: none; }
+#version { float:right; margin-right:1em; }
+
@@ -189,7 +191,7 @@ body {
#banner {
background: #9c9;
padding-top: 20px;
- padding-bottom: 0px;
+ padding-bottom: 10px;
border-bottom: 2px solid;
font: small-caps 25px/25px "Times New Roman", serif;
color: #282;
diff --git a/app/views/shared/_main_menu_line.html.erb b/app/views/shared/_main_menu_line.html.erb
index 57cf86a..7359d51 100644
--- a/app/views/shared/_main_menu_line.html.erb
+++ b/app/views/shared/_main_menu_line.html.erb
@@ -19,5 +19,10 @@ License along with ECS. If not, see <http://www.gnu.org/licenses/>.
<div id="menu">
+ <% if File.exist?(File.expand_path("version", Rails.root)) -%>
+ <div id=version>
+ <%= IO.read(File.expand_path("version", Rails.root)) %>
+ </div>
+ <% end -%>
<%= render_navigation %>
</div>
diff --git a/version b/version
new file mode 100644
index 0000000..0b12adb
--- /dev/null
+++ b/version
@@ -0,0 +1 @@
+Version 1.2.3