aboutsummaryrefslogtreecommitdiff
path: root/app/views/importExport/index.phtml
blob: a64524bf19598f92b2576b8c3c3d33a3fd21a6a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<?php $this->partial('aside_subscription'); ?>

<div class="post ">
	<a href="<?php echo _url('index', 'index'); ?>"><?php echo _t('gen.action.back_to_rss_feeds'); ?></a>

	<form method="post" action="<?php echo _url('importExport', 'import'); ?>" enctype="multipart/form-data">
		<legend><?php echo _t('sub.import_export.import'); ?></legend>
		<div class="form-group">
			<label class="group-name" for="file">
				<?php echo extension_loaded('zip') ? _t('sub.import_export.file_to_import') : _t('sub.import_export.file_to_import_no_zip'); ?>
			</label>
			<div class="group-controls">
				<input type="file" name="file" id="file" />
			</div>
		</div>

		<div class="form-group form-actions">
			<div class="group-controls">
				<button type="submit" class="btn btn-important"><?php echo _t('gen.action.import'); ?></button>
			</div>
		</div>
	</form>

	<?php if (count($this->feeds) > 0) { ?>
	<form method="post" action="<?php echo _url('importExport', 'export'); ?>">
		<legend><?php echo _t('sub.import_export.export'); ?></legend>
		<div class="form-group">
			<div class="group-controls">
				<label class="checkbox" for="export_opml">
					<input type="checkbox" name="export_opml" id="export_opml" value="1" checked="checked" />
					<?php echo _t('sub.import_export.export_opml'); ?>
				</label>

				<label class="checkbox" for="export_starred">
					<input type="checkbox" name="export_starred" id="export_starred" value="1" <?php echo extension_loaded('zip') ? 'checked="checked"' : ''; ?> />
					<?php echo _t('sub.import_export.export_starred'); ?>
				</label>

				<?php
					$select_args = '';
					if (extension_loaded('zip')) {
						$select_args = ' size="' . min(10, count($this->feeds)) .'" multiple="multiple"';
					}
				?>
				<select name="export_feeds[]"<?php echo $select_args; ?>>
					<?php echo extension_loaded('zip') ? '' : '<option></option>'; ?>
					<?php foreach ($this->feeds as $feed) { ?>
					<option value="<?php echo $feed->id(); ?>"><?php echo $feed->name(); ?></option>
					<?php } ?>
				</select>
			</div>
		</div>

		<div class="form-group form-actions">
			<div class="group-controls">
				<button type="submit" class="btn btn-important"><?php echo _t('gen.action.export'); ?></button>
			</div>
		</div>
	</form>
	<?php } ?>
</div>