Project

General

Profile

Download (2.99 KB) Statistics
| Branch: | Tag: | Revision:

foreman_docker / app / views / containers / steps / image.html.erb @ ada932ab

1
<%= javascript 'foreman_docker/image_step' %>
2
<%= stylesheet 'foreman_docker/autocomplete' %>
3

    
4
<%= render :layout => 'title', :locals => { :step => 2 } do %>
5
    <ul class="nav nav-tabs" data-tabs="tabs">
6
      <li class="active"><a href="#hub" data-toggle="tab" id="hub_tab">
7
        <span class="glyphicon glyphicon-cloud-download"></span>
8
        <%= _("Docker hub") %>
9
      </a></li>
10
      <li><a href="#registry" data-toggle="tab" id="registry_tab">
11
        <span class="glyphicon glyphicon-cloud-download"></span>
12
        <%= _("External registry") %>
13
      </a></li>
14
    </ul>
15

    
16
    <%= form_for @container, :class => 'form-horizontal', :url => wizard_path, :method => :put do |f| %>
17
        <div class="tab-content">
18
          <div class="tab-pane active" id="hub">
19
          </div>
20
          <div class="tab-pane" id="registry">
21
            <div class="input-group col-md-6">
22
              <%= select_registry f %>
23
            </div>
24
          </div>
25
          <div>
26
            <div class="form-group col-md-6">
27
              <%= label_tag "image[search]", _('Search'), :class=>"col-sm-2 control-label" %>
28
              <div class="input-group">
29
                <%= auto_complete_search('image[image_id]', '',
30
                                         :'data-url'  => auto_complete_image_container_path(@container),
31
                                         :value       => f.object.image.present? ? f.object.image.image_id : '',
32
                                         :id          => :search,
33
                                         :focus_on_load => true,
34
                                         :placeholder => _('Find your favorite container, e.g: centos')) %>
35
                <span class="input-group-addon glyphicon" id="search-addon"></span>
36
                <span class="input-group-btn">
37
                  <%= button_tag(:class      => 'btn btn-default',
38
                                 :type       => 'button',
39
                                 :id         => 'search_image',
40
                                 :'data-url' => search_image_container_path(@container),
41
                                 :onclick    => 'searchImage(this)') do %>
42
                    <span class="glyphicon glyphicon-search"></span>
43
                  <% end %>
44
                </span>
45
              </div>
46
            </div>
47
            <%= text_f f, :tag,
48
                          :value      => f.object.tag.present? ? f.object.tag.tag : '',
49
                          :id         => 'tag',
50
                          :'data-url' => auto_complete_image_tags_container_path(@container) %>
51
            <div class="col-md-12">
52
              <div id='searching_spinner' class='col-md-offset-3 hide'>
53
                <span id='waiting_text'>
54
                </span>
55
                <%= image_tag('/assets/spinner.gif', :id => 'loading_images_indicator') %>
56
              </div>
57
              <div id='image_search_results'>
58
              </div>
59
            </div>
60
          </div>
61
          <%= render :partial => 'form_buttons' %>
62
        </div>
63
    <% end %>
64
<% end %>