<div id="qe-link" class="qe-edit-div hide">
    <div id="widget-link">
        <div class="control-group">
            <table class="table table-condensed">
                <thead>
                    <tr>
                        <th>Chinese</th>
                        <th>English</th>
                        <th class="span1"></th>
                    </tr>
                </thead>
                <tfoot>
                    <tr>
                        <td style="text-align:center" colspan="3">
                            <a class="btn btn-primary btn-small" href="#modal-link" data-toggle="modal"><i class="icon-plus icon-white"></i> ADD/新增</a>
                        </td>
                    </tr>
                </tfoot>
                <tbody>
					<% bulletin.bulletin_links.each_with_index do |blink, i| %>
                    <tr>
                        <td><%= link_to blink.i18n_variable.zh_tw, blink.url, :target => '_blank' %></td>
                        <td><%= link_to blink.i18n_variable.en, blink.url, :target => '_blank' %></td>
                        <td><a href="#modal-link" data-toggle="modal" class="action"><i class="icon-pencil"></i></a><a href class="action"><i class="icon-remove"></i></a></td>
                    </tr>
					<% end %>
                </tbody>
            </table>
        </div>
        <div id="modal-link" class="modal hide fade">
            <div class="modal-header">
                <a class="close" data-dismiss="modal">×</a>
                <h3>Add Link / Edit Link</h3>
            </div>
            <div class="modal-body form-horizontal">
                <div class="control-group">
                    <label for="http" class="control-label">URL</label>
                    <div class="controls">
                    <input type="text" value="" id="http" class="input-xlarge">
                    <span class="help-inline">Please correct the error</span>
                    </div>
                </div>
				
				<% @site_valid_locales.each do |locale| %>
					<div class="control-group error">
						<label for="link-<%= locale %>" class="control-label"><%= I18nVariable.first(:conditions => {:key => locale})[I18n.locale] %></label>
						<div class="controls">
						<input type="text" value="" id="link-<%= locale %>" class="input-xlarge">
						<span class="help-inline">Please correct the error</span>
						</div>
					</div>
				<% end %>
				
            </div>
			
            <div class="modal-footer">
                <a class="btn btn-primary" href="#">Submit/確定</a>
                <a class="btn" data-dismiss="modal" href="#">Cancel/取消</a>
            </div>
        </div>
    </div>
</div>
