Revision 1fa42669
Added by Amos Benari over 10 years ago
refs #3811 - additional bootstrap 3 updates/fixes
- provisioning template "resolve" button ui fixes
- form inline help and button lacation fix
- host ip address help link fixed
- fixes libvirt allocation buttons
- host global parameters columns fixed
- fix multi-select width
app/assets/stylesheets/bootstrap_and_overrides.scss | ||
---|---|---|
|
||
// help-inline is not defined in Bootstrap3
|
||
.help-inline{
|
||
vertical-align: middle;
|
||
margin-top: 0;
|
||
line-height: 2.428571;
|
||
}
|
||
|
app/helpers/hosts_helper.rb | ||
---|---|---|
[N_('None'), N_('Size'), N_('Full')].collect do |label|
|
||
content_tag :button, _(label), :type => 'button', :href => '#',
|
||
:name => 'allocation_radio_btn',
|
||
:class => (label == active) ? 'btn active' : 'btn',
|
||
:class => (label == active) ? 'btn btn-default active' : 'btn btn-default',
|
||
:onclick => "allocation_switcher(this, '#{label}');"
|
||
end.join(' ').html_safe
|
||
end)
|
app/helpers/layout_helper.rb | ||
---|---|---|
end
|
||
|
||
def selectable_f(f, attr, array, select_options = {}, html_options = {})
|
||
html_options.merge!(:size => 'col-md-10') if html_options.include?(:multiple)
|
||
field(f, attr, html_options) do
|
||
addClass html_options, "form-control"
|
||
f.select attr, array, select_options, html_options
|
app/views/common_parameters/_inherited_parameters.html.erb | ||
---|---|---|
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<% inherited_parameters.keys.sort.each do |name| %>
|
||
<% keys = inherited_parameters.keys.sort %>
|
||
<% keys.each do |name| %>
|
||
<tr>
|
||
<%= "<td class='col-md-2' rowspan='#{inherited_parameters.size}'>#{_('Global')}</td>".html_safe if name == inherited_parameters.first[0]%>
|
||
<%= "<td class='col-md-3' rowspan='#{keys.size}'>#{_('Global')}</td>".html_safe if name == keys.first%>
|
||
<td class='col-md-2'><%= content_tag :span, name, :id=>"name_#{name}", :class => "col-md-2" %></td>
|
||
<td class='col-md-6'><%= parameter_value_field inherited_parameters[name] %></td>
|
||
<td class='col-md-7'><%= parameter_value_field inherited_parameters[name] %></td>
|
||
<td>
|
||
<%= link_to_function(_("override"), "override_param(this)", :title => _("Override this value"),
|
||
:'data-tag' => 'override', :class =>"btn btn-default" ) if authorized_via_my_scope("host_editing", "create_params") %>
|
app/views/hosts/_operating_system.html.erb | ||
---|---|---|
</div>
|
||
<!-- this section is used for displaying the provisioning scripts-->
|
||
<div class="form-group">
|
||
<div class="control-label"><%= _('Provisioning templates') %></div>
|
||
<%= link_to_function icon_text("refresh", _("Resolve")), "template_info('#templates_info','#{template_used_hosts_url}')", :class => "btn btn-default" %>
|
||
<%= popover("?", _("Display the templates that will be used to provision this host"), :title=>_("Provisioning Templates")) %>
|
||
<br>
|
||
<div id="templates_info" class="col-md-6"> </div>
|
||
<label class="col-xs-2 control-label"><%= _('Provisioning templates') %></label>
|
||
<div class="col-xs-10">
|
||
<%= link_to_function icon_text("refresh", _("Resolve")), "template_info('#templates_info','#{template_used_hosts_url}')", :class => "btn btn-default" %>
|
||
<div class="help-block">
|
||
<%= _("Display the templates that will be used to provision this host") %>
|
||
</div>
|
||
</div>
|
||
<div id="templates_info" class="col-xs-offset-2 col-xs-8"> </div>
|
||
</div>
|
app/views/hosts/_provisioning.html.erb | ||
---|---|---|
<div class="alert alert-success">
|
||
<a class="close" href="#" data-dismiss="alert">×</a>
|
||
<% templates.sort{|t,x| t.template_kind <=> x.template_kind}.each do |tmplt| %>
|
||
<div class="form-group">
|
||
<div class="control-label"> <%= _("%s Template") % tmplt.template_kind %> </div>
|
||
<%= link_to_if_authorized h(tmplt), hash_for_edit_config_template_path(:id => tmplt.to_param), :rel=>"external" %>
|
||
</div>
|
||
<% end %>
|
||
<% templates.sort{|t,x| t.template_kind <=> x.template_kind}.each do |tmplt| %>
|
||
<div class="form-group">
|
||
<div class="control-label col-md-4"> <%= _("%s Template") % tmplt.template_kind %> </div>
|
||
<%= link_to_if_authorized h(tmplt), hash_for_edit_config_template_path(:id => tmplt.to_param), :rel=>"external" %>
|
||
</div>
|
||
<% end %>
|
||
</div>
|
app/views/hosts/_unattended.html.erb | ||
---|---|---|
<%= render 'common/domain', :item => @host %>
|
||
</span>
|
||
<%= text_f f, :ip, :autocomplete => 'off',
|
||
:help_inline => popover("?", _("An IP address will be auto-suggested if you have a DHCP-enabled Smart Proxy on the subnet selected above.<br/><br/>The IP address can be left blank when:<br/><ul><li>provisioning tokens are enabled</li><li>the domain does not manage DNS</li><li>the subnet does not manage reverse DNS</li><li>and the subnet does not manage DHCP reservations</li></ul>"), :title => _("IP address for this host")).html_safe %>
|
||
:help_inline => popover(_("IP address auto-suggest"), _("An IP address will be auto-suggested if you have a DHCP-enabled Smart Proxy on the subnet selected above.<br/><br/>The IP address can be left blank when:<br/><ul><li>provisioning tokens are enabled</li><li>the domain does not manage DNS</li><li>the subnet does not manage reverse DNS</li><li>and the subnet does not manage DHCP reservations</li></ul>"), :title => _("IP address for this host")).html_safe %>
|
||
<%= f.fields_for :interfaces do |interfaces| %>
|
||
<%= render 'hosts/interfaces', :f => interfaces %>
|
||
<% end %>
|
Also available in: Unified diff