Ejemplo n.º 1
0
<?php

if (isset($pager)) {
    ?>

<?php 
    include_partial('global/subsection', array('title' => $title, 'pager' => $pager, 'more' => isset($more_action) ? EntityTable::getInternalUrl($entity, $more_action) : null, 'pointer' => isset($pointer) ? $pointer : null, 'actions' => isset($actions) ? $actions : null));
    ?>

<div class="relationship-section">

<?php 
    $ids = array();
    foreach ($pager->execute() as $id => $ary) {
        ?>
  <?php 
        $ids[$id] = isset($ids[$id]) ? $ids[$id] + 1 : 1;
        ?>
  <?php 
        include_partial('entity/entitywithrelationships', array('related_entity' => $ary, 'relationships' => $ary['Relationships'], 'profiled_entity' => $entity, 'repeat' => $ids[$id]));
    }
    ?>
</div>

<?php 
}
Ejemplo n.º 2
0
 public function executeUpdateIndustries($request)
 {
     $this->checkEntity($request, false, false);
     if (!$request->isMethod('post')) {
         $this->forward('error', 'invalid');
     }
     if ($this->entity['primary_ext'] == 'Person') {
         $new = OsPerson::updateCategories($this->entity['id']);
     } else {
         $new = OsOrg::updateCategories($this->entity['id'], $this->entity['name'], $exactNameOverride = true);
     }
     $this->redirect(EntityTable::getInternalUrl($this->entity, 'editIndustries'));
 }
Ejemplo n.º 3
0
  <br />
  <?php 
    if (!$sf_user->isAuthenticated()) {
        ?>
    <?php 
        cache_save();
        ?>
  <?php 
    }
}
?>



<?php 
include_component('note', 'recordSample', array('record' => $entity, 'model' => 'Entity', 'more_uri' => EntityTable::getInternalUrl($entity, 'notes')));
?>
<br />


