mirror of
https://github.com/Mibew/mibew.git
synced 2025-02-08 00:34:42 +03:00
Add screenshots to a styles of invitations
This commit is contained in:
parent
0619cdc9c1
commit
eb062a2424
@ -36,16 +36,6 @@ class InvitationStyle extends AbstractStyle implements StyleInterface
|
|||||||
return 'styles/invitations/' . $this->getName();
|
return 'styles/invitations/' . $this->getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Loads configurations of the style.
|
|
||||||
*
|
|
||||||
* @return array Style configurations
|
|
||||||
*/
|
|
||||||
public function getConfigurations()
|
|
||||||
{
|
|
||||||
return array();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stub for StyleInterface::render method.
|
* Stub for StyleInterface::render method.
|
||||||
*
|
*
|
||||||
|
@ -28,15 +28,26 @@ $style_list = InvitationStyle::getAvailableStyles();
|
|||||||
|
|
||||||
$preview = verify_param("preview", "/^\w+$/", "default");
|
$preview = verify_param("preview", "/^\w+$/", "default");
|
||||||
if (!in_array($preview, $style_list)) {
|
if (!in_array($preview, $style_list)) {
|
||||||
|
$style_names = array_keys($style_list);
|
||||||
$preview = $style_list[0];
|
$preview = $style_list[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$invitation_style = new InvitationStyle($preview);
|
||||||
|
$style_config = $invitation_style->getConfigurations();
|
||||||
|
|
||||||
|
$screenshots = array();
|
||||||
|
foreach ($style_config['screenshots'] as $name => $desc) {
|
||||||
|
$screenshots[] = array(
|
||||||
|
'name' => $name,
|
||||||
|
'file' => (MIBEW_WEB_ROOT . '/' . $invitation_style->getFilesPath()
|
||||||
|
. '/screenshots/' . $name . '.png'),
|
||||||
|
'description' => $desc
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
$page['formpreview'] = $preview;
|
$page['formpreview'] = $preview;
|
||||||
$page['preview'] = $preview;
|
|
||||||
$page['availablePreviews'] = $style_list;
|
$page['availablePreviews'] = $style_list;
|
||||||
$page['operatorName'] = (empty($operator['vclocalname'])
|
$page['screenshotsList'] = $screenshots;
|
||||||
? $operator['vccommonname']
|
|
||||||
: $operator['vclocalname']);
|
|
||||||
$page['title'] = getlocal("page.preview.title");
|
$page['title'] = getlocal("page.preview.title");
|
||||||
$page['menuid'] = "settings";
|
$page['menuid'] = "settings";
|
||||||
|
|
||||||
|
3
src/mibew/styles/invitations/.htaccess
Normal file
3
src/mibew/styles/invitations/.htaccess
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
<FilesMatch "\.ini$">
|
||||||
|
Deny from all
|
||||||
|
</FilesMatch>
|
10
src/mibew/styles/invitations/default/config.ini
Normal file
10
src/mibew/styles/invitations/default/config.ini
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
; This file determines some invitation style options
|
||||||
|
; Comments starts with ';'
|
||||||
|
|
||||||
|
; Screenshots section describe all screenshots shiped with style
|
||||||
|
; Params names should be equals to file names without extension. Pictures
|
||||||
|
; extension should be '.png'
|
||||||
|
; Params values should be equals to screenshot desription
|
||||||
|
[screenshots]
|
||||||
|
invitation = "Appearance of the invitation"
|
||||||
|
location = "Location of the invitation on a page"
|
BIN
src/mibew/styles/invitations/default/screenshots/invitation.png
Normal file
BIN
src/mibew/styles/invitations/default/screenshots/invitation.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
BIN
src/mibew/styles/invitations/default/screenshots/location.png
Normal file
BIN
src/mibew/styles/invitations/default/screenshots/location.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.0 KiB |
@ -1,13 +1,8 @@
|
|||||||
{{#extends "_layout"}}
|
{{#extends "_layout"}}
|
||||||
{{#override "menu"}}{{> _menu}}{{/override}}
|
{{#override "menu"}}{{> _menu}}{{/override}}
|
||||||
|
|
||||||
{{#override "head"}}
|
|
||||||
<link href="{{mibewRoot}}/styles/invitations/{{preview}}/invite.css" rel="stylesheet" type="text/css" />
|
|
||||||
{{/override}}
|
|
||||||
|
|
||||||
{{#override "content"}}
|
{{#override "content"}}
|
||||||
{{l10n "page.preview.intro"}}
|
{{l10n "page.preview.intro"}}
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
@ -32,6 +27,14 @@
|
|||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{{#each screenshotsList}}
|
||||||
|
<div class="field">
|
||||||
|
<div class="flabel">{{description}}</div>
|
||||||
|
<div class="fvalueframe">
|
||||||
|
<img class="screenshot" alt="{{name}}" src="{{file}}" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{/each}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -41,17 +44,5 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<div id="mibewinvitation">
|
|
||||||
<div id="mibewinvitationpopup">
|
|
||||||
<div id="mibewinvitationclose">
|
|
||||||
<a onclick="void(0);" href="javascript:void(0);">×</a>
|
|
||||||
</div>
|
|
||||||
<h1 onclick="void(0);">{{operatorName}}</h1>
|
|
||||||
<div id="mibewinvitationframe">{{l10n "invitation.message"}}</div>
|
|
||||||
<div id="mibewinvitationaccept" onclick="void(0);">{{l10n "invitation.accept.caption"}}</div>
|
|
||||||
<div style="clear: both;"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{{/override}}
|
{{/override}}
|
||||||
{{/extends}}
|
{{/extends}}
|
Loading…
Reference in New Issue
Block a user