Skip to content

Commit

Permalink
add sftp_host to config singleton
Browse files Browse the repository at this point in the history
  • Loading branch information
johrstrom committed Oct 8, 2019
1 parent bbcd87c commit d31951e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/views/projects/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
You can follow the directions on the <a href="https://github.com/OSC/frame-renderer/#upload-your-project">README</a> on how to do so.
<br><br>

<% unless ENV["SFTP_HOST"].nil? %>
<% if Configuration.sftp_host %>
If you already have an SFTP client installed, you can click
<a href="sftp://<%= ENV["USER"] %>@<%= ENV["SFTP_HOST"] %><%= @project.directory %>">here</a> to open it.
<a href="sftp://<%= ENV["USER"] %>@<%= Configuration.sftp_host %><%= @project.directory %>/">here</a> to open it.
<br><br>
<% end %>

Expand Down
4 changes: 4 additions & 0 deletions config/configuration_singleton.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ def locales_root
Pathname.new(ENV['OOD_LOCALES_ROOT'] || "/etc/ood/config/locales")
end

def sftp_host
ENV['SFTP_HOST']
end

private

# The environment
Expand Down

0 comments on commit d31951e

Please sign in to comment.