1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/freshrss_ynh.git synced 2024-09-03 18:36:33 +02:00
freshrss_ynh/sources/app/views/configure/sharing.phtml

65 lines
3.7 KiB
PHTML
Raw Normal View History

2015-02-08 18:55:48 +01:00
<?php $this->partial('aside_configure'); ?>
2014-07-23 15:52:50 +02:00
<div class="post">
2015-02-08 18:55:48 +01:00
<a href="<?php echo _url('index', 'index'); ?>"><?php echo _t('gen.action.back_to_rss_feeds'); ?></a>
2014-07-23 15:52:50 +02:00
2015-02-08 18:55:48 +01:00
<form method="post" action="<?php echo _url('configure', 'sharing'); ?>"
data-simple='<div class="form-group" id="group-share-##key##"><label class="group-name">##label##</label><div class="group-controls"><a href="#" class="remove btn btn-attention" data-remove="group-share-##key##"><?php echo _i('close'); ?></a>
2014-07-23 15:52:50 +02:00
<input type="hidden" id="share_##key##_type" name="share[##key##][type]" value="##type##" /></div></div>'
data-advanced='<div class="form-group" id="group-share-##key##"><label class="group-name">##label##</label><div class="group-controls">
<input type="hidden" id="share_##key##_type" name="share[##key##][type]" value="##type##" />
<div class="stick">
2015-02-08 18:55:48 +01:00
<input type="text" id="share_##key##_name" name="share[##key##][name]" class="extend" value="" placeholder="<?php echo _t('conf.sharing.share_name'); ?>" size="64" />
<input type="url" id="share_##key##_url" name="share[##key##][url]" class="extend" value="" placeholder="<?php echo _t('conf.sharing.share_url'); ?>" size="64" />
<a href="#" class="remove btn btn-attention" data-remove="group-share-##key##"><?php echo _i('close'); ?></a></div>
<a target="_blank" class="btn" title="<?php echo _t('conf.sharing.more_information'); ?>" href="##help##"><?php echo _i('help'); ?></a>
2014-07-23 15:52:50 +02:00
</div></div>'>
2015-02-08 18:55:48 +01:00
<legend><?php echo _t('conf.sharing'); ?></legend>
<?php
foreach (FreshRSS_Context::$user_conf->sharing as $key => $share_options) {
$share = FreshRSS_Share::get($share_options['type']);
$share->update($share_options);
?>
<div class="form-group group-share" id="group-share-<?php echo $key; ?>">
2014-07-23 15:52:50 +02:00
<label class="group-name">
2015-02-08 18:55:48 +01:00
<?php echo $share->name(true); ?>
2014-07-23 15:52:50 +02:00
</label>
<div class="group-controls">
2015-02-08 18:55:48 +01:00
<input type='hidden' id='share_<?php echo $key; ?>_type' name="share[<?php echo $key; ?>][type]" value='<?php echo $share->type(); ?>' />
<?php if ($share->formType() === 'advanced') { ?>
2014-07-23 15:52:50 +02:00
<div class="stick">
2015-02-08 18:55:48 +01:00
<input type="text" id="share_<?php echo $key; ?>_name" name="share[<?php echo $key; ?>][name]" class="extend" value="<?php echo $share->name(); ?>" placeholder="<?php echo _t('conf.sharing.share_name'); ?>" size="64" />
<input type="url" id="share_<?php echo $key; ?>_url" name="share[<?php echo $key; ?>][url]" class="extend" value="<?php echo $share->baseUrl(); ?>" placeholder="<?php echo _t('conf.sharing.share_url'); ?>" size="64" />
<a href='#' class='remove btn btn-attention' data-remove="group-share-<?php echo $key; ?>"><?php echo _i('close'); ?></a>
2014-07-23 15:52:50 +02:00
</div>
2015-02-08 18:55:48 +01:00
<a target="_blank" class="btn" title="<?php echo _t('conf.sharing.more_information'); ?>" href="<?php echo $share->help(); ?>"><?php echo _i('help'); ?></a>
2014-07-23 15:52:50 +02:00
<?php } else { ?>
2015-02-08 18:55:48 +01:00
<a href='#' class='remove btn btn-attention' data-remove="group-share-<?php echo $key; ?>"><?php echo _i('close'); ?></a>
2014-07-23 15:52:50 +02:00
<?php } ?>
</div>
</div>
2015-02-08 18:55:48 +01:00
<?php } ?>
2014-07-23 15:52:50 +02:00
<div class="form-group">
<div class="group-controls">
<select>
2015-02-08 18:55:48 +01:00
<?php foreach (FreshRSS_Share::enum() as $share) { ?>
<option value='<?php echo $share->type(); ?>' data-form='<?php echo $share->formType(); ?>' data-help='<?php echo $share->help(); ?>'>
<?php echo $share->name(true); ?>
</option>
<?php } ?>
2014-07-23 15:52:50 +02:00
</select>
2015-02-08 18:55:48 +01:00
<a href='#' class='share add btn'><?php echo _i('add'); ?></a>
2014-07-23 15:52:50 +02:00
</div>
</div>
<div class="form-group form-actions">
<div class="group-controls">
2015-02-08 18:55:48 +01:00
<button type="submit" class="btn btn-important"><?php echo _t('gen.action.submit'); ?></button>
<button type="reset" class="btn"><?php echo _t('gen.action.cancel'); ?></button>
2014-07-23 15:52:50 +02:00
</div>
</div>
</form>
</div>