editfile.tpl 5.54 KB
Newer Older
1
<tr id="{$prefix}_edit_row"{if !$fileinfo} class="text-regular hidden editrow no-hover"{/if}>
2
    <td colspan="6" class="fileedittablewrap form-condensed">
3
4
5
6
7
8
        <div class="fileedittable">
            <h4 id="{$prefix}_edit_heading" class="edit-heading">
                {if $fileinfo}{if $fileinfo->artefacttype == 'folder'}{str tag=editfolder section=artefact.file}{else}{str tag=editfile section=artefact.file}{/if}{/if}
            </h4>
            <div class="required form-group">
                <label for="{$prefix}_edit_title">{str tag=name}<span class="requiredmarker"> *</span>
9
                </label>
10
                <input type="text" class="text" name="{$prefix}_edit_title" id="{$prefix}_edit_title" value="{$fileinfo->title}"/>
11
            </div>
12
13
14
15
16
17
18
19
            {if $fileinfo->artefacttype != 'profileicon'}
            <div class="form-group">
                <label for="{$prefix}_edit_description">{str tag=description}</label>
                <input type="text" class="text" name="{$prefix}_edit_description" id="{$prefix}_edit_description" value="{$fileinfo->description}" size="40" />
            </div>
            {/if}
            <div class="tags form-group">
                <label for="{$prefix}_edit_tags">{str tag=tags}</label>
20
21
22
23
24
                <select name="{$prefix}_edit_tags[]" id="{$prefix}_edit_tags" class="js-data-ajax" multiple="multiple">
                {foreach from=$fileinfo->tags item=tag name=tags}
                    <option value="{$tag}">{$tag}</option>
                {/foreach}
                </select>
25
                <span>{contextualhelp plugintype='artefact' pluginname='file' section='tags'}</span>
26
                <div class="description">{str tag=tagsdescprofile}</div>
27
            </div>
28
            {if $groupinfo}
29
            <div>
30
31
32
33
34
                <label>{str tag=Permissions}</label>
                <div class="permissions-table">
                    <table class="editpermissions table table-striped">
                        <thead>
                            <th>{str tag=Role section=group}</th>
35
                            {foreach from=$groupinfo.perm item=permname}
36
                            <th>{$permname}</th>
37
                            {/foreach}
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
                        </thead>
                        <tbody>
                            {foreach from=$groupinfo.roles item=role key=r}
                                <tr>
                                    <td>{$role->display}</td>
                                    {foreach from=$groupinfo.perm item=whocares key=permid}
                                    {if $fileinfo}
                                    <td>
                                        <label for="{$prefix}_permission_{$r}_{$permid}">{str tag=changerolepermissions section=group arg1=$permid arg2=$r}</label>
                                        <input type="checkbox" class="permission checkbox" id="{$prefix}_permission_{$r}_{$permid}" name="{$prefix}_permission:{$r}:{$permid}"{if $fileinfo->permissions.$r.$permid} checked{/if}{if $r == 'admin'} disabled{/if} />
                                    </td>
                                    {else}
                                    <td>
                                        <!-- <label for="{$prefix}_permission_{$r}_{$permid}">{str tag=changerolepermissions section=group arg1=$permid arg2=$r}</label> -->
                                        <input type="checkbox" class="permission checkbox" id="{$prefix}_permission_{$r}_{$permid}" name="{$prefix}_permission:{$r}:{$permid}" {if $r == 'admin'} checked disabled{/if}/>
                                    </td>
                                    {/if}
                                    {/foreach}
                                </tr>
57
                            {/foreach}
58
59
                        </tbody>
                    </table>
60
                </div>
61
62
            </div>
          </div>
Naomi Guyer's avatar
Naomi Guyer committed
63
{/if}
64
65
66
67
68
69
70
71
72
        {license_form_files($prefix, 'edit')}
        <div class="form-group">
            <label for="{$prefix}_edit_allowcomments">
                {str tag=Comments section=artefact.comment}
            </label>
            <div class="form-switch">
                <div class="switch onoff" style="width: {$switchwidth}">
                    <input class="switchbox" type="checkbox" name="{$prefix}_edit_allowcomments" id="{$prefix}_edit_allowcomments" {if $fileinfo->allowcomments}checked {/if} aria-describedby />
                    <label class="switch-label" tabindex="1" for="{$prefix}_edit_allowcomments">
73
74
75
76
                        <span class="switch-inner" role="presentation" aria-hidden="true"></span>
                        <span class="switch-indicator" role="presentation" aria-hidden="true"></span>
                        <span class="state-label on" role="presentation" aria-hidden="true" tabindex="-1">{str tag=switchbox.on section=pieforms}</span>
                        <span class="state-label off" role="presentation" aria-hidden="true" tabindex="-1">{str tag=switchbox.off section=pieforms}<span>
77
78
79
                    </label>
                    </div>
                </div>
80
            </div>
81
82
        <div>
        <div class="submitcancel form-group">
83
            <input type="submit" class="submit btn btn-primary" name="{$prefix}_update[{$fileinfo->id}]" id="{$prefix}_edit_artefact" value="{str tag=savechanges section=artefact.file}" />
84
85
86
            <input type="submit" class="cancel" name="{$prefix}_canceledit" id="{$prefix}_edit_cancel" value="{str tag=cancel}" />
        </div>
        <div>
87
            <div id="{$prefix}_edit_messages">
88
            </div>
89
90
        </div>
        </div>
Naomi Guyer's avatar
Naomi Guyer committed
91
    </td>
92
</tr>