This is not a true solution to your problem (checking which template loaded another), but it will work to test if the footer has been loaded or not, and thus if it’s loading your partial:
if ( did_action( 'get_footer' ) ) echo 'footer-class';
This is not a true solution to your problem (checking which template loaded another), but it will work to test if the footer has been loaded or not, and thus if it’s loading your partial:
if ( did_action( 'get_footer' ) ) echo 'footer-class';