]> git.agnieray.net Git - galette.git/blob - galette/templates/default/plugin_initdb.tpl
b3b7247528ceb0186feedd1bde3fc5bb9adecf99
[galette.git] / galette / templates / default / plugin_initdb.tpl
1 {if $mode eq 'ajax'}
2 {assign var="extend" value='ajax.tpl'}
3 {else}
4 {assign var="extend" value='page.tpl'}
5 {/if}
6 {extends file=$extend}
7 {block name="content"}
8 <section id="plugin_install">
9 <header>
10 <h1>{_T string="%plugin plugin installation" pattern="/%plugin/" replace=$plugin.name}</h1>
11 </header>
12 <div>
13 <form action="{path_for name="pluginInitDb" data=["id" => $plugid]}" id="plugins_initdb_form" method="post">
14 <h2>{$page_title}</h2>
15 {if $mode eq 'ajax'}
16 {include file="global_messages.tpl"}
17 {/if}
18
19
20
21 {if $step == 1}
22 <div id="installation_mode">
23 <article id="mode_new" class="installation_mode">
24 <h3>
25 <input type="radio" name="install_type" value="{Galette\Core\PluginInstall::INSTALL}" checked="checked" id="install"/>
26 <label for="install">{_T string="New installation"}</label>
27 </h3>
28 <ul>
29 <li>{_T string="you're installing %name for the first time" pattern="/%name/" replace=$plugin.name},</li>
30 <li>{_T string="you wish to erase an older version of of %name without keeping your data" pattern="/%name/" replace=$plugin.name}.</li>
31 </ul>
32 </article>
33 {if isset($update_scripts) and $update_scripts|@count > 0}
34 <article id="mode_update" class="installation_mode">
35 <h3>
36 <input type="radio" name="install_type" value="{Galette\Core\PluginInstall::UPDATE}" id="update"/>
37 <label for="update">{_T string="Update"}</label>
38 </h3>
39 <ul>
40 <li>{_T string="you already have installed %name, and you want to upgrade to the latest version" pattern="/%name/" replace=$plugin.name}.</li>
41 </ul>
42 <p id="warningbox">{_T string="Warning: Don't forget to backup your current database."}</span>
43 </article>
44 {/if}
45 </div>
46 {/if}
47 {if $step == 'i2' || $step == 'u2'}
48 {$results}
49 {/if}
50 {if $step == 'u3'}
51 <fieldset class="cssform">
52 <legend class="ui-state-active ui-corner-top">{_T string="You current %name version is..." pattern="/%name/" replace=$plugin.name}</legend>
53 <ul class="leaders">
54 {assign var=last value=0.00}
55 {foreach from=$update_scripts key=k item=val}
56 <li>
57 <span>
58 <label for="upgrade-{$val}">
59
60 {if $last eq 0.00}
61 {_T string="older than %version" pattern="/%version/" replace=$val}
62 {elseif $last != $val}
63 {_T string="comprised between"} {$last} {_T string="and"} {$val}
64 {else}
65 {$val}
66 {/if}
67 {assign var=last value=$val}
68 </label>
69 </span>
70 <span>
71 <input type="radio" name="previous_version" value="{$val}" id="upgrade-{$val}" required/>
72 </span>
73 </li>
74 {/foreach}
75 </ul>
76 </fieldset>
77 {/if}
78 {if $step == 'i4' || $step == 'u4'}
79 <p>{_T string="(Errors on DROP and RENAME operations can be ignored)"}</p>
80 {if $error_detected|@count > 0}
81 <p id="errorbox">
82 {if $step == 'i3'}
83 {_T string="The tables are not totally created, it may be a permission problem."}
84 {else}
85 {_T string="The tables have not been totally created, it may be a permission problem."}
86 <br/>
87 {_T string="Your database is maybe not usable, try to restore the older version."}
88 {/if}
89 </p>
90 {/if}
91 {/if}
92 {if $step == 'i5' || $step =='u5'}
93 <p>
94 {if $step == 'i5'}
95 {_T string="Plugin '%name' has been successfully installed!" pattern="/%name/" replace=$plugin.name}
96 {else}
97 {_T string="Plugin '%name' has been successfully updated!" pattern="/%name/" replace=$plugin.name}
98 {/if}
99 </p>
100 {/if}
101 {if $istep < 5}
102 <p id="btn_box">
103 <input type="hidden" name="plugid" value="{$plugid}"/>
104 {if $istep > 1 && isset($install_type)}
105 <input type="hidden" name="install_type" value="{$install_type}"/>
106 {/if}
107 {if $error_detected|@count == 0 && $istep >= 2 || $istep > 2}
108 <input type="hidden" name="install_dbperms_ok" value="1"/>
109 {/if}
110 {if $error_detected|@count == 0 && $istep >= 4 || $istep > 4}
111 <input type="hidden" name="install_dbwrite_ok" value="1"/>
112 {/if}
113 {if $error_detected|@count > 0}
114 <input type="submit" value="{_T string="Retry"}"/>
115 {else}
116 <input id="next" type="submit" value="{_T string="Next step"}"/>
117 {/if}
118 {else}
119 {if $mode eq 'ajax'}
120 <a href="#" class="button" id="btnback">{_T string="Close"}</a>
121 {else}
122 <a href="{path_for name="plugins"}" class="button" id="btnback">{_T string="Back to plugins managment page"}</a>
123 {/if}
124 {/if}
125 </p>
126 </form>
127 </div>
128 <footer>
129 <p>{_T string="Steps:"}</p>
130 <ol>
131 <li{if $step == 1} class="current"{/if}>{_T string="Installation mode"} - </li>
132 <li{if $step == 'i2' || $step == 'u2'} class="current"{/if}>{_T string="Access permissions to database"} - </li>
133 {if isset($install_type) and $install_type == 'upgrade'}
134 <li{if $step == 'u3'} class="current"{/if}>{_T string="Version selection"} - </li>
135 </li>
136 {/if}
137 <li{if $step == 'i4' || $step == 'u4'} class="current"{/if}>{if !isset($install_type) or $install_type == 'install'}{_T string="Database installation"}{else}{_T string="Database upgrade"}{/if} - </li>
138 <li{if $step == 'i5' || $step == 'u5'} class="current"{/if}>{_T string="End!"}</li>
139 </ol>
140 </footer>
141 </section>
142 {/block}