Ejemplo n.º 1
0
 public static function Create($title)
 {
     $item = new Organization();
     $item->Title = $title;
     if ($item->Update()) {
         return $item;
     }
     return null;
 }
    protected function RenderContent()
    {
        $items = Organization::Get();
        ?>
		<table class="ListView" style="width: 100%;">
			<tr>
				<th>Title</th>
			</tr>
			<?php 
        foreach ($items as $item) {
            ?>
					<tr>
						<td><a href="<?php 
            echo System::ExpandRelativePath("~/organizations/modify/" . $item->ID);
            ?>
"><?php 
            echo $item->Title;
            ?>
</a></td>
					</tr>
					<?php 
        }
        ?>
		</table>
		<?php 
    }
Ejemplo n.º 3
0
 public function __construct()
 {
     parent::__construct();
     $this->StyleSheets[] = new WebStyleSheet("~/StyleSheets/Main.css");
     $this->StyleSheets[] = new WebStyleSheet("http://static.alcehosting.net/dropins/WebFramework/StyleSheets/Professional/Main.css");
     $tenants = Tenant::Get();
     $tenantsNavigationButtons = array();
     foreach ($tenants as $tenant) {
         $tenantsNavigationButtons[] = new NavigationButton("~/tenant/modify/" . $tenant->URL, $tenant->URL, null, null, null);
     }
     $this->HeaderButtons = array();
     $this->SidebarButtons = array(new NavigationSeparator("Quick Start"), new NavigationButton("~/", "Dashboard", "dashboard"), new NavigationSeparator("Management"), new NavigationButton("~/tenant", "Tenants", "th-list", null, null, count($tenants), $tenantsNavigationButtons), new NavigationButton("~/modules", "Modules", "puzzle-piece", null, null, Module::Count()), new NavigationButton("~/data-centers", "Data Centers", "building-o", null, null, DataCenter::Count()), new NavigationButton("~/payment-plans", "Payment Plans", "money", null, null, PaymentPlan::Count()), new NavigationButton("~/organizations", "Organizations", "suitcase", null, null, Organization::Count()), new NavigationButton("~/users", "Users", "users", null, null, User::Count()), new NavigationButton("~/data-types", "Data Types", "sitemap", null, null, DataType::Count()), new NavigationButton("~/tenant-types", "Tenant Types", "tenant-types", null, null, TenantType::Count()), new NavigationSeparator("Help and Support"), new NavigationButton("~/support/documentation", "Documentation", "book"), new NavigationButton("~/support/bugspray", "Report a Bug", "bug"), new NavigationButton("~/system-log", "System Log", "file-text-o"));
     $this->RenderHeader = true;
     $this->RenderSidebar = true;
 }