1 | {combine_css path=$HEADER_MANAGER_PATH|@cat:"admin/template/style.css"} |
---|
2 | |
---|
3 | <div class="titrePage"> |
---|
4 | <h2>Header Manager</h2> |
---|
5 | </div> |
---|
6 | |
---|
7 | {if $IN_CROP} |
---|
8 | {combine_css path="themes/default/js/plugins/jquery.Jcrop.css"} |
---|
9 | {combine_script id='jquery.jcrop' load='footer' require='jquery' path='themes/default/js/plugins/jquery.Jcrop.min.js'} |
---|
10 | |
---|
11 | {footer_script require="jquery"} |
---|
12 | var jcrop_api; |
---|
13 | |
---|
14 | jQuery("#jcrop").Jcrop({ldelim} |
---|
15 | boxWidth: {$crop.display_width}, |
---|
16 | boxHeight: {$crop.display_height}, |
---|
17 | setSelect: [{$crop.l}, {$crop.t}, {$crop.r}, {$crop.b}], |
---|
18 | onChange: jOnChange, |
---|
19 | onRelease: jOnRelease |
---|
20 | }, |
---|
21 | function(){ldelim} |
---|
22 | jcrop_api = this; |
---|
23 | }); |
---|
24 | |
---|
25 | function jOnChange(sel) {ldelim} |
---|
26 | jQuery("input[name='x']").val(sel.x); |
---|
27 | jQuery("input[name='y']").val(sel.y); |
---|
28 | jQuery("input[name='x2']").val(sel.x2); |
---|
29 | jQuery("input[name='y2']").val(sel.y2); |
---|
30 | |
---|
31 | jQuery("#width").html(sel.x2-sel.x); |
---|
32 | jQuery("#height").html(sel.y2-sel.y); |
---|
33 | } |
---|
34 | |
---|
35 | function jOnRelease() {ldelim} |
---|
36 | jcrop_api.setSelect([{$crop.l}, {$crop.t}, {$crop.r}, {$crop.b}]); |
---|
37 | } |
---|
38 | {/footer_script} |
---|
39 | |
---|
40 | <form method="post" action=""> |
---|
41 | <fieldset> |
---|
42 | <legend>{'Crop banner image'|@translate}</legend> |
---|
43 | {'Choose the part of the image you want to use as your header.'|@translate}<br> |
---|
44 | |
---|
45 | <img id="jcrop" src="{$picture.banner_src}" width="{$crop.display_width}" height="{$crop.display_height}"> |
---|
46 | |
---|
47 | <ul> |
---|
48 | <li><b>{'Width'|@translate}:</b> <span id="width"></span>px</li> |
---|
49 | <li><b>{'Height'|@translate}:</b> <span id="height"></span>px</li> |
---|
50 | </ul> |
---|
51 | |
---|
52 | <input type="hidden" name="x"> |
---|
53 | <input type="hidden" name="y"> |
---|
54 | <input type="hidden" name="x2"> |
---|
55 | <input type="hidden" name="y2"> |
---|
56 | <input type="hidden" name="picture_file" value="{$picture.filename}"> |
---|
57 | |
---|
58 | <input type="submit" name="submit_crop" value="{'Submit'|@translate}"> |
---|
59 | <input type="submit" name="cancel_crop" value="{'Cancel'|@translate}"> |
---|
60 | </fieldset> |
---|
61 | </form> |
---|
62 | |
---|
63 | {else} |
---|
64 | {footer_script require="jquery"} |
---|
65 | jQuery(".showInfo").tipTip({ldelim} |
---|
66 | delay: 0, |
---|
67 | fadeIn: 200, |
---|
68 | fadeOut: 200, |
---|
69 | maxWidth: '300px', |
---|
70 | }); |
---|
71 | {/footer_script} |
---|
72 | |
---|
73 | <form method="post" action="" ENCTYPE="multipart/form-data"> |
---|
74 | <fieldset> |
---|
75 | <legend>{'Default banner size'|@translate}</legend> |
---|
76 | |
---|
77 | <label> |
---|
78 | {'Width'|@translate}: |
---|
79 | <input type="text" name="width" size="4" value="{$BANNER_WIDTH}">px |
---|
80 | </label> |
---|
81 | <br> |
---|
82 | <br> |
---|
83 | <label> |
---|
84 | {'Height'|@translate}: |
---|
85 | <input type="text" name="height" size="4" value="{$BANNER_HEIGHT}">px |
---|
86 | </label> |
---|
87 | <br> |
---|
88 | <br> |
---|
89 | <i>{'For MontBlancXL and BlancMontXL, advised size is 900×190.'|@translate}</i> |
---|
90 | </fieldset> |
---|
91 | |
---|
92 | <fieldset> |
---|
93 | <legend>{'Select an image'|@translate}</legend> |
---|
94 | {'You can upload a custom header image or select one from your gallery. On the next screen you will be able to crop the image.'|@translate} |
---|
95 | <br><br> |
---|
96 | |
---|
97 | <b>{'Choose an image from your computer'|@translate}</b> |
---|
98 | <blockquote> |
---|
99 | {'Maximum file size: %sB.'|@translate|@sprintf:$upload_max_filesize_shorthand} {'Allowed file types: %s.'|@translate|@sprintf:'jpg, png, gif'}<br> |
---|
100 | <input type="file" name="new_image"> |
---|
101 | <input type="hidden" name="MAX_FILE_SIZE" value="{$upload_max_filesize}"> |
---|
102 | <input type="submit" name="upload_new_image" value="{'Upload'|@translate}" class="submit"> |
---|
103 | </blockquote> |
---|
104 | |
---|
105 | <b>{'or choose a picture from the gallery'|@translate}</b> |
---|
106 | <blockquote> |
---|
107 | {'Picture id.'|@translate} <a class="showInfo" title="{'The numeric identifier can be found on the picture edition page, near the thumbnail.'|@translate}">i</a> |
---|
108 | <input type="text" name="picture_id" size="5"> |
---|
109 | <input type="submit" name="upload_gallery_image" value="{'Use'|@translate}" class="submit"> |
---|
110 | </blockquote> |
---|
111 | </fieldset> |
---|
112 | </form> |
---|
113 | |
---|
114 | {/if} |
---|