From a338a97d5bb947f462483de8a9d87dd52fa3b2eb Mon Sep 17 00:00:00 2001 From: Andrew Manning Date: Sun, 10 Jul 2016 06:58:20 -0400 Subject: First draft of website import tools --- include/text.php | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'include/text.php') diff --git a/include/text.php b/include/text.php index 986e3b56c..57339e16d 100644 --- a/include/text.php +++ b/include/text.php @@ -2246,6 +2246,30 @@ function design_tools() { )); } +/** + * @brief Creates website import tools menu + * + * @return string + */ +function website_import_tools() { + + $channel = App::get_channel(); + $sys = false; + + if(App::$is_sys && is_site_admin()) { + require_once('include/channel.php'); + $channel = get_sys_channel(); + $sys = true; + } + + $who = $channel['channel_address']; + + return replace_macros(get_markup_template('design_tools.tpl'), array( + '$title' => t('Import'), + '$who' => $who, + )); +} + /* case insensitive in_array() */ function in_arrayi($needle, $haystack) { -- cgit v1.2.3 From c5e534c0cb939b9730f289a844f24b1121e6e9cf Mon Sep 17 00:00:00 2001 From: Andrew Manning Date: Sun, 10 Jul 2016 07:21:52 -0400 Subject: Clearer import control interface --- include/text.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'include/text.php') diff --git a/include/text.php b/include/text.php index 57339e16d..096c8a5aa 100644 --- a/include/text.php +++ b/include/text.php @@ -2264,9 +2264,13 @@ function website_import_tools() { $who = $channel['channel_address']; - return replace_macros(get_markup_template('design_tools.tpl'), array( + return replace_macros(get_markup_template('website_import_tools.tpl'), array( '$title' => t('Import'), - '$who' => $who, + //'$who' => $who, + '$import_label' => t('Import website...'), + '$import_placeholder' => t('Select folder to import'), + '$file_upload_text' => t('Import from a zipped folder:'), + '$file_import_text' => t('Import from cloud files:') )); } -- cgit v1.2.3 From ff2f599142348162b6459a02aa014c7dbca84f76 Mon Sep 17 00:00:00 2001 From: Andrew Manning Date: Sat, 16 Jul 2016 19:25:44 -0400 Subject: Postpone remote folder import until filesystem mirroring matures. --- include/text.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'include/text.php') diff --git a/include/text.php b/include/text.php index 096c8a5aa..a0f0ed7ae 100644 --- a/include/text.php +++ b/include/text.php @@ -2270,7 +2270,11 @@ function website_import_tools() { '$import_label' => t('Import website...'), '$import_placeholder' => t('Select folder to import'), '$file_upload_text' => t('Import from a zipped folder:'), - '$file_import_text' => t('Import from cloud files:') + '$file_import_text' => t('Import from cloud files:'), + '$file_remote_text' => t('Import from another channel'), + '$desc' => t('https://example.com/cloud/peter/sharedfolder'), + '$hint' => t('https://example.com/cloud/peter/sharedfolder'), + '$follow' => t('Import'), )); } -- cgit v1.2.3 From e7b853175154688d60d83ca5935650d1128973c6 Mon Sep 17 00:00:00 2001 From: Andrew Manning Date: Sat, 16 Jul 2016 21:02:13 -0400 Subject: Stash changes to merge from dev --- include/text.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'include/text.php') diff --git a/include/text.php b/include/text.php index a0f0ed7ae..3b285cfca 100644 --- a/include/text.php +++ b/include/text.php @@ -2271,10 +2271,9 @@ function website_import_tools() { '$import_placeholder' => t('Select folder to import'), '$file_upload_text' => t('Import from a zipped folder:'), '$file_import_text' => t('Import from cloud files:'), - '$file_remote_text' => t('Import from another channel'), - '$desc' => t('https://example.com/cloud/peter/sharedfolder'), - '$hint' => t('https://example.com/cloud/peter/sharedfolder'), - '$follow' => t('Import'), + '$desc' => t('/path/to/folder'), + '$hint' => t('/path/to/folder'), + '$select' => t('Select folder'), )); } -- cgit v1.2.3 From 7c475575549161d465189fa5e726739f4a4ac76c Mon Sep 17 00:00:00 2001 From: Andrew Manning Date: Sun, 31 Jul 2016 07:30:25 -0400 Subject: Improved UI. Removed logger statements. --- include/text.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'include/text.php') diff --git a/include/text.php b/include/text.php index f81155edb..d508f8ab3 100644 --- a/include/text.php +++ b/include/text.php @@ -2258,17 +2258,14 @@ function website_import_tools() { $sys = true; } - $who = $channel['channel_address']; - return replace_macros(get_markup_template('website_import_tools.tpl'), array( '$title' => t('Import'), - //'$who' => $who, '$import_label' => t('Import website...'), '$import_placeholder' => t('Select folder to import'), '$file_upload_text' => t('Import from a zipped folder:'), '$file_import_text' => t('Import from cloud files:'), - '$desc' => t('/path/to/folder'), - '$hint' => t('/path/to/folder'), + '$desc' => t('/cloud/channel/path/to/folder'), + '$hint' => t('Enter path to website files'), '$select' => t('Select folder'), )); } -- cgit v1.2.3