Added excel format in camapaign management
Showing
6 changed files
with
17 additions
and
2 deletions
| ... | @@ -857,7 +857,14 @@ class CampaignController extends Controller { | ... | @@ -857,7 +857,14 @@ class CampaignController extends Controller { |
| 857 | 857 | ||
| 858 | $writer->save('php://output');*/ | 858 | $writer->save('php://output');*/ |
| 859 | 859 | ||
| 860 | $filepath = "assets/extras/campaignUserMappingFormat.xlsx"; | 860 | $action = Input::get('action'); |
| 861 | |||
| 862 | if($action == 'upload'){ | ||
| 863 | $filepath = "assets/extras/MultipleUserCampaignUploadFormat.xlsx"; | ||
| 864 | }else if($action == 'bulkupload'){ | ||
| 865 | $filepath = "assets/extras/MultipleUserMultipleCampaignUploadFormat.xlsx"; | ||
| 866 | } | ||
| 867 | |||
| 861 | return Response::download($filepath); | 868 | return Response::download($filepath); |
| 862 | } | 869 | } |
| 863 | 870 | ... | ... |
No preview for this file type
No preview for this file type
No preview for this file type
| ... | @@ -69,7 +69,7 @@ $(document).ready(function(){ | ... | @@ -69,7 +69,7 @@ $(document).ready(function(){ |
| 69 | }); | 69 | }); |
| 70 | 70 | ||
| 71 | $('#downloadExcel').click(function(){ | 71 | $('#downloadExcel').click(function(){ |
| 72 | window.open('campaign/sampleDataExcel'); | 72 | window.open('campaign/sampleDataExcel?action=bulkupload'); |
| 73 | return false; | 73 | return false; |
| 74 | }); | 74 | }); |
| 75 | }); | 75 | }); | ... | ... |
| ... | @@ -77,6 +77,9 @@ $dashboarduser=Auth::user(); | ... | @@ -77,6 +77,9 @@ $dashboarduser=Auth::user(); |
| 77 | <div class="col-md-2"> | 77 | <div class="col-md-2"> |
| 78 | <input type="submit" name="upload" id="upload" class="btn btn-primary" value="Upload"> | 78 | <input type="submit" name="upload" id="upload" class="btn btn-primary" value="Upload"> |
| 79 | </div> | 79 | </div> |
| 80 | <div class="col-md-2"> | ||
| 81 | <span><a href="javascript:void(0)" id="downloadExcel">Sample excel format</a></span> | ||
| 82 | </div> | ||
| 80 | </form> | 83 | </form> |
| 81 | </div> | 84 | </div> |
| 82 | </div> | 85 | </div> |
| ... | @@ -220,4 +223,9 @@ $(document).ready(function(){ | ... | @@ -220,4 +223,9 @@ $(document).ready(function(){ |
| 220 | } | 223 | } |
| 221 | 224 | ||
| 222 | }); | 225 | }); |
| 226 | |||
| 227 | $('#downloadExcel').click(function(){ | ||
| 228 | window.open('campaign/sampleDataExcel?action=upload'); | ||
| 229 | return false; | ||
| 230 | }); | ||
| 223 | </script> | 231 | </script> | ... | ... |
-
Please register or sign in to post a comment