PageRenderTime 19ms CodeModel.GetById 15ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/modules/mod_admin/templates/_action_dialog_zmedia_choose.tpl

http://github.com/zotonic/zotonic
Smarty Template | 60 lines | 51 code | 9 blank | 0 comment | 1 complexity | f6ddaa3818d4662e45a7153a93cfed0b MD5 | raw file
 1{% tabs id=#tabs %}
 2<div class="tabbable">
 3    <ul class="nav nav-pills">
 4	<li class="active"><a data-toggle="tab" href="#{{ #tab }}-media">{_ Media on this page _}</a></li>
 5	<li><a data-toggle="tab" href="#{{ #tab }}-search">{_ Search other media _}</a></li>
 6    </ul>
 7
 8    <div class="tab-content">
 9        <div class="tab-pane active" id="{{ #tab }}-media">
10	    <p>{_ Choose a media item from this page to insert in the body text._}</p>
11
12	    {% with m.rsc[id].o.depiction as ids %}
13	    {% include "_choose_media.tpl" %}
14	    {% endwith %}
15
16            <div class="modal-footer">
17                {% button
18                    class="btn btn-primary"
19                    text=_"Add a new media item" 
20                    action={dialog_media_upload subject_id=id stay
21                    action={postback 
22                        postback={zmedia_choose} 
23                        delegate="action_admin_zmedia_choose"}
24                        action={postback
25                            postback={reload_media rsc_id=id div_id=media_div_id}
26                            delegate="controller_admin_edit"
27                        }
28                    }
29                %}
30            </div>
31
32        </div>
33
34        <div class="tab-pane" id="{{ #tab }}-search">
35	    <div class="form-group">
36
37                <label for="{{#input}}" class="control-label">{_ Use the autocompleter to search the media in this site. _}</label>
38                <div>
39                    <input id="{{#input}}" class="autocompleter do_autofocus col-lg-8 col-md-8 form-control" type="text" value="" />
40                    <ul id="{{#suggestions}}" class="suggestions-list"></ul>
41                </div>
42            </div>
43
44            {% wire id=#input
45                type="keyup" 
46                action={typeselect
47                target=#suggestions 
48                action_with_id={with_args action={link subject_id=subject_id predicate="depiction" element_id=element_id} arg={object_id select_id}
49                }
50	        action={postback postback={reload_media rsc_id=id div_id=media_div_id} delegate="controller_admin_edit"}
51                action_with_id={with_args action={zmedia_has_chosen} arg={id select_id}}
52                action={dialog_close}
53
54                cat=m.predicate.object_category["depiction"]
55	        }
56            %}
57                
58	</div>	
59    </div>
60</div>