Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

Rev 7126 | Rev 7128 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 7126 Rev 7127
Línea 1798... Línea 1798...
1798
                $item['shared_image'] = $this->url()->fromRoute('storage', ['code' => $sharedUser->uuid, 'type' => 'user', 'filename' => $sharedUser->image]);
1798
                $item['shared_image'] = $this->url()->fromRoute('storage', ['code' => $sharedUser->uuid, 'type' => 'user', 'filename' => $sharedUser->image]);
1799
                $item['shared_name'] = $sharedUser->first_name . ' ' . $sharedUser->last_name;
1799
                $item['shared_name'] = $sharedUser->first_name . ' ' . $sharedUser->last_name;
1800
            }
1800
            }
1801
        }
1801
        }
Línea 1802... Línea -...
1802
 
-
 
-
 
1802
 
Línea 1803... Línea 1803...
1803
        $companyMapper = CompanyMapper::getInstance($this->adapter);
1803
        
1804
 
1804
 
1805
        if($feed->file_type == Feed::FILE_TYPE_FAST_SURVEY) {
1805
        if($feed->file_type == Feed::FILE_TYPE_FAST_SURVEY) {
1806
            $item['comment_add_url'] = '';
1806
            $item['comment_add_url'] = '';
Línea 1807... Línea 1807...
1807
            $item['comments'] = [];
1807
            $item['comments'] = [];
1808
        } else {
1808
        } else {
1809
            
1809
            
1810
            $item['comment_add_url'] = $this->url()->fromRoute('feed/comment', ['id' => $feed->uuid]);
-
 
1811
            $item['comments'] = [];
1810
            $item['comment_add_url'] = $this->url()->fromRoute('feed/comment', ['id' => $feed->uuid]);
1812
        
1811
            $item['comments'] = [];
Línea 1813... Línea 1812...
1813
            $companies = [];
1812
 
1814
            $commentMapper = CommentMapper::getInstance($this->adapter);
1813
            $commentMapper = CommentMapper::getInstance($this->adapter);
Línea 1820... Línea 1819...
1820
            $comments = [];
1819
            $comments = [];
1821
            foreach ($records as $record) {
1820
            foreach ($records as $record) {
1822
                $user = $userMapper->fetchOne($record->user_id);
1821
                $user = $userMapper->fetchOne($record->user_id);
Línea 1823... Línea 1822...
1823
               
1822
               
1824
    
1823
    
1825
                if ($record->user_id == $currentUser->id) {
1824
                if ($user->id == $currentUser->id) {
1826
                    $link_delete = $this->url()->fromRoute('feed/comment/delete', ['id' => $feed->uuid, 'comment' => $record->uuid]);
1825
                    $link_delete = $this->url()->fromRoute('feed/comment/delete', ['id' => $feed->uuid, 'comment' => $record->uuid]);
1827
                    array_push($comments, [
1826
                    array_push($comments, [
1828
                        'unique' => uniqid(),
1827
                        'unique' => uniqid(),
Línea 1833... Línea 1832...
1833
                        'time_elapsed' => Functions::timeAgo($record->added_on, $now),
1832
                        'time_elapsed' => Functions::timeAgo($record->added_on, $now),
1834
                        'comment' => $record->comment,
1833
                        'comment' => $record->comment,
1835
                        'link_delete' => $link_delete
1834
                        'link_delete' => $link_delete
1836
                    ]);
1835
                    ]);
1837
                } else {
1836
                } else {
1838
                    if($feed->company_id) {
1837
                    $link_delete = '';
1839
                        $company = $companyMapper->fetchOne($feed->company_id);
-
 
1840
                        
-
 
1841
                        array_push($comments, [
1838
                    array_push($comments, [
1842
                            'unique' => uniqid(),
1839
                        'unique' => uniqid(),
1843
                            'user_url' => $this->url()->fromRoute('company/view', ['id' => $company->uuid]),
1840
                        'user_url' => $this->url()->fromRoute('profile/view', ['id' => $user->uuid]),
-
 
1841
                        'user_name' => $user->first_name . ' ' . $user->last_name,
1844
                            'user_name' => $company->name,
1842
                        'company' => $owner,
1845
                            'user_image' => $this->url()->fromRoute('storage', ['type' => 'company',  'code' => $company->uuid, 'filename' =>  $company->image]),
1843
                        'user_image' => $this->url()->fromRoute('storage', ['type' => 'user',  'code' => $user->uuid, 'filename' =>  $user->image]),
1846
                            'time_elapsed' => Functions::timeAgo($record->added_on, $now),
1844
                        'time_elapsed' => Functions::timeAgo($record->added_on, $now),
1847
                            'comment' => $record->comment,
1845
                        'comment' => $record->comment,
1848
                            //'link_delete' => $link_delete
1846
                        'link_delete' => $link_delete
1849
                        ]);
-
 
1850
                        $link_delete = '';
-
 
1851
                    } else if($feed->group_id) {
-
 
1852
                        
-
 
1853
                    }
1847
                    ]);
Línea 1854... Línea 1848...
1854
                    
1848
                    
1855
                    
1849