made <source>...</source> and it's sub-elements conditional

This commit is contained in:
Andreas Bleischwitz
2017-11-28 18:22:40 +01:00
parent 5efc0b2b38
commit a64c538f7f

View File

@@ -111,11 +111,16 @@
<% @channels.each do |channel| %>
<channel type='<%= channel[:type] %>' >
<source mode='<%= channel[:source_mode] %>'
<%if channel[:source_mode] or channel[:source_path] %>
<source
<% if channel[:source_mode] %>
mode='<%= channel[:source_mode] %>'
<% end %>
<% if channel[:source_path] %>
path="<%= channel[:source_path] %>"
<% end %>
/>
<% end %>
<target type='<%= channel[:target_type] %>'
<% if channel[:target_name] %>
name="<%= channel[:target_name] %>"