Xiahai 11 сар өмнө
parent
commit
7e310807f0

+ 1 - 1
application/admin/controller/cms/Channel.php

@@ -30,7 +30,7 @@ class Channel extends Backend
      * Channel模型对象
      */
     protected $model = null;
-    protected $noNeedRight = ['get_fields_html', 'check_element_available'];
+    protected $noNeedRight = ['get_fields_html', 'check_element_available', 'add_chief'];
     /**
      * @var Tree
      */

+ 3 - 3
application/api/controller/User.php

@@ -475,7 +475,7 @@ class User extends Api
                     }
                 }
                 if ($type == 'chief') {
-                    if ($user->is_ediot == 'correct') {
+                    if ($user->is_editor == 'correct') {
                         $user_role_log->is_adopt = 'fault';
                         $user->is_editor = 'fault';
                     }
@@ -532,7 +532,7 @@ class User extends Api
 
                 // 默认图片
                 if ($params['image'] == '') {
-                    $params['image'] = 'https://dummyimage.com/205x128';
+                    $params['image'] = '/assets/img/index/manuscript_empty.png';
                 }
 
                 // 通过选择的期刊来绑定对应的主编
@@ -907,7 +907,7 @@ class User extends Api
             $params['title'] = 'Incomplete editing' . rand(0, 4);
         }
         if (empty($params['image'])) {
-            $params['image'] = 'https://dummyimage.com/205x128';
+            $params['image'] = '/assets/img/index/manuscript_empty.png';
         }
         $params['status'] = 'incomplete_submission';
         $params['user_id'] = $this->auth->id;

+ 1 - 1
application/extra/upload.php

@@ -21,7 +21,7 @@ return [
     /**
      * 可上传的文件类型
      */
-    'mimetype'  => 'jpg,png,bmp,jpeg,gif,webp,zip,rar,wav,mp4,mp3,webm,pdf,xlsx,doc,docx,word',
+    'mimetype'  => 'jpg,png,bmp,jpeg,gif,webp,zip,rar,wav,mp4,mp3,webm,pdf,xlsx,doc,docx,word,psd',
     /**
      * 是否支持批量上传
      */

+ 8 - 3
application/index/controller/User.php

@@ -1088,15 +1088,20 @@ class User extends Frontend
      */
     public function choose_journal()
     {
-        $info = Channel::where(['parent_id' => 1, 'chief_id' => ['<>', 0]])->field('name, id')->select();
+        $type = $this->request->request("type");
+        $where = [];
+        if ($type == 'author') {
+            $where['chief_id'] = ['<>', 0];
+        }
+        $info = Channel::where(['parent_id' => 1])->where($where)->field('name, id')->select();
         $params = $this->request->request();
         if (array_key_exists('name', $params) && $params['name']) {
-            $info = Channel::where(['parent_id' => 1, 'name' => ['like', '%' . $params['name'] . '%'], 'chief_id' => ['<>', 0]])->field('name, id')->select();
+            $info = Channel::where(['parent_id' => 1, 'name' => ['like', '%' . $params['name'] . '%']])->where($where)->field('name, id')->select();
         }
 
         if ($this->request->request("keyValue")) {
             $id_arr = $this->request->request('keyValue');
-            $info = Channel::where(['id' => ['in', $id_arr], 'chief_id' => ['<>', 0]])->field('name, id')->select();
+            $info = Channel::where(['id' => ['in', $id_arr]])->where($where)->field('name, id')->select();
         }
 
         $arr = [];

+ 1 - 1
application/kefu/controller/Sbusinessworker.php → application/index/kefu/controller/Sbusinessworker.php

@@ -1,6 +1,6 @@
 <?php
 
-namespace app\kefu\controller;
+namespace app\index\kefu\controller;
 
 use GatewayWorker\BusinessWorker;
 use Workerman\Worker;

+ 1 - 1
application/kefu/controller/Sgateway.php → application/index/kefu/controller/Sgateway.php

@@ -1,6 +1,6 @@
 <?php
 
-namespace app\kefu\controller;
+namespace app\index\kefu\controller;
 
 use GatewayWorker\Gateway;
 use Workerman\Worker;

+ 1 - 1
application/kefu/controller/Sregister.php → application/index/kefu/controller/Sregister.php

@@ -1,6 +1,6 @@
 <?php
 
-namespace app\kefu\controller;
+namespace app\index\kefu\controller;
 
 use GatewayWorker\Register;
 use Workerman\Worker;

+ 1 - 1
application/kefu/controller/Stextgateway.php → application/index/kefu/controller/Stextgateway.php

@@ -1,6 +1,6 @@
 <?php
 
-namespace app\kefu\controller;
+namespace app\index\kefu\controller;
 
 use GatewayWorker\Gateway;
 use Workerman\Autoloader;

+ 0 - 6
application/index/view/user/become_an_editor.html

@@ -114,12 +114,6 @@
                                     Select a journal:
                                 </label>
                                 <div class="col-xs-12 col-sm-8">
-<!--                                    <select id="c-journal_id" class="form-control selectpicker" multiple="" name="journal_ids[]">-->
-<!--                                        <option value="">Please select</option>-->
-<!--                                        {cms:channellist id="channel" type="son" typeid="1"}-->
-<!--                                        <option value="{$channel.id}" {in name="$channel.id" value="$row.journal_ids" }selected{/in}>{$channel.name}</option>-->
-<!--                                        {/cms:channellist}-->
-<!--                                    </select>-->
                                     <input id="c-journal_id" data-rule="required" data-source="user/choose_journal" data-primary-key="id" data-search-field="name" data-multiple="true" class="form-control selectpage" name="journal_ids" type="text" value="{$row.journal_ids}">
                                 </div>
                             </div>

+ 0 - 6
application/index/view/user/reviewer_information.html

@@ -104,12 +104,6 @@
                                 Select a journal:
                             </label>
                             <div class="col-xs-12 col-sm-8">
-<!--                                <select id="c-journal_id" class="form-control selectpicker" multiple="" name="journal_ids[]">-->
-<!--                                    <option value="">Please select</option>-->
-<!--                                    {cms:channellist id="channel" type="son" typeid="1"}-->
-<!--                                    <option value="{$channel.id}" {in name="$channel.id" value="$row.journal_ids" }selected{/in}>{$channel.name}</option>-->
-<!--                                    {/cms:channellist}-->
-<!--                                </select>-->
                                 <input id="c-journal_id" data-rule="required" data-source="user/choose_journal" data-primary-key="id" data-search-field="name" data-multiple="true" class="form-control selectpage" name="journal_ids[]" type="text" value="{$row.journal_ids}">
                             </div>
                         </div>

+ 8 - 8
application/index/view/user/submit_manuscript.html

@@ -172,8 +172,8 @@
                                     <div class="input-group">
                                         <input id="c-manuscript-zip" data-rule="required" class="form-control" name="row[manuscript_zip]" type="text" value="{$row.manuscript_zip|htmlentities}">
                                         <div class="input-group-addon no-border no-padding">
-                                            <span><button type="button" id="plupload-images" class="btn btn-danger plupload" data-input-id="c-manuscript-zip" data-multiple="true" data-mimetype="word,zip,doc,docx" data-preview-id="p-manuscript-zip"><i class="fa fa-upload"></i> Upload</button></span>
-                                            <span><button type="button" id="fachoose-images" class="btn btn-primary fachoose" data-input-id="c-manuscript-zip" data-preview-id="p-manuscript-zip" data-mimetype="word,zip,doc,docx" data-multiple="true"><i class="fa fa-list"></i> Choose</button></span>
+                                            <span><button type="button" id="plupload-images" class="btn btn-danger plupload" data-input-id="c-manuscript-zip" data-multiple="true" data-mimetype="word,zip,doc,docx,psd" data-preview-id="p-manuscript-zip"><i class="fa fa-upload"></i> Upload</button></span>
+                                            <span><button type="button" id="fachoose-images" class="btn btn-primary fachoose" data-input-id="c-manuscript-zip" data-preview-id="p-manuscript-zip" data-mimetype="word,zip,doc,docx,psd" data-multiple="true"><i class="fa fa-list"></i> Choose</button></span>
                                             <span class="msg-box n-right" for="c-manuscript-zip"></span>
                                         </div>
                                     </div>
@@ -251,11 +251,11 @@
                                 <div class="col-xs-12 col-sm-8">
                                     <div class="input-group mb-3">
                                         <div class="radio radio-inline pl-0">
-                                            <label for="copyright-here"><input id="copyright-here" name="row[is_copyright]" type="radio" value="hidden" {if condition="$row.is_copyright == 'hidden' "}checked{/if} />Upload here</label>
-                                            <label for="copyright-copyrights"><input id="copyright-copyrights" name="row[is_copyright]" type="radio" value="normal" {if condition="$row.is_copyright == 'normal' "}checked{/if} />No copyrights issues</label>
+                                            <label for="copyright-here"><input id="copyright-here" name="row[is_copyright]" type="radio" value="normal" {if condition="$row.is_copyright == 'normal' "}checked{/if} />Upload here</label>
+                                            <label for="copyright-copyrights"><input id="copyright-copyrights" name="row[is_copyright]" type="radio" value="hidden" {if condition="$row.is_copyright == 'hidden' "}checked{/if} />No copyrights issues</label>
                                         </div>
                                     </div>
-                                    <div class="input-group">
+                                    <div class="input-group copyright_files" style="display: none;">
                                         <input id="c-copyright_files" class="form-control" name="row[copyright_files]" type="text" value="{$row.copyright_files|htmlentities}">
                                         <div class="input-group-addon no-border no-padding">
                                             <span><button type="button" id="c-copyright_files-plupload-images" class="btn btn-danger plupload" data-input-id="c-copyright_files" data-multiple="true" data-mimetype="zip,pdf" data-preview-id="p-copyright_files"><i class="fa fa-upload"></i> Upload</button></span>
@@ -305,7 +305,7 @@
 <!--                                        <option value="{$channel.id}" {if condition="$row.journal == $channel.id"}selected{/if}>{$channel.name}</option>-->
 <!--                                        {/cms:channellist}-->
 <!--                                    </select>-->
-                                    <input id="c-journal" data-rule="required" data-source="user/choose_journal" data-primary-key="id" data-search-field="name" class="form-control selectpage" name="row[journal]" type="text" value="{$row.journal}">
+                                    <input id="c-journal" data-rule="required" data-source="user/choose_journal" data-params='{"type":"author"}' data-primary-key="id" data-search-field="name" class="form-control selectpage" name="row[journal]" type="text" value="{$row.journal}">
                                 </div>
                             </div>
                             <div class="form-group">
@@ -588,7 +588,7 @@
                                     </div>
                                 </div>
                             </div>
-                            <div class="form-group">
+                            <div class="form-group funding_content" style="display: none;">
                                 <label class="control-label col-xs-12 col-sm-3"></label>
                                 <div class="col-xs-12 col-sm-8">
                                     <textarea id="c-funding_content" class="form-control editor" name="row[funding_content]" rows="15" placeholder="If 'yes', please add your funding unit and funding number...">{$row.funding_content|htmlentities}</textarea>
@@ -623,7 +623,7 @@
                                 </div>
                             </div>
 
-                            <div class="form-group">
+                            <div class="form-group interest_content" style="display: none;">
                                 <label class="control-label col-xs-12 col-sm-3"></label>
                                 <div class="col-xs-12 col-sm-8">
                                     <textarea id="c-interest_content" class="form-control editor" name="row[interest_content]" rows="15" placeholder="Type here...">{$row.interest_content|htmlentities}</textarea>

BIN
public/assets/img/index/manuscript_empty.png


+ 29 - 9
public/assets/js/frontend/user.js

@@ -1275,10 +1275,33 @@ define(['jquery', 'bootstrap', 'frontend', 'form', 'template'], function ($, und
                     }
                 });
             })
