editfile.tpl 5.77 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
        <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>
7
            <div class="form-group requiredmarkerdesc">{str tag='requiredfields' section='pieforms' arg1='*'}</div>
8
9
            <div class="required form-group">
                <label for="{$prefix}_edit_title">{str tag=name}<span class="requiredmarker"> *</span>
10
                </label>
11
                <input type="text" class="text" name="{$prefix}_edit_title" id="{$prefix}_edit_title" value="{$fileinfo->title}"/>
12
            </div>
13
14
15
16
17
18
19
20
            {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>
21
22
23
24
25
                <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>
26
                <span>{contextualhelp plugintype='artefact' pluginname='file' section='tags'}</span>
27
                <div class="description">{str tag=tagsdescprofile}</div>
28
            </div>
29
            {if $groupinfo}
30
            <div>
31
32
33
34
35
                <label>{str tag=Permissions}</label>
                <div class="permissions-table">
                    <table class="editpermissions table table-striped">
                        <thead>
                            <th>{str tag=Role section=group}</th>
36
                            {foreach from=$groupinfo.perm item=permname}
37
                            <th>{$permname}</th>
38
                            {/foreach}
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
                        </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>
58
                            {/foreach}
59
60
                        </tbody>
                    </table>
61
                </div>
62
63
            </div>
          </div>
Naomi Guyer's avatar
Naomi Guyer committed
64
{/if}
65
66
67
68
69
70
71
72
73
        {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">
74
75
76
77
                        <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>
78
79
80
                    </label>
                    </div>
                </div>
81
                <script type="application/javascript">Switchbox.computeWidth("{$prefix}_edit_allowcomments");</script>
82
            </div>
83
84
        <div>
        <div class="submitcancel form-group">
85
            <input type="submit" class="submit btn btn-primary" name="{$prefix}_update[{$fileinfo->id}]" id="{$prefix}_edit_artefact" value="{str tag=savechanges section=artefact.file}" />
86
87
88
            <input type="submit" class="cancel" name="{$prefix}_canceledit" id="{$prefix}_edit_cancel" value="{str tag=cancel}" />
        </div>
        <div>
89
            <div id="{$prefix}_edit_messages">
90
            </div>
91
92
        </div>
        </div>
Naomi Guyer's avatar
Naomi Guyer committed
93
    </td>
94
</tr>