+ <div class="settings">
+ <label class="setting" data-setting="url">
+ <span class="name"><?php _e('URL'); ?></span>
+ <input type="text" value="{{ data.url }}" readonly />
+ </label>
+ <# var maybeReadOnly = data.can.save || data.allowLocalEdits ? '' : 'readonly'; #>
+ <label class="setting" data-setting="title">
+ <span class="name"><?php _e('Title'); ?></span>
+ <input type="text" value="{{ data.title }}" {{ maybeReadOnly }} />
+ </label>
+ <# if ( 'audio' === data.type ) { #>
+ <?php foreach ( array(
+ 'artist' => __( 'Artist' ),
+ 'album' => __( 'Album' ),
+ ) as $key => $label ) : ?>
+ <label class="setting" data-setting="<?php echo esc_attr( $key ) ?>">
+ <span class="name"><?php echo $label ?></span>
+ <input type="text" value="{{ data.<?php echo $key ?> || data.meta.<?php echo $key ?> || '' }}" />
+ </label>
+ <?php endforeach; ?>
+ <# } #>
+ <label class="setting" data-setting="caption">
+ <span class="name"><?php _e( 'Caption' ); ?></span>
+ <textarea {{ maybeReadOnly }}>{{ data.caption }}</textarea>
+ </label>
+ <# if ( 'image' === data.type ) { #>
+ <label class="setting" data-setting="alt">
+ <span class="name"><?php _e( 'Alt Text' ); ?></span>
+ <input type="text" value="{{ data.alt }}" {{ maybeReadOnly }} />
+ </label>
+ <# } #>
+ <label class="setting" data-setting="description">
+ <span class="name"><?php _e('Description'); ?></span>
+ <textarea {{ maybeReadOnly }}>{{ data.description }}</textarea>
+ </label>
+ <label class="setting">
+ <span class="name"><?php _e( 'Uploaded By' ); ?></span>
+ <span class="value">{{ data.authorName }}</span>
+ </label>
+ <# if ( data.uploadedToTitle ) { #>
+ <label class="setting">
+ <span class="name"><?php _e( 'Uploaded To' ); ?></span>
+ <# if ( data.uploadedToLink ) { #>
+ <span class="value"><a href="{{ data.uploadedToLink }}">{{ data.uploadedToTitle }}</a></span>
+ <# } else { #>
+ <span class="value">{{ data.uploadedToTitle }}</span>
+ <# } #>
+ </label>
+ <# } #>
+ <div class="attachment-compat"></div>
+ </div>
+
+ <div class="actions">
+ <a class="view-attachment" href="{{ data.link }}"><?php _e( 'View attachment page' ); ?></a>
+ <# if ( data.can.save ) { #> |
+ <a href="post.php?post={{ data.id }}&action=edit"><?php _e( 'Edit more details' ); ?></a>
+ <# } #>
+ <# if ( ! data.uploading && data.can.remove ) { #> |
+ <?php if ( MEDIA_TRASH ): ?>
+ <# if ( 'trash' === data.status ) { #>
+ <a class="untrash-attachment" href="#"><?php _e( 'Untrash' ); ?></a>
+ <# } else { #>
+ <a class="trash-attachment" href="#"><?php _ex( 'Trash', 'verb' ); ?></a>
+ <# } #>
+ <?php else: ?>
+ <a class="delete-attachment" href="#"><?php _e( 'Delete Permanently' ); ?></a>
+ <?php endif; ?>
+ <# } #>
+ </div>
+
+ </div>
+ </script>
+
+ <script type="text/html" id="tmpl-attachment">
+ <div class="attachment-preview js--select-attachment type-{{ data.type }} subtype-{{ data.subtype }} {{ data.orientation }}">
+ <div class="thumbnail">
+ <# if ( data.uploading ) { #>
+ <div class="media-progress-bar"><div style="width: {{ data.percent }}%"></div></div>
+ <# } else if ( 'image' === data.type && data.sizes ) { #>
+ <div class="centered">
+ <img src="{{ data.size.url }}" draggable="false" alt="" />
+ </div>
+ <# } else { #>
+ <div class="centered">
+ <# if ( data.image && data.image.src && data.image.src !== data.icon ) { #>
+ <img src="{{ data.image.src }}" class="thumbnail" draggable="false" />
+ <# } else { #>
+ <img src="{{ data.icon }}" class="icon" draggable="false" />
+ <# } #>
+ </div>
+ <div class="filename">
+ <div>{{ data.filename }}</div>
+ </div>
+ <# } #>
+ </div>