コード例 #1
0
 public static function edit($id)
 {
     self::check_logged_in();
     $draft = Draft::find($id);
     View::make('drafts/edit.html', array('attributes' => $draft));
 }
コード例 #2
0
 Route::get('dashboard/emails/{id}/forward', 'EmailController@forward');
 Route::resource('dashboard/emails-resource/sent', 'SentEmailResourceController');
 Route::get('dashboard/emails-custom/share/{id}', 'SentEmailCustomController@share');
 Route::get('dashboard/emails-custom/pdf/{id}', 'SentEmailCustomController@pdf');
 Route::get('dashboard/emails/drafts', 'EmailController@drafts');
 Route::get('dashboard/emails/drafts/{id}/edit', 'EmailController@edit_draft');
 Route::resource('dashboard/emails-resource/drafts', 'DraftResourceController');
 Route::get('dashboard/emails/trash', 'EmailController@trash');
 Route::resource('dashboard/emails-resource/trash', 'TrashResourceController');
 Route::get('email/backend-show/{id}', function ($id) {
     if ($email = Email::find($id)) {
     }
     return View::make('backend.emails.send_templates.backend-show', ['email_body' => $email->email_body, 'email_id' => $id]);
 });
 Route::get('draft/backend-show/{id}', function ($id) {
     if ($email = Draft::find($id)) {
     }
     return View::make('backend.emails.send_templates.backend-draft-show', ['email_body' => $email->email_body, 'email_id' => $id]);
 });
 /*****************PAGES*******************/
 Route::get('dashboard/pages', 'PageController@index');
 Route::get('dashboard/pages/trash', 'PageController@deleted_pages');
 Route::get('dashboard/pages/create', 'PageController@create');
 Route::get('dashboard/pages/{id}/edit', 'PageController@edit');
 Route::get('dashboard/pages/{id}/delete', 'PageController@delete');
 Route::get('dashboard/pages/{id}/restore', 'PageController@restore');
 Route::get('dashboard/pages/{id}/destroy', 'PageController@destroy');
 /*****************TAGS************************************/
 Route::get('dashboard/tags', 'TagController@index');
 Route::get('dashboard/tags/create', 'TagController@create');
 Route::get('dashboard/tags/{id}/edit', 'TagController@edit');
コード例 #3
0
 public function edit_draft($id)
 {
     $email_configs = ['from_name' => Setting::getFromName($this->user), 'from_email' => Setting::getFromEmail($this->user), 'reply_to_email' => Setting::getReplyToEmail($this->user)];
     $tag_list = Tag::getTagList();
     $subscribers = Subscriber::getSubscribersForEmail();
     $subsArr = [];
     foreach ($subscribers as $subscriber) {
         $subsArr[$subscriber->email] = $subscriber->first_name . ' ' . $subscriber->last_name . '(' . $subscriber->email . ')';
     }
     $maillists = Maillist::getMaillistsForEmail();
     $listsArr = [];
     foreach ($maillists as $maillist) {
         $listsArr[$maillist->id] = $maillist->name . ' (' . count($maillist->subscribers) . ' subscribers)';
     }
     $email = Draft::find($id);
     return View::make('backend.emails.edit-draft', ['user' => $this->user, 'isAdmin' => $this->isAdmin, 'configs' => $this->configs, 'logged_in_for' => $this->logged_in_for, 'activeParent' => $this->activeParent, 'active' => 'createemails', 'subscribers' => $subsArr, 'mail_lists' => $listsArr, 'email_configs' => $email_configs, 'tag_list' => $tag_list, 'email' => $email]);
 }