Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

update to latest version, large change because I havent kept up with …

…repo
  • Loading branch information...
commit 3865458d16d4fc57af2068a66d7455ce7debb8b0 1 parent 1d93865
@billerickson authored
View
6 functions.php
@@ -2,7 +2,7 @@
/**
* Functions
*
- * @package genesis-crm
+ * @package Genesis CRM
* @author Bill Erickson <bill@billerickson.net>
* @copyright Copyright (c) 2011, Bill Erickson
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
@@ -36,8 +36,7 @@ function child_theme_setup() {
add_action( 'save_post', 'mfields_set_default_object_terms', 100, 2 );
// Set up Meta Boxes
- add_filter( 'cmb_meta_boxes' , 'be_create_metaboxes' );
- add_action( 'init', 'be_initialize_cmb_meta_boxes', 9999 );
+ add_action( 'init' , 'be_create_metaboxes' );
// Setup Sidebars
genesis_register_sidebar(array('name' => 'Home Column 1', 'id' => 'home-column-1'));
@@ -409,6 +408,7 @@ function be_genesis_add_inpost_layout_box() {
function crm_form_exclusion($exclusion) {
$exclusion[] = 'form';
+ $exclusion[] = 'contact-form';
return $exclusion;
}
View
2  index.php
@@ -2,7 +2,7 @@
/**
* Index - Used for everything but page templates
*
- * @package genesis-crm
+ * @package Genesis CRM
* @author Bill Erickson <bill@billerickson.net>
* @copyright Copyright (c) 2011, Bill Erickson
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
View
70 lib/functions/create-metaboxes.php
@@ -2,14 +2,14 @@
/**
* Create Metaboxes
*
- * @package genesis-crm
+ * @package Genesis CRM
* @author Bill Erickson <bill@billerickson.net>
* @copyright Copyright (c) 2011, Bill Erickson
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
*
*/
-function be_create_metaboxes( $meta_boxes ) {
+function be_create_metaboxes() {
global $prefix;
$prefix = '_crm_';
$meta_boxes = array();
@@ -77,6 +77,15 @@ function be_create_metaboxes( $meta_boxes ) {
)
),
array(
+ 'name' => 'Project Type',
+ 'id' => $prefix . 'project_type',
+ 'type' => 'select',
+ 'options' => array(
+ array( 'name' => 'Custom Theme', 'value' => 'Custom Theme'),
+ array( 'name' => 'Theme Modification', 'value' => 'Theme Modification' ),
+ )
+ ),
+ array(
'name' => 'Project Status',
'id' => $prefix.'project_status',
'type' => 'radio_inline',
@@ -94,7 +103,8 @@ function be_create_metaboxes( $meta_boxes ) {
'type' => 'radio_inline',
'options' => array(
array('name' => 'Yes', 'value' => 'yes'),
- array('name' => 'No', 'value' => 'no')
+ array('name' => 'No', 'value' => 'no'),
+ array( 'name' => 'Delayed', 'value' => 'delayed' ),
)
),
array(
@@ -112,36 +122,6 @@ function be_create_metaboxes( $meta_boxes ) {
'id' => $prefix.'expense',
'type' => 'text_money',
),
- array(
- 'name' => 'Time Spent',
- 'id' => $prefix.'label_time',
- 'type' => 'title'
- ),
- array(
- 'name' => 'Initial Setup',
- 'id' => $prefix.'time_setup',
- 'type' => 'text_small'
- ),
- array(
- 'name' => 'Development',
- 'id' => $prefix.'time_development',
- 'type' => 'text_small'
- ),
- array(
- 'name' => 'Phone',
- 'id' => $prefix.'time_phone',
- 'type' => 'text_small'
- ),
- array(
- 'name' => 'Hourly',
- 'id' => $prefix.'time_hourly',
- 'type' => 'text_small'
- ),
- array(
- 'name' => 'Other',
- 'id' => $prefix.'time_other',
- 'type' => 'text_small'
- )
)
);
@@ -183,14 +163,26 @@ function be_create_metaboxes( $meta_boxes ) {
'show_names' => false, // Show field names left of input
'fields' => array()
);
+
+ $meta_boxes[] = array(
+ 'id' => 'server-information',
+ 'title' => 'Server Information',
+ 'pages' => array('post'),
+ 'context' => 'normal',
+ 'priority' => 'low',
+ 'show_names' => false,
+ 'fields' => array(
+ array(
+ 'name' => 'Server Information',
+ 'desc' => '',
+ 'id' => $prefix . 'server_information',
+ 'type' => 'textarea'
+ )
+ )
+ );
- return $meta_boxes;
+ require_once(CHILD_DIR . '/lib/metabox/init.php');
}
-function be_initialize_cmb_meta_boxes() {
- if ( !class_exists( 'cmb_Meta_Box' ) ) {
- require_once( CHILD_DIR . '/lib/metabox/init.php' );
- }
-}
?>
View
2  lib/functions/post-content.php
@@ -2,7 +2,7 @@
/**
* Customize Post Content
*
- * @package genesis-crm
+ * @package Genesis CRM
* @author Bill Erickson <bill@billerickson.net>
* @copyright Copyright (c) 2011, Bill Erickson
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
View
67 style.css
@@ -1481,6 +1481,7 @@ div.gform_wrapper .gform_footer {
#content .project {width: 280px; float: left; padding: 10px 5px; margin: 0 0 20px 20px;}
#content .project.first, #content .item .project {clear:both; margin-left: 0;}
#content .project.yes {background: #fffeb5;}
+#content .project.delayed {background: #fff;}
#content .project h3 {margin-bottom: 0;}
#content .project p {margin-bottom: 10px;}
#content .project a {color: #06c; text-decoration: none;}
@@ -1489,6 +1490,72 @@ div.gform_wrapper .gform_footer {
#content .grey {background: #eee; padding: 10px;}
#content .grey .project {margin-bottom: 0;}
+#content .grey .project.yes { border-right: 5px solid #ddd; background: #ddd;}
+
+/* New Form
+------------------------------------------------------------ */
+
+body.page-template-template-new-form-php {
+ background: #f4f4f4;
+}
+
+.page-template-template-new-form-php #wrap,
+.page-template-template-new-form-php #inner,
+.page-template-template-new-form-php #content-sidebar-wrap,
+.page-template-template-new-form-php #content {
+ background: transparent;
+ width: 100%;
+ margin: 0;
+ padding: 0;
+}
+
+.page-template-template-new-form-php #content .gfield_label {
+ width: 160px;
+ text-align: right;
+ padding-right: 25px;
+ color: #4f5357;
+ font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
+ text-shadow: 1px 1px 1px #fff;
+ font-size: 15px;
+ font-weight: normal;
+}
+
+.page-template-template-new-form-php .ginput_container {
+ display: inline-block;
+ width: 40%;
+}
+
+.page-template-template-new-form-php .ginput_container .large,
+.page-template-template-new-form-php .ginput_container .textarea {
+ background: #fff;
+ border: none;
+ border-top: 1px solid #ababab;
+ border-left: 1px solid #ababab;
+}
+
+.page-template-template-new-form-php #field_1_4 .ginput_container {
+ width: 60%;
+}
+
+.page-template-template-new-form-php .post-edit-link,
+.page-template-template-new-form-php .validation_error,
+.page-template-template-new-form-php #content .validation_message { display: none; }
+
+.page-template-template-new-form-php #content .gform_footer { margin-left: 185px;}
+
+.page-template-template-new-form-php #content .gfield_error {
+ background: transparent !important;
+ border: none !important;
+ margin: 0 !important;
+}
+
+.page-template-template-new-form-php #content .gfield_error label {
+ color: #be0d0d;
+}
+
+.page-template-template-new-form-php #content .gfield_error .large {
+ border: 1px solid #be0d0d;
+}
/* Smaller Screens
------------------------------------------------------------ */
View
49 template-active.php
@@ -2,7 +2,7 @@
/**
* Template Name: Active
*
- * @package genesis-crm
+ * @package Genesis CRM
* @author Bill Erickson <bill@billerickson.net>
* @copyright Copyright (c) 2011, Bill Erickson
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
@@ -19,15 +19,11 @@
function be_active_loop() {
echo '<div class="two-thirds first">';
- do_action( 'genesis_before_post_title' );
- do_action( 'genesis_post_title' );
- do_action( 'genesis_after_post_title' );
-
$order = array('dev', 'maintenance', 'edit', 'dev-complete', 'project-complete');
- $loop_counter = 1;
setlocale(LC_MONETARY, 'en_US');
foreach ($order as $order_item):
+ $loop_counter = 1;
global $prefix;
$args = array(
'category_name' => 'active-project',
@@ -41,9 +37,12 @@ function be_active_loop() {
);
$active = new WP_Query($args);
+ if( $active->have_posts() )
+ echo '<h2 class="first">' . ucwords($order_item) . '</h2>';
while ($active->have_posts()): $active->the_post();
$status = get_custom_field($prefix.'project_status');
+ $type = get_custom_field( $prefix . 'project_type' );
$status_summary = get_custom_field($prefix.'status_summary');
$revenue = get_custom_field($prefix.'revenue');
$expense = get_custom_field($prefix.'expense');
@@ -60,6 +59,7 @@ function be_active_loop() {
echo '<h4><a href="'.get_edit_post_link().'">'.be_get_project_name().'</a></h4>';
echo '<p>';
echo '<strong>'.ucwords($status).'</strong>: '.$status_summary .'<br />';
+ if( $type ) echo '<strong>Type</strong>: '. $type . '<br />';
if ($revenue) echo '<strong>Budget</strong>: '. $revenue;
if ($expense) echo ' - '. $expense . ' = '. $profit . '<br />';
echo '</p>';
@@ -78,13 +78,18 @@ function be_active_loop() {
'posts_per_page' => '-1',
'orderby' => 'meta_value_num',
'order' => 'ASC',
- 'meta_key' => $prefix.'date_dev_start'
+ 'meta_key' => $prefix.'date_dev_start',
);
$scheduled = new WP_Query($args);
+ global $be_output_end;
+ $be_output_end = '';
while ($scheduled->have_posts()): $scheduled->the_post();
-
+
+ $output = '';
+ global $be_output_end;
$start = get_custom_field($prefix.'date_dev_start');
+ $type = get_custom_field( $prefix . 'project_type' );
$status_summary = get_custom_field($prefix.'status_summary');
$revenue = get_custom_field($prefix.'revenue');
$expense = get_custom_field($prefix.'expense');
@@ -93,16 +98,30 @@ function be_active_loop() {
if (!empty($expense)) $expense = money_format( '%(#10n', $expense );
if (!empty($profit)) $profit = money_format( '%(#10n', $profit );
- echo '<div class="project">';
- echo '<p><a href="'.get_edit_post_link().'">'.be_get_project_name().'</a><br />';
- echo '<strong>Scheduled for: </strong>'. date('F j, Y', $start) . '<br />';
- if ($status_summary) echo '<strong>Status:</strong> '.$status_summary.'<br />';
- if ($revenue) echo '<strong>Budget</strong>: '. $revenue;
- if ($expense) echo ' - '. $expense . ' = '. $profit . '<br />';
+ $classes = array( 'project' );
+ $work = get_custom_field($prefix.'needs_work');
+ $classes[] = $work;
+ $output .= '<div class="' . implode( ' ', $classes ) . '">';
+ $output .= '<p><a href="'.get_edit_post_link().'">'.be_get_project_name().'</a><br />';
+ $output .= '<strong>Scheduled for: </strong>'. date('F j, Y', $start) . '<br />';
+ if ($status_summary)
+ $output .= '<strong>Status:</strong> '.$status_summary.'<br />';
+ if( $type )
+ $output .= '<strong>Type:</strong> ' . $type . '<br />';
+ if ($revenue)
+ $output .= '<strong>Budget</strong>: '. $revenue;
+ if ($expense)
+ $output .= ' - '. $expense . ' = '. $profit . '<br />';
- echo '</div>';
+ $output .= '</div>';
+
+ if( 'delayed' == $work )
+ $be_output_end .= $output;
+ else
+ echo $output;
endwhile;
+ echo $be_output_end;
echo '</div>';
}
View
2  template-complete.php
@@ -2,7 +2,7 @@
/**
* Template Name: Complete
*
- * @package genesis-crm
+ * @package Genesis CRM
* @author Bill Erickson <bill@billerickson.net>
* @copyright Copyright (c) 2011, Bill Erickson
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
View
3  template-download.php
@@ -2,7 +2,7 @@
/**
* Template Name: Download
*
- * @package genesis-crm
+ * @package Genesis CRM
* @author Bill Erickson <bill@billerickson.net>
* @copyright Copyright (c) 2011, Bill Erickson
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
@@ -37,6 +37,7 @@
<?php
$args = array(
'posts_per_page' => '-1',
+ 'category_name' => 'complete',
);
$downloads = new WP_Query($args);
while ($downloads->have_posts()): $downloads->the_post();
View
18 template-form.php
@@ -2,7 +2,7 @@
/**
* Template Name: Form
*
- * @package genesis-crm
+ * @package Genesis CRM
* @author Bill Erickson <bill@billerickson.net>
* @copyright Copyright (c) 2011, Bill Erickson
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
@@ -11,5 +11,19 @@
wp_head();
-gravity_form(1, false, false, false, '', false);
+?>
+<style>
+#gform_wrapper_1 input,
+#gform_wrapper_1 textarea,
+#gform_wrapper_1 label {
+ font-size: 13px;
+ line-height: 20px;
+ font-family: Helvetica, Arial, sans-serif;
+}
+</style>
+<?php
+
+if( have_posts() ): while( have_posts() ): the_post();
+ the_content();
+endwhile; endif;
?>
View
18 template-new-form.php
@@ -0,0 +1,18 @@
+<?php
+/**
+ * Template Name: New Form
+ *
+ * @package Genesis CRM
+ * @author Bill Erickson <bill@billerickson.net>
+ * @copyright Copyright (c) 2011, Bill Erickson
+ * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
+ *
+ */
+
+// Remove Things
+remove_action( 'genesis_header', 'genesis_header_markup_open', 5 );
+remove_action( 'genesis_header', 'genesis_do_header' );
+remove_action( 'genesis_header', 'genesis_header_markup_close', 15 );
+remove_action( 'genesis_post_title', 'genesis_do_post_title' );
+
+genesis();
View
2  template-prospects.php
@@ -2,7 +2,7 @@
/**
* Template Name: Prospects
*
- * @package genesis-crm
+ * @package Genesis CRM
* @author Bill Erickson <bill@billerickson.net>
* @copyright Copyright (c) 2011, Bill Erickson
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
Please sign in to comment.
Something went wrong with that request. Please try again.