+            // 单选框选择显示对应input
+            $(document).on('click', '.radio-inline', function () {
+                let copyright_files_value = $("input[name='row[is_copyright]']:checked").val();
+                if (copyright_files_value == 'normal') {
+                    $('.copyright_files').show();
+                } else {
+                    $('.copyright_files').hide();
+                }
+
+                let is_funding_value = $("input[name='row[is_funding]']:checked").val();
+                if (is_funding_value == 'normal') {
+                    $('.funding_content').show();
+                } else {
+                    $('.funding_content').hide();
+                }
+
+                let is_interest_value = $("input[name='row[is_interest]']:checked").val();
+                if (is_interest_value == 'normal') {
+                    $('.interest_content').show();
+                } else {
+                    $('.interest_content').hide();
+                }
+            })
 
             Form.api.bindevent($("#submit-manuscript-form"), function () {
                 setTimeout(function () {
-                    location.href = window.history.go(-1);
+                    location.href = '/index/user/display_submitted';
                 }, 2000);
             });
         },
@@ -1337,7 +1360,7 @@ define(['jquery', 'bootstrap', 'frontend', 'form', 'template'], function ($, und
         handing_suggestions: function () {
             Form.api.bindevent($("#submit-comments-form"), function () {
                 setTimeout(function () {
-                    location.href = window.history.go(-1);
+                    location.href = '/index/user/show_reviewed_manuscripts';
                 }, 2000);
             });
         },
@@ -1867,7 +1890,7 @@ define(['jquery', 'bootstrap', 'frontend', 'form', 'template'], function ($, und
         conduct_review: function () {
             Form.api.bindevent($("#submit-comments-form"), function () {
                 setTimeout(function () {
-                    location.href = window.history.go(-1);
+                    location.href = '/index/user/show_reviewed_manuscripts';
                 }, 2000);
             });
         },
@@ -1890,11 +1913,8 @@ define(['jquery', 'bootstrap', 'frontend', 'form', 'template'], function ($, und
         reviewer_information: function () {
             //为表单绑定事件
             Form.api.bindevent($("#reviewer-information-form"), function (data, ret) {
-                // setTimeout(function () {
-                //     location.href = ret.url ? ret.url : "/";
-                // }, 6000);
+
             }, function (data) {
-                // $("input[name=captcha]").next(".input-group-btn").find("img").trigger("click");
             });
         },
         become_an_editor: function () {
@@ -1941,7 +1961,7 @@ define(['jquery', 'bootstrap', 'frontend', 'form', 'template'], function ($, und
             //为表单绑定事件
             Form.api.bindevent($("#review-comments-form"), function (data, ret) {
                 setTimeout(function () {
-                    location.href = window.history.go(-1);
+                    location.href = '/index/user/display_submitted';
                 }, 2000);
             }, function (data) {
 
@@ -1976,7 +1996,7 @@ define(['jquery', 'bootstrap', 'frontend', 'form', 'template'], function ($, und
             //为表单绑定事件
             Form.api.bindevent($("#invite-editor-form"), function (data, ret) {
                 setTimeout(function () {
-                    location.href = window.history.go(-1);
+                    location.href = '/index/user/editing_manuscripts';
                 }, 2000);
             }, function (data) {