<?php 
if ($sf_user->hasCredential('editor') || $sf_user->hasCredential('merger')) {
    ?>

  <?php 
    if ($sf_user->hasCredential('merger') && !cache('similarEntities')) {
        ?>
    <?php 
        include_component('entity', 'similarEntities', array('entity' => $entity));
        ?>
    <?php 
Ejemplo n.º 4
0
<!-- NAME-VALUE PAIRS -->
<?php 
include_partial('global/section', array('title' => 'Basic Info', 'action' => array('text' => 'edit', 'url' => EntityTable::getInternalUrl($entity, 'edit'))));
?>

<div class="padded margin_bottom">
<?php 
include_partial('extension/' . strtolower($entity['primary_ext']) . 'data', array('entity' => $entity, 'label_width' => '100px'));
?>

<?php 
$networkLinks = array();
if (EntityTable::isLocal($entity['id'])) {
    ?>
  <?php 
    $networks = EntityTable::getNetworksById($entity['id']);
    ?>
  <?php 
    foreach ($networks as $network) {
        ?>
    <?php 
        $networkLinks[] = network_link($network);
        ?>
  <?php 
    }
}
?>

<?php 
$addressLinks = array();
if ($entity['primary_ext'] == 'Org') {
Ejemplo n.º 5
0
<?php

include_partial('global/section', array('title' => 'Expert Tools'));
?>


<div class="padded margin_bottom">
<?php 
echo link_to('network search', EntityTable::getInternalUrl($entity, 'networkSearch'));
?>
<br>
<?php 
echo link_to('find connections', EntityTable::getInternalUrl($entity, 'findConnections'));
?>
<br>
<?php 
if ($entity['primary_ext'] == 'Org') {
    ?>
  <?php 
    echo link_to('match related donors', EntityTable::getInternalUrl($entity, 'matchRelated'));
    ?>
<br>
<?php 
}
?>
  
<?php 
echo link_to('twitter accounts', '@railsEditTwitter?id=' . $entity['id']);
?>
<br>
</div>
Ejemplo n.º 6
0
}
?>



<?php 
if (isset($entity_pager)) {
    ?>

<?php 
    include_partial('global/section', array('title' => 'Search Results', 'pager' => $entity_pager));
    ?>

<div class="padded">
  <?php 
    foreach ($entity_pager->execute() as $result) {
        ?>
    <?php 
        include_partial('entity/oneliner', array('entity' => $result, 'profile_link' => true, 'actions' => array(array('name' => 'select', 'url' => EntityTable::getInternalUrl($entity, 'findConnections', array('id2' => $result['id'])), 'options' => 'class="text_big" style="font-weight: bold"'))));
        ?>
  <?php 
    }
    ?>
  <?php 
    echo pager_noresults($entity_pager);
    ?>
</div>


<?php 
}
Ejemplo n.º 7
0

<?php 
foreach ($sections as $title => $ary) {
    ?>

<?php 
    if (isset($ary['pager'])) {
        ?>

<?php 
        if ($ary['pager']->getNumResults()) {
            ?>

<?php 
            include_partial('global/subsection', array('title' => $title, 'pager' => $ary['pager'], 'more' => EntityTable::getInternalUrl($entity, $ary['more_action']), 'pointer' => isset($ary['pointer']) ? $ary['pointer'] : null, 'actions' => isset($ary['actions']) ? $ary['actions'] : null));
            ?>

<div class="padded margin_bottom">
<?php 
            foreach ($ary['pager']->execute() as $related_entity) {
                ?>
  <?php 
                include_partial('entity/entitywithrelationships', array('related_entity' => $related_entity, 'relationships' => $related_entity['rels'], 'profiled_entity' => $entity));
            }
            ?>
</div>
<br />

<?php 
        }
Ejemplo n.º 8
0
 public function executeMatchRelated($request)
 {
     $this->checkList($request);
     $db = Doctrine_Manager::connection();
     $sql = 'SELECT e.* FROM os_entity_transaction et LEFT JOIN entity e ON (et.entity_id = e.id) LEFT JOIN ls_list_entity le on le.entity_id = e.id WHERE e.is_deleted=0 AND le.is_deleted =0 AND le.list_id = ? AND et.reviewed_at IS NULL AND et.locked_at IS NULL GROUP BY e.id LIMIT 100';
     $stmt = $db->execute($sql, array($this->list['id']));
     $this->relatedIds = $stmt->fetchAll(PDO::FETCH_COLUMN);
     if (count($this->relatedIds)) {
         $nextEntity = Doctrine::getTable('Entity')->find($this->relatedIds[0]);
         $this->getUser()->setAttribute('os_related_ids', $this->relatedIds);
         $this->redirect(EntityTable::getInternalUrl($nextEntity, 'matchDonations'));
     } else {
         $this->redirect(EntityTable::getInternalUrl($this->entity));
     }
 }
Ejemplo n.º 9
0
<?php

slot('header_text', $entity['name']);
slot('header_link', EntityTable::getInternalUrl($entity));
?>


<h2>Match Donors From OpenSecrets</h2>

Another analyst is currently matching OpenSecrets donors for this person.

<ul>
  <li><strong><?php 
echo link_to('Go back', EntityTable::getInternalUrl($entity));
?>
</strong> to <?php 
echo $entity['name'];
?>
's profile page.</li>
  <?php 
if (isset($next_entity) && $next_entity) {
    ?>
    <li><strong><?php 
    echo link_to('Match donations', EntityTable::getInternalUrl($next_entity, 'matchDonors'));
    ?>
</strong> for another person.</li>
  <?php 
}
?>
</ul>
Ejemplo n.º 10
0
  <tr>
  <?php 
    }
    ?>
    <td style="vertical-align: middle; text-align: center; padding: 2em;">
      <?php 
    if ($image = $member['filename']) {
        ?>
        <?php 
        echo link_to(image_tag(ImageTable::getPath($image, 'profile'), array('alt' => '', 'style' => 'height: 130px; border: 0;')), EntityTable::getInternalUrl($member));
        ?>
      <?php 
    } else {
        ?>
        <?php 
        echo link_to(image_tag('system' . DIRECTORY_SEPARATOR . 'anon.png', array('style' => 'height: 130px; border: 0;')), EntityTable::getInternalUrl($member));
        ?>
      <?php 
    }
    ?>
      <br />
      <br />
      <?php 
    echo entity_link($member);
    ?>
      <br />
      <em><?php 
    echo $member['blurb'];
    ?>
</em>
    </td>
Ejemplo n.º 11
0
<?php

include_partial('global/section', array('title' => 'Admin Stuff'));
?>


<div class="padded margin_bottom">
<?php 
echo link_to('addresses', EntityTable::getInternalUrl($entity, 'addresses'));
?>
</div>
Ejemplo n.º 12
0
<?php

if (isset($possible_duplicates) && count($possible_duplicates)) {
    ?>
<div class="cleanup text_big">
<?php 
    echo count($possible_duplicates) > 1 ? 'Persons with similar names have been found:' : 'A person with a similar name has been found:';
    ?>

<?php 
    $links = array();
    foreach ($possible_duplicates as $duplicate) {
        ?>
  <?php 
        $links[] = link_to($duplicate['name'], EntityTable::getInternalUrl($duplicate));
    }
    echo implode(', ', $links);
    ?>
.

Please <?php 
    echo link_to('let us know', '@contact');
    ?>
 if these are duplicates.
</div>
<br />
<?php 
}
Ejemplo n.º 13
0
}
?>

<?php 
if ($entity['primary_ext'] == 'Org') {
    ?>
  <?php 
    $tabs['Schools'] = array('url' => EntityTable::getInternalUrl($entity, 'schools'), 'href' => $baseHref . 'schools', 'actions' => array('schools'));
    ?>
 
<?php 
}
?>

<?php 
$tabs['Data'] = array('url' => EntityTable::getInternalUrl($entity, 'datatable'), 'href' => $baseHref . 'datatable', 'actions' => array());
?>

<?php 
/* $tabs['Find Connections'] = array(
  'url' => EntityTable::getInternalUrl($entity, 'findConnections'),
  'href' => $baseHref . 'findConnections',
  'actions' => array('findConnections'),
  'remote' => false
) */
?>

<?php 
/* $tabs['Search Network'] = array(
  'url' => EntityTable::getInternalUrl($entity, 'networkSearch'),
  'href' => $baseHref . 'networkSearch',
Ejemplo n.º 14
0
<?php 
use_helper('Javascript');
use_helper('Pager');
?>

<form action="<?php 
echo url_for(EntityTable::getInternalUrl($entity, 'political'));
?>
" method="GET">

<em>Showing US campaign contribution data for cycles <?php 
echo select_tag('start_cycle', options_for_select(array_combine($all_cycles, $all_cycles), $start_cycle), array('id' => 'startselect', 'onchange' => "setOptions(this.value,'endselect');"));
?>
 thru <?php 
echo select_tag('end_cycle', options_for_select(array_combine($all_cycles, $all_cycles), $end_cycle), array('id' => 'endselect', 'onchange' => "setOptions(this.value,'startselect');"));
?>
 <?php 
echo submit_tag('go', array("style" => "background-color: #eee; color: #008"));
?>
</em> <a href="#about">learn more</a>
</form><br><br>
<!-- IF ENTITY IS PERSON -->


<?php 
if ($entity['primary_ext'] == 'Person') {
    ?>


<?php 
Ejemplo n.º 15
0
        ?>
  </div>
<?php 
    } else {
        ?>
  <div class="padded">
  <?php 
        foreach ($similar_entities as $similar_entity) {
            ?>
    <?php 
            echo entity_link($similar_entity, null);
            ?>
    <br />
  <?php 
        }
        ?>
  <br />
  <?php 
        echo link_to('Begin merging process &raquo;', EntityTable::getInternalUrl($entity, 'merge'));
        ?>
  </div>
<?php 
    }
    ?>

</div>

<br />

<?php 
}
Ejemplo n.º 16
0
<?php

include_partial('global/section', array('title' => 'Lists', 'pointer' => 'Analyst-created lists of people and orgs', 'action' => array('text' => 'add', 'url' => EntityTable::getInternalUrl($entity, 'addList'))));
?>

<div class="padded">
<?php 
foreach (EntityTable::getLsListsById($entity['id']) as $list) {
    ?>
  <?php 
    if (!$list['is_admin'] || $sf_user->hasCredential('editor')) {
        ?>
    <strong><?php 
        echo link_to(($list['is_admin'] ? '*' : '') . $list['name'], LsListTable::getInternalUrl($list));
        ?>
</strong>    
    <?php 
        if ($list['rank']) {
            ?>
      [#<?php 
            echo $list['rank'];
            ?>
]
    <?php 
        }
        ?>
    <?php 
        if ($sf_user->hasCredential('editor') && !$list['is_admin'] || $sf_user->hasCredential('admin')) {
            ?>
      <span class="text_small">
       (<?php 
Ejemplo n.º 17
0
  <div id="order_2" style="display: <?php 
    echo $entity->primary_ext == "Person" ? "none" : "block";
    ?>
">
  <strong>Entities in file</strong> &rarr; have positions at / give to / do business with / are members of &rarr; <strong><?php 
    echo link_to($entity['name'], EntityTable::getInternalUrl($entity), array('target' => '_new'));
    ?>
<br />
  <a href="javascript:void(0);" onclick="switchEntities();">(switch)</a></strong>
  </div>
  <div id="order_1" style="display: <?php 
    echo $entity->primary_ext == "Person" ? "block" : "none";
    ?>
">
  <strong><?php 
    echo link_to($entity['name'], EntityTable::getInternalUrl($entity), array('target' => '_new'));
    ?>
</strong> &rarr; has positions at / gives to / does business with / is a member of &rarr; <strong>entities in file<br />
  <a href="javascript:void(0);" onclick="switchEntities();">(switch)</a></strong>
  </div>
    
  </td>
  </tr>
  
 <tr>
  <td class="bulk_form_label">
      Category*
    </td>
    <td id="category_field" style="vertical-align: top;">
      <select id="relationship_category_all" name="relationship_category_all" onchange="showCategoryFields(this.value, 'all');"></select>     
    </td>
Ejemplo n.º 18
0
<?php 
$image = EntityTable::getProfileImageById($entity['id']);
if ($image) {
    ?>
	<?php 
    echo link_to(image_tag(ImageTable::getPath($image, 'profile'), array('alt' => '')), EntityTable::getInternalUrl($entity, 'images'));
    ?>
  <?php 
    slot('share_image', ImageTable::getPath($image, 'profile'));
} else {
    ?>
  <?php 
    $file = $entity['primary_ext'] == 'Person' ? 'anon.png' : 'anons.png';
    ?>
	<?php 
    echo link_to(image_tag('system' . DIRECTORY_SEPARATOR . $file, array('alt' => 'Upload Image')), EntityTable::getInternalUrl($entity, 'uploadImage'));
}
?>

<?php 
if ($image['caption']) {
    ?>
  <div class="image_caption"><?php 
    echo $image['caption'];
    ?>
</div>
<?php 
}
?>
</div>
</div>
Ejemplo n.º 19
0
<h2>Upload Image</h2>

<?php 
include_partial('global/formerrors', array('form' => $upload_form));
?>

Select an image from your computer to upload, or enter the URL of a remote image file. 
If you upload your own image, it must be "free".<br />
<br />
PNG, JPEG, and GIF formats are allowed.
Images can have a maximum file size of 5MB.<br />
<br />

<form action="<?php 
echo url_for(EntityTable::getInternalUrl($entity, 'uploadImage'));
?>
" method="POST" enctype="multipart/form-data">
<?php 
echo input_hidden_tag('id', $entity['id']);
echo $upload_form['_csrf_token'];
?>

<?php 
$label_width = '100px';
?>

<table>
	<?php 
include_partial('global/formfield', array('field' => $upload_form['file']));
?>
Ejemplo n.º 20
0
  <li><strong><?php 
    echo link_to('Go back', EntityTable::getInternalUrl($entity));
    ?>
</strong> to <?php 
    echo $entity['name'];
    ?>
's profile page.</li>
  <?php 
    if (isset($next_entity) && $next_entity) {
        ?>
    <li><strong><?php 
        echo link_to('Match donations', EntityTable::getInternalUrl($next_entity, 'matchDonors'));
        ?>
</strong> for another person.</li>
  <?php 
    }
    ?>
  <?php 
    if (!$sf_request->getParameter('preprocess')) {
        ?>
    <li><strong><?php 
        echo link_to('Find more', EntityTable::getInternalUrl($entity, 'matchDonors', array('preprocess' => 1)));
        ?>
</strong> possible donor matches.</li>
  <?php 
    }
    ?>
</ul>

<?php 
}
Ejemplo n.º 21
0

<?php 
if (isset($match_pager)) {
    include_partial('global/section', array('title' => 'Search Results', 'pager' => $match_pager));
    ?>

<div class="padded">
  <?php 
    foreach ($match_pager->execute() as $match) {
        ?>
    <?php 
        if ($match['id'] == $entity['id']) {
            ?>
      <?php 
            continue;
            ?>
    <?php 
        }
        ?>

    <?php 
        include_partial('entity/oneliner', array('entity' => $match, 'merge_link' => true, 'actions' => array(array('name' => 'merge', 'url' => EntityTable::getInternalUrl($entity, 'merge', array('keep_id' => $match['id'])), 'options' => 'post=true confirm=Are you sure?'))));
        ?>
  <?php 
    }
    ?>
</div>

<?php 
}
Ejemplo n.º 22
0
  <?php 
    if ($entity['primary_ext'] == 'Person' && class_exists('OsEntityTransaction') && $sf_user->hasCredential('importer')) {
        ?>
    <?php 
        $donations = array('url' => EntityTable::getInternalUrl($entity, 'matchDonations'), 'condition' => $sf_user->hasCredential('importer'));
        ?>

    <?php 
        if (!OsEntityTransactionTable::countByEntityId($entity['id']) > 0) {
            ?>
      <?php 
            $donations['disabled'] = true;
            ?>
    <?php 
        }
        ?>
    <?php 
        $actions['match donations'] = $donations;
        ?>
  <?php 
    }
    ?>

  <?php 
    $actions = $actions + array('add bulk' => array('url' => EntityTable::getInternalUrl($entity, 'addBulk'), 'condition' => $sf_user->hasCredential('bulker')), 'refresh' => array('url' => EntityTable::getInternalUrl($entity, 'refresh', array('ref' => $sf_request->getUri())), 'credential' => 'admin'));
}
?>

<?php 
slot('header_actions', $actions);
Ejemplo n.º 23
0
    echo link_to('search', 'http://google.com/images?q=' . urlencode($entity['name']), 'target=_blank');
    ?>
    </td>
    
    <td>
      <?php 
    echo entity_link($entity);
    ?>
    </td>
    
    <td>
      <?php 
    if ($image = $entity['Image'][0]['filename']) {
        ?>
        <?php 
        echo link_to(image_tag(ImageTable::getPath($image, 'profile'), array('alt' => '', 'style' => 'height: 80px; border: 0;')), EntityTable::getInternalUrl($entity));
        ?>
      <?php 
    }
    ?>
    </td>

    <td>
      <?php 
    echo $entity['summary'];
    ?>
    </td>
    
  </tr>
    <?php 
    $row++;
Ejemplo n.º 24
0
<?php 
$col = -1;
?>
  <tr>
<?php 
foreach ($entities as $entity) {
    ?>
  <?php 
    if ($col == 4) {
        ?>
  </tr>
  <tr>
  <?php 
    }
    ?>
    <td style="vertical-align: top; text-align: center; padding: 0.8em; padding-bottom: 1.2em;">
      <?php 
    echo link_to(image_tag(ImageTable::getPath($entity['Image'][0]['filename'], 'profile'), array('alt' => '', 'style' => 'height: 100px; border: 0;')), EntityTable::getInternalUrl($entity));
    ?>
      <br />
      <br />
      <?php 
    echo entity_link($entity, null);
    ?>
    </td>
  <?php 
    $col = ($col + 1) % 5;
}
?>
  </tr>
</table>
Ejemplo n.º 25
0
<?php

if (isset($entity)) {
    $tabs = array('Connections Map' => array('url' => EntityTable::getInternalUrl($entity, "map"), 'actions' => array("map")), 'Interlocks Map' => array('url' => EntityTable::getInternalUrl($entity, 'interlocksMap'), 'actions' => array('interlocksMap')), 'Saved Maps' => array('url' => "map/list", 'actions' => array()));
    ?>

<?php 
    include_partial('global/tabs', array('tabs' => $tabs));
    ?>
<br />
<?php 
}
?>

<div id="netmap"></div>
<div id="netmap_controls">

<input id="netmap_prune" type="button" value="prune" /><br />
<input id="netmap_wheel" type="button" value="wheel" /><br />
<input id="netmap_grid" type="button" value="grid" /><br />
<input id="netmap_shuffle" type="button" value="shuffle" /><br />
<input id="netmap_short_force" type="button" value="force" /><br />
<input id="netmap_rezoom" type="button" value="rezoom" /><br />

<br />

Cats:
<select multiple id="netmap_cat_ids" size="10">
  <option value="1">Pos</option>
  <option value="2">Edu</option>
  <option value="3">Mem</option>
Ejemplo n.º 26
0
<br />

<span class="text_big">Can't find what you're looking for? Add it now:</span>

<br />
<br />

<div id="create_form">

<?php 
    include_partial('global/formerrors');
    ?>

<div class="padded">
<form action="<?php 
    echo url_for(EntityTable::getInternalUrl($entity, 'addRelationship'));
    ?>
" method="POST">
<?php 
    echo input_hidden_tag('id', $entity['id']);
    ?>

<?php 
    $primary = $sf_request->getParameter('primary');
    $primary = $primary ? $primary[0] : null;
    ?>

<table>
  <tr>
    <td class="form_label">Create a</td>
    <td class="form_field">