<div class="umb-panel" ng-controller="Umbraco.Dialogs.LinkPickerController">
	<div class="umb-panel-body no-header with-footer compact">
		<umb-pane>
			<umb-control-group label="@content_urls">
				<input type="text"
					localize="placeholder" 
					placeholder="@general_url" 
					class="umb-editor umb-textstring" 
					ng-model="target.url"
					ng-disabled="target.id"
					 />
			</umb-control-group>

			<umb-control-group label="@content_nodeName">
				<input type="text"
					localize="placeholder" 
					placeholder="@placeholders_entername" 
					class="umb-editor umb-textstring" 
					ng-model="target.name" />
			</umb-control-group>

			<umb-control-group label="@content_target">
				<select class="umb-editor umb-dropdown" ng-model="target.target">
					<option value=""></option>
					<option value="_blank">Opens the linked document in a new window or tab</option>
					<option value="_top">Opens the linked document in the full body of the window</option>
					<option value="_parent">Opens the linked document in the parent frame</option>
				</select>
			</umb-control-group>
		</umb-pane>

        <umb-tree-search-box hide-search-callback="hideSearch"
                             search-callback="onSearchResults"
                             search-from-id="{{searchInfo.searchFromId}}"
                             search-from-name="{{searchInfo.searchFromName}}"
                             show-search="{{searchInfo.showSearch}}"
                             section="{{section}}">
        </umb-tree-search-box>
        
        <br/>

        <umb-tree-search-results ng-if="searchInfo.showSearch"
                                 results="searchInfo.results"
                                 select-result-callback="selectResult">
        </umb-tree-search-results>
        
	    <div ng-hide="searchInfo.showSearch">
            <umb-tree section="content"
                      hideheader="true"
                      hideoptions="true"
                      eventhandler="dialogTreeEventHandler"
                      isdialog="true"
                      enablecheckboxes="true">
            </umb-tree>    
	    </div>
        
	</div>

	<div class="umb-panel-footer">
		<div class="umb-el-wrap umb-panel-buttons">
	        <div class="btn-toolbar umb-btn-toolbar pull-right">
	        	<a href ng-click="close()" class="btn btn-link">
	        		<localize key="general_cancel">Cancel</localize>
				</a>

				<a href ng-click="switchToMediaPicker()" class="btn">Link to file</a>

				<button
					class="btn btn-primary"
					ng-click="submit(target)">
					<localize key="buttons_select">Select</localize>
				</button>
	        </div>
		</div>
	</div>
</div>