Commit 8e1c6b4d authored by lindonb's avatar lindonb

[FIX] file gallery bootstrapification: clean up alignment, consistency, and...

[FIX] file gallery bootstrapification: clean up alignment, consistency, and use of bootstrap form control classes of some file gallery forms.
parent d65c56a6
......@@ -11,7 +11,7 @@
{tabset name="list_file_gallery"}
{tab name="{tr}Properties{/tr}"}
<h2>{tr}Properties{/tr}</h2>
<h2>{tr}Properties{/tr}</h2><br>
<div class="form-group">
<label for="name" class="col-sm-4 control-label">{tr}Name{/tr}</label>
<div class="col-sm-8">
......@@ -30,7 +30,7 @@
<div class="form-group">
<label for="fgal_template" class="col-sm-4 control-label">{tr}Template{/tr}</label>
<div class="col-sm-8">
<select name="fgal_template" id="fgal_template">
<select name="fgal_template" id="fgal_template" class="form-control">
<option value=""{if !isset($templateId) or $templateId eq ""} selected="selected"{/if}>{tr}None{/tr}</option>
{foreach from=$all_templates key=key item=item}
<option value="{$item.id}"{if $gal_info.template eq $item.id} selected="selected"{/if}>{$item.label|escape}</option>
......@@ -69,7 +69,7 @@ if ($(this).val() != '') {
{/if}
<input type="hidden" name="fgal_type" value="{$gal_info.type}">
{else}
<select name="fgal_type" id="fgal_type">
<select name="fgal_type" id="fgal_type" class="form-control">
<option value="default" {if $gal_info.type eq 'default'}selected="selected"{/if}>{tr}Any file{/tr}</option>
<option value="podcast" {if $gal_info.type eq 'podcast'}selected="selected"{/if}>{tr}Podcast (audio){/tr}</option>
<option value="vidcast" {if $gal_info.type eq 'vidcast'}selected="selected"{/if}>{tr}Podcast (video){/tr}</option>
......@@ -86,37 +86,29 @@ if ($(this).val() != '') {
</div>
</div>
<div class="form-group">
<label for="visible" class="col-sm-4 control-label">{tr}Gallery is visible to non-admin users{/tr}.</label>
<label for="visible" class="col-sm-4 control-label">{tr}Gallery is visible to non-admin users{/tr}</label>
<div class="col-sm-8">
<div class="checkbox">
<input type="checkbox" id="visible" name="visible" {if $gal_info.visible eq 'y'}checked="checked"{/if}>
</div>
<input type="checkbox" id="visible" name="visible" {if $gal_info.visible eq 'y'}checked="checked"{/if}>
</div>
</div>
<div class="form-group">
<label for="public" class="col-sm-4 control-label">{tr}Gallery is unlocked{/tr}.</label>
<label for="public" class="col-sm-4 control-label">{tr}Gallery is unlocked{/tr}</label>
<div class="col-sm-8">
<div class="checkbox">
<input type="checkbox" id="public" name="public" {if isset($gal_info.public) and $gal_info.public eq 'y'}checked="checked"{/if}>
</div>
<span class="help-block">{tr}Unless this option is checked the Gallery is locked and only the owner can upload - if it is checked other users with upload permission can add files to the gallery{/tr}.</span>
<input type="checkbox" id="public" name="public" {if isset($gal_info.public) and $gal_info.public eq 'y'}checked="checked"{/if}>
<span class="help-block">{tr}Users with upload permission can add files to the gallery (not just the gallery owner){/tr}</span>
</div>
</div>
{if $tiki_p_admin_file_galleries eq 'y' or $gal_info.type neq 'user'}
<div class="form-group">
<label for="backlinkPerms" class="col-sm-4 control-label">{tr}Perms of the backlinks are checked to view a file{/tr}</label>
<label for="backlinkPerms" class="col-sm-4 control-label">{tr}Respect permissions for backlinks to view a file{/tr}</label>
<div class="col-sm-8">
<div class="checkbox">
<input type="checkbox" id="backlinkPerms" name="backlinkPerms" {if $gal_info.backlinkPerms eq 'y'}checked="checked"{/if}>
</div>
<input type="checkbox" id="backlinkPerms" name="backlinkPerms" {if $gal_info.backlinkPerms eq 'y'}checked="checked"{/if}>
</div>
</div>
<div class="form-group">
<label for="lockable" class="col-sm-4 control-label">{tr}Files can be locked at download{/tr}.</label>
<div class="col-sm-8">
<div class="checkbox">
<input type="checkbox" id="lockable" name="lockable" {if $gal_info.lockable eq 'y'}checked="checked"{/if}>
</div>
<input type="checkbox" id="lockable" name="lockable" {if $gal_info.lockable eq 'y'}checked="checked"{/if}>
</div>
</div>
<div class="form-group">
......@@ -131,7 +123,7 @@ if ($(this).val() != '') {
<div class="form-group">
<label for="parentId" class="col-sm-4 control-label">{tr}Parent gallery{/tr}</label>
<div class="col-sm-8">
<select name="parentId" id="parentId">
<select name="parentId" id="parentId" class="form-control">
<option value="{$treeRootId}"{if $parentId eq $treeRootId} selected="selected"{/if}>{tr}none{/tr}</option>
{foreach from=$all_galleries key=key item=item}
{if $galleryId neq $item.id}
......@@ -224,12 +216,13 @@ if ($(this).val() != '') {
</div>
</div>
{include file='categorize.tpl'}
{include file='categorize.tpl' labelcol='4' inputcol='8'}
{/tab}
<!-- display properties -->
{tab name="{tr}Display Properties{/tr}"}
{tab name="{tr}Display Settings{/tr}"}
<h2>{tr}Display Settings{/tr}</h2><br>
<div class="form-group">
<label for="sortorder" class="col-sm-4 text-right">{tr}Default sort order{/tr}</label>
<div class="col-sm-8">
......@@ -264,9 +257,18 @@ if ($(this).val() != '') {
</div>
{/tab}
{/tabset}
<div class="form-group text-center">
<input type="submit" class="btn btn-primary" value="{tr}Save{/tr}" name="edit">
<input type="checkbox" name="viewitem" checked="checked"> {tr}View inserted gallery{/tr}
<div class="form-group">
<label for="viewitem" class="col-sm-4 control-label">
{tr}View inserted gallery after save{/tr}
</label>
<div class="col-sm-8">
<input type="checkbox" name="viewitem" checked="checked">
</div>
</div>
<div class="form-group">
<div class="col-md-8 col-md-offset-4">
<input type="submit" class="btn btn-primary" value="{tr}Save{/tr}" name="edit">
</div>
</div>
</form>
{/if}
......@@ -4,38 +4,77 @@
{foreach key=key item=item from=$fgal_options}
{if $key eq 'default_view'}
<div class="form-group">
<label class="col-sm-4 control-label" for="fgal_{$key}">{$item.name}:</label>
<label class="col-sm-4 control-label" for="fgal_{$key}">
{$item.name}
</label>
<div class="col-sm-8">
<select id="fgal_{$key}" name="fgal_{$key}" class="form-control">
<option value="list"{if $item.value eq 'list'} selected="selected"{/if}>{tr}List{/tr}</option>
<option value="browse"{if $item.value eq 'browse'} selected="selected"{/if}>{tr}Browse{/tr}</option>
<option value="page"{if $item.value eq 'page'} selected="selected"{/if}>{tr}Page{/tr}</option>
<option value="list"{if $item.value eq 'list'} selected="selected"{/if}>
{tr}List{/tr}
</option>
<option value="browse"{if $item.value eq 'browse'} selected="selected"{/if}>
{tr}Browse{/tr}
</option>
<option value="page"{if $item.value eq 'page'} selected="selected"{/if}>
{tr}Page{/tr}
</option>
{if $prefs.fgal_elfinder_feature eq 'y'}
<option value="finder"{if $item.value eq 'finder'} selected="selected"{/if}>{tr}Finder View{/tr}</option>
<option value="finder"{if $item.value eq 'finder'} selected="selected"{/if}>
{tr}Finder View{/tr}
</option>
{/if}
</select>
</div>
</div>
{elseif $key eq 'icon_fileId'}
<div class="form-group">
<label class="col-sm-4 control-label" for="fgal_{$key}">{$item.name}:</label>
<label class="col-sm-4 control-label" for="fgal_{$key}">
{$item.name}
</label>
<div class="col-sm-8">
<input type="text" id="fgal_{$key}" name="fgal_{$key}" value="{$item.value}" class="form-control" placeholder="{tr}File{/tr}...">
<span class="help-block">{tr}Enter the ID of any file in any gallery to be used as the icon for this gallery in browse view{/tr}</span>
<input
type="text"
id="fgal_{$key}"
name="fgal_{$key}"
value="{$item.value}"
class="form-control"
placeholder="{tr}File{/tr}..."
>
<span class="help-block">
{tr}Enter the ID of any file in any gallery to be used as the icon for this gallery in browse view{/tr}
</span>
</div>
</div>
{else}
<div class="checkbox col-sm-8 col-sm-offset-4">
<label for="fgal_{$key}{if isset($fgal_ext)}{$fgal_ext}{/if}">
{assign var='pref_name' value="fgal_$key"}
<input type="checkbox" id="fgal_{$key}" name="fgal_{$key}" {if $item.value eq 'y'}checked="checked"{/if}{if isset($edit_mode) and $edit_mode eq 'y' and $prefs.$pref_name neq 'y'} disabled="disabled"{/if}>
<input
type="checkbox"
id="fgal_{$key}"
name="fgal_{$key}"
{if $item.value eq 'y'}
checked="checked"
{/if}
{if isset($edit_mode) and $edit_mode eq 'y' and $prefs.$pref_name neq 'y'}
disabled="disabled"
{/if}
>
{$item.name}
{if isset($edit_mode) and $edit_mode eq 'y' and $prefs.$pref_name neq 'y'}
<span class="help-block">{tr}The checkbox is disabled because this preference is disabled globally.{/tr}</span>
<span class="help-block">
{tr}The checkbox is disabled because this preference is disabled globally.{/tr}
</span>
{if $tiki_p_admin eq 'y' or $tiki_p_admin_file_galleries eq 'y'}
<span class="help-block"><a href="tiki-admin.php?page=fgal">{tr}Please enable the preference globally first.{/tr}</a></span>
<span class="help-block">
<a href="tiki-admin.php?page=fgal">
{tr}Please enable the preference globally first.{/tr}
</a>
</span>
{else}
<span class="help-block">{tr}Site administrators can enable the preference.{/tr}</span>
<span class="help-block">
{tr}Site administrators can enable the preference.{/tr}
</span>
{/if}
{/if}
</label>
......@@ -47,25 +86,47 @@
{if is_array($fgal_listing_conf) and count($fgal_listing_conf) gt 0}
{foreach key=key item=item from=$fgal_listing_conf}
<div class="form-group">
<label class="col-sm-4 control-label" for="fgal_list_{$key}">{$item.name}:</label>
<label class="col-sm-4 control-label" for="fgal_list_{$key}">
{$item.name}
</label>
<div class="col-sm-8">
<select id="fgal_list_{$key}" name="fgal_list_{$key}" class="form-control">
{if $key eq 'name' or $key eq 'name_admin'}
<option value="a"{if isset($item.value) and $item.value eq 'a'} selected="selected"{/if}>{tr}Name-filename{/tr}</option>
<option value="n"{if isset($item.value) and $item.value eq 'n'} selected="selected"{/if}>{tr}Name{/tr}</option>
<option value="f"{if isset($item.value) and $item.value eq 'f'} selected="selected"{/if}>{tr}Filename only{/tr}</option>
<option value="a"{if isset($item.value) and $item.value eq 'a'} selected="selected"{/if}>
{tr}Name-filename{/tr}
</option>
<option value="n"{if isset($item.value) and $item.value eq 'n'} selected="selected"{/if}>
{tr}Name{/tr}
</option>
<option value="f"{if isset($item.value) and $item.value eq 'f'} selected="selected"{/if}>
{tr}Filename only{/tr}
</option>
{elseif $key neq 'deleteAfter'}
<option value='n'{if isset($item.value) and $item.value eq 'n'} selected="selected"{/if}>{tr}Hide{/tr}</option>
<option value='y'{if isset($item.value) and $item.value eq 'y'} selected="selected"{/if}>{tr}Show as a column{/tr}</option>
<option value='o'{if isset($item.value) and $item.value eq 'o'} selected="selected"{/if}>{tr}Show in popup box{/tr}</option>
<option value='a'{if isset($item.value) and $item.value eq 'a'} selected="selected"{/if}>{tr}Both{/tr}</option>
<option value='n'{if isset($item.value) and $item.value eq 'n'} selected="selected"{/if}>
{tr}Hide{/tr}
</option>
<option value='y'{if isset($item.value) and $item.value eq 'y'} selected="selected"{/if}>
{tr}Show as a column{/tr}
</option>
<option value='o'{if isset($item.value) and $item.value eq 'o'} selected="selected"{/if}>
{tr}Show in popup box{/tr}
</option>
<option value='a'{if isset($item.value) and $item.value eq 'a'} selected="selected"{/if}>
{tr}Both{/tr}
</option>
{/if}
{if $key eq 'lockedby' or $key eq 'lockedby_admin'}
<option value='i'{if isset($item.value) and $item.value eq 'i'} selected="selected"{/if}>{tr}Show an icon in a column{/tr}</option>
<option value='i'{if isset($item.value) and $item.value eq 'i'} selected="selected"{/if}>
{tr}Show an icon in a column{/tr}
</option>
{/if}
{if $key eq 'deleteAfter'}
<option value='n'{if isset($item.value) and $item.value eq 'n'} selected="selected"{/if}>{tr}Hide{/tr}</option>
<option value='y'{if isset($item.value) and $item.value eq 'y'} selected="selected"{/if}>{tr}Show as a column{/tr}</option>
<option value='n'{if isset($item.value) and $item.value eq 'n'} selected="selected"{/if}>
{tr}Hide{/tr}
</option>
<option value='y'{if isset($item.value) and $item.value eq 'y'} selected="selected"{/if}>
{tr}Show as a column{/tr}
</option>
{/if}
</select>
</div>
......
......@@ -218,7 +218,7 @@ $("#viewSwitcher").change(function() {
{/if}
{if $edit_mode eq 'y'}
{include file='edit_file_gallery.tpl'}
<br>{include file='edit_file_gallery.tpl'}
{elseif $dup_mode eq 'y'}
{include file='duplicate_file_gallery.tpl'}
{else}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment